mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-04-18 05:42:49 +00:00
add option to use CSR8811 chipset
This commit is contained in:
parent
e482e2f301
commit
92ed1ec273
@ -61,6 +61,10 @@
|
|||||||
#include "gap_le.h"
|
#include "gap_le.h"
|
||||||
#include "central_device_db.h"
|
#include "central_device_db.h"
|
||||||
|
|
||||||
|
#ifdef HAVE_UART_CSR
|
||||||
|
#include "bt_control_csr.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#define HEARTBEAT_PERIOD_MS 1000
|
#define HEARTBEAT_PERIOD_MS 1000
|
||||||
|
|
||||||
// test profile
|
// test profile
|
||||||
@ -941,6 +945,15 @@ void setup_cli(){
|
|||||||
run_loop_add_data_source(&stdin_source);
|
run_loop_add_data_source(&stdin_source);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef HAVE_UART_CSR
|
||||||
|
static hci_uart_config_t hci_uart_config_csr8811 = {
|
||||||
|
"/dev/tty.usbserial-A40081HW",
|
||||||
|
115200,
|
||||||
|
0, // 1000000,
|
||||||
|
1
|
||||||
|
};
|
||||||
|
#endif
|
||||||
|
|
||||||
void setup(void){
|
void setup(void){
|
||||||
/// GET STARTED with BTstack ///
|
/// GET STARTED with BTstack ///
|
||||||
btstack_memory_init();
|
btstack_memory_init();
|
||||||
@ -950,9 +963,15 @@ void setup(void){
|
|||||||
hci_dump_open("/tmp/hci_dump.pklg", HCI_DUMP_PACKETLOGGER);
|
hci_dump_open("/tmp/hci_dump.pklg", HCI_DUMP_PACKETLOGGER);
|
||||||
|
|
||||||
// init HCI
|
// init HCI
|
||||||
|
#ifdef HAVE_UART_CSR
|
||||||
|
hci_transport_t * transport = hci_transport_h4_instance();
|
||||||
|
hci_uart_config_t * config = &hci_uart_config_csr8811;
|
||||||
|
bt_control_t * control = bt_control_csr_instance();
|
||||||
|
#else
|
||||||
hci_transport_t * transport = hci_transport_usb_instance();
|
hci_transport_t * transport = hci_transport_usb_instance();
|
||||||
hci_uart_config_t * config = NULL;
|
hci_uart_config_t * config = NULL;
|
||||||
bt_control_t * control = NULL;
|
bt_control_t * control = NULL;
|
||||||
|
#endif
|
||||||
remote_device_db_t * remote_db = (remote_device_db_t *) &remote_device_db_memory;
|
remote_device_db_t * remote_db = (remote_device_db_t *) &remote_device_db_memory;
|
||||||
hci_init(transport, config, control, remote_db);
|
hci_init(transport, config, control, remote_db);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user