add option to use CSR8811 chipset

This commit is contained in:
matthias.ringwald 2014-06-10 20:43:56 +00:00
parent e482e2f301
commit 92ed1ec273

View File

@ -61,6 +61,10 @@
#include "gap_le.h"
#include "central_device_db.h"
#ifdef HAVE_UART_CSR
#include "bt_control_csr.h"
#endif
#define HEARTBEAT_PERIOD_MS 1000
// test profile
@ -941,6 +945,15 @@ void setup_cli(){
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){
/// GET STARTED with BTstack ///
btstack_memory_init();
@ -950,9 +963,15 @@ void setup(void){
hci_dump_open("/tmp/hci_dump.pklg", HCI_DUMP_PACKETLOGGER);
// 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_uart_config_t * config = NULL;
bt_control_t * control = NULL;
#endif
remote_device_db_t * remote_db = (remote_device_db_t *) &remote_device_db_memory;
hci_init(transport, config, control, remote_db);