also build ble_peripheral_uart_cc256x

This commit is contained in:
matthias.ringwald@gmail.com 2014-07-31 15:03:04 +00:00
parent 499414432d
commit e0d35ddbe7
2 changed files with 19 additions and 6 deletions

View File

@ -72,7 +72,7 @@ GATT_SERVER_OBJ = $(GATT_SERVER:.c=.o)
all: ../../include/btstack/version.h ble_client gatt_browser sdp_rfcomm_query sdp_general_query spp_counter ble_peripheral \
ble_peripheral_sm_minimal gap_inquiry gap_dedicated_bonding gap_inquiry_and_bond l2cap_test spp_streamer \
classic_test ble_peripheral_uart ancs_client spp_and_le_counter
classic_test ble_peripheral_uart_csr ble_peripheral_uart_cc256x ancs_client spp_and_le_counter
../../include/btstack/version.h:
cd ..; ../src/get_version.sh
@ -124,9 +124,12 @@ ancs_client: ${CORE_OBJ} ${COMMON_OBJ} ${ATT_OBJ} ${GATT_SERVER_OBJ} ${GATT_CLIE
ble_peripheral: ${CORE_OBJ} ${COMMON_OBJ} ${ATT_OBJ} ${GATT_SERVER_OBJ} ${SM_REAL_OBJ} ble_peripheral.c profile.h
${CC} ${CORE_OBJ} ${COMMON_OBJ} ${ATT_OBJ} ${GATT_SERVER_OBJ} ${SM_REAL_OBJ} ble_peripheral.c ${CFLAGS} ${LDFLAGS} -o $@
ble_peripheral_uart: ${CORE_OBJ} ${COMMON_OBJ} ${CSR_OBJ} ${ATT_OBJ} ${SM_REAL_OBJ} ble_peripheral.c profile.h
ble_peripheral_uart_csr: ${CORE_OBJ} ${COMMON_OBJ} ${CSR_OBJ} ${ATT_OBJ} ${GATT_SERVER_OBJ} ${SM_REAL_OBJ} ble_peripheral.c profile.h
${CC} $ -DHAVE_UART_CSR ${CORE_OBJ} ${COMMON_OBJ} ${CSR_OBJ} ${ATT_OBJ} ${GATT_SERVER_OBJ} ${SM_REAL_OBJ} ble_peripheral.c ${CFLAGS} ${LDFLAGS} -o $@
ble_peripheral_uart_cc256x: ${CORE_OBJ} ${COMMON_OBJ} ${CC2564} ${ATT_OBJ} ${GATT_SERVER_OBJ} ${SM_REAL_OBJ} ble_peripheral.c profile.h
${CC} $ -DHAVE_UART_CC256x ${CORE_OBJ} ${COMMON_OBJ} ${CC2564} ${ATT_OBJ} ${GATT_SERVER_OBJ} ${SM_REAL_OBJ} ble_peripheral.c ${CFLAGS} ${LDFLAGS} -o $@
ble_peripheral_sm_minimal: ${CORE_OBJ} ${COMMON_OBJ} ${ATT_OBJ} ${GATT_SERVER_OBJ} ${SM_MINIMAL_OBJ} ble_peripheral.c profile.h
${CC} ${CORE_OBJ} ${COMMON_OBJ} ${ATT_OBJ} ${GATT_SERVER_OBJ} ${SM_MINIMAL_OBJ} ble_peripheral.c ${CFLAGS} ${LDFLAGS} -o $@

View File

@ -65,6 +65,11 @@
#include "bt_control_csr.h"
#endif
#ifdef HAVE_UART_CC256x
#include "bt_control_cc256x.h"
#endif
#define HEARTBEAT_PERIOD_MS 1000
// test profile
@ -945,9 +950,10 @@ 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",
#if defined(HAVE_UART_CSR) || defined(HAVE_UART_CC256x)
static hci_uart_config_t hci_uart_config = {
// "/dev/tty.usbserial-A40081HW",
"/dev/tty.usbserial-AD025KU2",
115200,
0, // 1000000,
1
@ -965,8 +971,12 @@ void setup(void){
// init HCI
#ifdef HAVE_UART_CSR
hci_transport_t * transport = hci_transport_h4_instance();
hci_uart_config_t * config = &hci_uart_config_csr8811;
hci_uart_config_t * config = &hci_uart_config;
bt_control_t * control = bt_control_csr_instance();
#elif defined(HAVE_UART_CC256x)
hci_transport_t * transport = hci_transport_h4_instance();
hci_uart_config_t * config = &hci_uart_config;
bt_control_t * control = bt_control_cc256x_instance();
#else
hci_transport_t * transport = hci_transport_usb_instance();
hci_uart_config_t * config = NULL;