From 726a19abef3d48084105c802d0e1ba157d2aee8f Mon Sep 17 00:00:00 2001 From: Matthias Ringwald Date: Fri, 4 Mar 2016 14:37:06 +0100 Subject: [PATCH] fix msp430 ports --- example/spp_flowcontrol.c | 13 ++----------- port/msp-exp430f5438-cc2564b/Makefile | 2 +- port/msp-exp430f5438-cc2564b/example/ble_server.c | 14 +------------- port/msp430f5229lp-cc2564b/Makefile | 10 +++++----- port/msp430f5229lp-cc2564b/btstack_config.h | 1 + port/msp430f5229lp-cc2564b/example/ble_server.c | 13 +------------ 6 files changed, 11 insertions(+), 42 deletions(-) diff --git a/example/spp_flowcontrol.c b/example/spp_flowcontrol.c index e7c9758b6..162be0a39 100644 --- a/example/spp_flowcontrol.c +++ b/example/spp_flowcontrol.c @@ -49,16 +49,7 @@ #include #include -#include "hci_cmd.h" -#include "btstack_run_loop.h" -#include "classic/sdp_util.h" - -#include "hci.h" -#include "l2cap.h" -#include "btstack_memory.h" -#include "classic/rfcomm.h" -#include "classic/sdp_server.h" -#include "btstack_config.h" +#include "btstack.h" #define HEARTBEAT_PERIOD_MS 500 @@ -92,7 +83,7 @@ static void spp_service_setup(void){ // init RFCOMM rfcomm_init(); // reserved channel, mtu limited by l2cap, 1 credit - rfcomm_register_service_with_initial_credits(rfcomm_channel_nr, 0xffff, 1); + rfcomm_register_service_with_initial_credits(&packet_handler, rfcomm_channel_nr, 0xffff, 1); // init SDP, create record for SPP and register with SDP sdp_init(); diff --git a/port/msp-exp430f5438-cc2564b/Makefile b/port/msp-exp430f5438-cc2564b/Makefile index 48bf64b94..8ebf418b9 100644 --- a/port/msp-exp430f5438-cc2564b/Makefile +++ b/port/msp-exp430f5438-cc2564b/Makefile @@ -38,7 +38,7 @@ CORE = \ btstack_memory.c \ btstack_memory_pool.c \ btstack_run_loop_embedded.c \ - btstak_run_loop.c \ + btstack_run_loop.c \ hal_board.c \ hal_compat.c \ hal_cpu.c \ diff --git a/port/msp-exp430f5438-cc2564b/example/ble_server.c b/port/msp-exp430f5438-cc2564b/example/ble_server.c index e56dc09a8..69ec23794 100644 --- a/port/msp-exp430f5438-cc2564b/example/ble_server.c +++ b/port/msp-exp430f5438-cc2564b/example/ble_server.c @@ -65,19 +65,7 @@ #include "hal_usb.h" #include "UserExperienceGraphics.h" -#include "btstack_run_loop.h" - -#include "btstack_memory.h" -#include "btstack_chipset_cc256x.h" -#include "gap.h" -#include "hci.h" -#include "hci_dump.h" -#include "l2cap.h" - -#include "ble/sm.h" -#include "ble/att_db.h" -#include "ble/att_server.h" -#include "ble/le_device_db.h" +#include "btstack.h" #define FONT_HEIGHT 12 // Each character has 13 lines #define FONT_WIDTH 8 diff --git a/port/msp430f5229lp-cc2564b/Makefile b/port/msp430f5229lp-cc2564b/Makefile index b3bb0e033..b3268555e 100644 --- a/port/msp430f5229lp-cc2564b/Makefile +++ b/port/msp430f5229lp-cc2564b/Makefile @@ -36,6 +36,7 @@ CFLAGS += \ LDFLAGS = -mmcu=${MCU} CORE = \ + btstack_linked_list.c \ btstack_memory.c \ btstack_memory_pool.c \ btstack_run_loop.c \ @@ -47,7 +48,6 @@ CORE = \ hal_tick.c \ hal_usb.c \ hci_dump.c \ - linked_list.c \ main.c \ btstack_util.c \ @@ -114,19 +114,19 @@ include ${BTSTACK_ROOT}/chipset/cc256x/Makefile.inc led_counter.out: ${CORE_OBJ} ${COMMON_OBJ} ${CC2560B} led_counter.o ${CC} $^ ${LDFLAGS} -o $@ -ant-test.out: ${CORE_OBJ} ${COMMON_OBJ} ${SPP_OBJ} profile.h sdp.o ant_cmds.o ${CC2567} ant-test.o +ant-test.out: ${CORE_OBJ} ${COMMON_OBJ} ${SPP_OBJ} profile.h ant_cmds.o ${CC2567} ant-test.o ${CC} $^ ${LDFLAGS} -o $@ ble_server.out: ${CORE_OBJ} ${COMMON_OBJ} ${BLE_OBJ} profile.h ble_server.o ${CC} $^ ${LDFLAGS} -o $@ -spp_and_le_counter.out: ${CORE_OBJ} ${COMMON_OBJ} ${SPP_OBJ} ${BLE_OBJ} spp_and_le_counter.h spp_and_le_counter.o sdp.o +spp_and_le_counter.out: ${CORE_OBJ} ${COMMON_OBJ} ${SPP_OBJ} ${BLE_OBJ} spp_and_le_counter.h spp_and_le_counter.o sdp_server.o ${CC} $^ ${LDFLAGS} -o $@ -spp_counter.out: ${CORE_OBJ} ${COMMON_OBJ} ${SPP_OBJ} ${CC2560B} spp_counter.o sdp.o +spp_counter.out: ${CORE_OBJ} ${COMMON_OBJ} ${SPP_OBJ} ${CC2560B} spp_counter.o sdp_server.o ${CC} $^ ${LDFLAGS} -o $@ -spp_flowcontrol.out: ${CORE_OBJ} ${COMMON_OBJ} ${SPP_OBJ} ${CC2560B} spp_flowcontrol.o sdp.o +spp_flowcontrol.out: ${CORE_OBJ} ${COMMON_OBJ} ${SPP_OBJ} ${CC2560B} spp_flowcontrol.o sdp_server.o ${CC} $^ ${LDFLAGS} -o $@ gap_inquiry.out: ${CORE_OBJ} ${COMMON_OBJ} ${SPP_OBJ} ${CC2560B} gap_inquiry.o diff --git a/port/msp430f5229lp-cc2564b/btstack_config.h b/port/msp430f5229lp-cc2564b/btstack_config.h index b5399ade6..4cf7fca19 100644 --- a/port/msp430f5229lp-cc2564b/btstack_config.h +++ b/port/msp430f5229lp-cc2564b/btstack_config.h @@ -25,6 +25,7 @@ #define MAX_NO_HCI_CONNECTIONS MAX_SPP_CONNECTIONS #define MAX_NO_GATT_CLIENTS 0 #define MAX_NO_GATT_SUBCLIENTS 0 +#define MAX_NO_HFP_CONNECTIONS 0 #define MAX_NO_L2CAP_SERVICES 2 #define MAX_NO_L2CAP_CHANNELS (1+MAX_SPP_CONNECTIONS) #define MAX_NO_RFCOMM_MULTIPLEXERS MAX_SPP_CONNECTIONS diff --git a/port/msp430f5229lp-cc2564b/example/ble_server.c b/port/msp430f5229lp-cc2564b/example/ble_server.c index 8541a1afc..47d837417 100644 --- a/port/msp430f5229lp-cc2564b/example/ble_server.c +++ b/port/msp430f5229lp-cc2564b/example/ble_server.c @@ -63,19 +63,8 @@ #include "hal_usb.h" #include "hal_usb.h" -#include "btstack_run_loop.h" +#include "btstack.h" -#include "btstack_memory.h" -#include "btstack_chipset_cc256x.h" -#include "hci.h" -#include "hci_dump.h" -#include "l2cap.h" - -#include "ble/sm.h" -#include "ble/att_db.h" -#include "ble/att_server.h" -#include "gap.h" -#include "ble/le_device_db.h" #define FONT_HEIGHT 12 // Each character has 13 lines #define FONT_WIDTH 8