diff --git a/ble/ad_parser.c b/ble/ad_parser.c index 8310270a1..38beb32f0 100644 --- a/ble/ad_parser.c +++ b/ble/ad_parser.c @@ -47,9 +47,9 @@ #include #include -#include -#include -#include +#include "utils.h" +#include "sdp_util.h" +#include "hci_cmds.h" #include "hci.h" #include "ad_parser.h" diff --git a/ble/ancs_client_lib.c b/ble/ancs_client_lib.c index e093a6d21..15bc17b11 100644 --- a/ble/ancs_client_lib.c +++ b/ble/ancs_client_lib.c @@ -42,8 +42,8 @@ #include #include -#include -#include +#include "run_loop.h" +#include "sdp_util.h" #include "ancs_client_lib.h" diff --git a/ble/att.c b/ble/att.c index 93433fd60..7c1444fc2 100644 --- a/ble/att.c +++ b/ble/att.c @@ -41,7 +41,7 @@ #include "att.h" #include "debug.h" -#include +#include "utils.h" // Buetooth Base UUID 00000000-0000-1000-8000-00805F9B34FB in little endian static const uint8_t bluetooth_base_uuid[] = { 0xfb, 0x34, 0x9b, 0x5f, 0x80, 0x00, 0x00, 0x80, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; diff --git a/ble/att_db_util.c b/ble/att_db_util.c index 9e9116f32..ed151fd97 100644 --- a/ble/att_db_util.c +++ b/ble/att_db_util.c @@ -40,7 +40,7 @@ #include "att_db_util.h" #include "att.h" -#include +#include "utils.h" #include "debug.h" // ATT DB Storage diff --git a/ble/att_dispatch.h b/ble/att_dispatch.h index bd7436096..c40646cdb 100644 --- a/ble/att_dispatch.h +++ b/ble/att_dispatch.h @@ -43,7 +43,7 @@ #ifndef __ATT_DISPATCH_H #define __ATT_DISPATCH_H -#include +#include "btstack.h" #if defined __cplusplus extern "C" { diff --git a/ble/att_server.c b/ble/att_server.c index 4a37d9e5d..9133b16a1 100644 --- a/ble/att_server.c +++ b/ble/att_server.c @@ -48,7 +48,7 @@ #include "btstack-config.h" -#include +#include "run_loop.h" #include "debug.h" #include "btstack_memory.h" #include "hci.h" diff --git a/ble/att_server.h b/ble/att_server.h index 552e1c2ec..ca94ec7fb 100644 --- a/ble/att_server.h +++ b/ble/att_server.h @@ -37,7 +37,7 @@ #ifndef __ATT_SERVER_H #define __ATT_SERVER_H -#include +#include "btstack.h" #include #include "att.h" diff --git a/ble/gap_le.h b/ble/gap_le.h index d16a211f3..9645aa271 100644 --- a/ble/gap_le.h +++ b/ble/gap_le.h @@ -42,8 +42,8 @@ extern "C" { #endif -#include -#include +#include "utils.h" +#include "hci_cmds.h" /* API_START */ diff --git a/ble/gatt_client.c b/ble/gatt_client.c index 4ba55e63a..7ccf3f72d 100644 --- a/ble/gatt_client.c +++ b/ble/gatt_client.c @@ -39,10 +39,10 @@ #include #include #include -#include -#include -#include -#include +#include "run_loop.h" +#include "hci_cmds.h" +#include "utils.h" +#include "sdp_util.h" #include "btstack-config.h" diff --git a/ble/le_device_db.h b/ble/le_device_db.h index cf1c4e351..90c93596e 100644 --- a/ble/le_device_db.h +++ b/ble/le_device_db.h @@ -38,7 +38,7 @@ #ifndef __LE_DEVICE_DB_H #define __LE_DEVICE_DB_H -#include +#include "utils.h" #if defined __cplusplus extern "C" { diff --git a/ble/sm.c b/ble/sm.c index 97599c3f0..c8acd4449 100644 --- a/ble/sm.c +++ b/ble/sm.c @@ -39,7 +39,7 @@ #include #include -#include +#include "linked_list.h" #include "btstack_memory.h" #include "debug.h" diff --git a/ble/sm.h b/ble/sm.h index 239db6436..fdfd28856 100644 --- a/ble/sm.h +++ b/ble/sm.h @@ -38,8 +38,8 @@ #ifndef __SM_H #define __SM_H -#include -#include +#include "utils.h" +#include "btstack.h" #include #if defined __cplusplus diff --git a/chipset-cc256x/ant_cmds.c b/chipset-cc256x/ant_cmds.c index 4a63a78c3..bd4504294 100644 --- a/chipset-cc256x/ant_cmds.c +++ b/chipset-cc256x/ant_cmds.c @@ -41,7 +41,7 @@ #include -#include +#include "sdp_util.h" #include "btstack-config.h" #include "hci.h" diff --git a/chipset-csr/bt_control_csr.c b/chipset-csr/bt_control_csr.c index bd4566323..8335ab6db 100644 --- a/chipset-csr/bt_control_csr.c +++ b/chipset-csr/bt_control_csr.c @@ -50,7 +50,7 @@ #include "bt_control.h" #include "debug.h" -#include +#include "utils.h" // minimal CSR init script to configure PSKEYs and activate them static const uint8_t init_script[] = { diff --git a/example/daemon/inquiry.c b/example/daemon/inquiry.c index c238de517..12a585e5f 100644 --- a/example/daemon/inquiry.c +++ b/example/daemon/inquiry.c @@ -46,7 +46,7 @@ #include #include -#include +#include "btstack.h" #define MAX_DEVICES 10 struct device { diff --git a/example/daemon/l2cap-server.c b/example/daemon/l2cap-server.c index af40a3430..2c56fcc58 100644 --- a/example/daemon/l2cap-server.c +++ b/example/daemon/l2cap-server.c @@ -46,9 +46,9 @@ #include #include -#include -#include -#include +#include "btstack.h" +#include "hci_cmds.h" +#include "sdp_util.h" int l2cap_reg_fail = 0; diff --git a/example/daemon/l2cap-throughput.c b/example/daemon/l2cap-throughput.c index 1a44989c0..a1b42c7b9 100644 --- a/example/daemon/l2cap-throughput.c +++ b/example/daemon/l2cap-throughput.c @@ -46,8 +46,8 @@ #include #include -#include -#include +#include "btstack.h" +#include "hci_cmds.h" #define PSM_TEST 0xdead #define PACKET_SIZE 1000 diff --git a/example/daemon/le_scan.c b/example/daemon/le_scan.c index 0cd86f018..52e9c7b9f 100644 --- a/example/daemon/le_scan.c +++ b/example/daemon/le_scan.c @@ -44,7 +44,7 @@ #include #include -#include +#include "btstack.h" static void packet_handler(uint8_t packet_type, uint16_t channel, uint8_t *packet, uint16_t size){ diff --git a/example/daemon/rfcomm-cat.c b/example/daemon/rfcomm-cat.c index eb59facc6..0b5f6f2e3 100644 --- a/example/daemon/rfcomm-cat.c +++ b/example/daemon/rfcomm-cat.c @@ -53,8 +53,8 @@ #include #include -#include -#include +#include "btstack.h" +#include "sdp_util.h" // input from command line arguments bd_addr_t addr = { }; diff --git a/example/daemon/rfcomm-echo.c b/example/daemon/rfcomm-echo.c index 204906afb..88d2ea888 100644 --- a/example/daemon/rfcomm-echo.c +++ b/example/daemon/rfcomm-echo.c @@ -49,8 +49,8 @@ #include #include -#include -#include +#include "btstack.h" +#include "sdp_util.h" // input from command line arguments bd_addr_t addr = { }; diff --git a/example/daemon/rfcomm-test.c b/example/daemon/rfcomm-test.c index 8a45c2d8b..c8af14170 100644 --- a/example/daemon/rfcomm-test.c +++ b/example/daemon/rfcomm-test.c @@ -49,8 +49,8 @@ #include #include -#include -#include +#include "btstack.h" +#include "sdp_util.h" #define NUM_ROWS 25 #define NUM_COLS 80 diff --git a/example/daemon/test.c b/example/daemon/test.c index a42574abb..829983350 100644 --- a/example/daemon/test.c +++ b/example/daemon/test.c @@ -46,8 +46,8 @@ #include #include -#include -#include +#include "btstack.h" +#include "hci_cmds.h" // bd_addr_t addr = {0x00, 0x03, 0xc9, 0x3d, 0x77, 0x43 }; // Think Outside Keyboard // bd_addr_t addr = {0x00, 0x19, 0x1d, 0x90, 0x44, 0x68 }; // WiiMote diff --git a/example/embedded/Makefile.inc b/example/embedded/Makefile.inc index 1af9b5d74..4668a6c59 100644 --- a/example/embedded/Makefile.inc +++ b/example/embedded/Makefile.inc @@ -94,7 +94,7 @@ PAN_OBJ = $(PAN:.c=.o) default_target: all -${BTSTACK_ROOT}/include/btstack/version.h: +${BTSTACK_ROOT}/src/version.h: ${BTSTACK_ROOT}/tools/get_version.sh # compile .gatt descriptions @@ -168,7 +168,7 @@ gap_le_advertisements: ${CORE_OBJ} ${COMMON_OBJ} ad_parser.c gap_le_advertisemen clean: rm -f ${EXAMPLES} rm -f *.o *.out *.hex - rm -f ${BTSTACK_ROOT}/include/btstack/version.h + rm -f ${BTSTACK_ROOT}/src/version.h rm -f ancs_client.h profile.h spp_and_le_counter.h rm -rf *.dSYM rm -rf ${BTSTACK_ROOT}/ble/*.o diff --git a/example/embedded/ancs_client.c b/example/embedded/ancs_client.c index bb0fe866d..bc699501d 100644 --- a/example/embedded/ancs_client.c +++ b/example/embedded/ancs_client.c @@ -52,7 +52,7 @@ #include "btstack-config.h" -#include +#include "run_loop.h" #include "debug.h" #include "btstack_memory.h" diff --git a/example/embedded/gap_dedicated_bonding.c b/example/embedded/gap_dedicated_bonding.c index 895fcf51e..323fa9096 100644 --- a/example/embedded/gap_dedicated_bonding.c +++ b/example/embedded/gap_dedicated_bonding.c @@ -44,8 +44,8 @@ #include -#include -#include +#include "hci_cmds.h" +#include "run_loop.h" #include "hci.h" #include "gap.h" diff --git a/example/embedded/gap_inquiry.c b/example/embedded/gap_inquiry.c index ee6c03891..514dfbf02 100644 --- a/example/embedded/gap_inquiry.c +++ b/example/embedded/gap_inquiry.c @@ -55,8 +55,8 @@ #include "btstack-config.h" -#include -#include +#include "run_loop.h" +#include "sdp_util.h" #include "debug.h" #include "btstack_memory.h" diff --git a/example/embedded/gap_inquiry_and_bond.c b/example/embedded/gap_inquiry_and_bond.c index 9c4fbc1ce..7d0fcf154 100644 --- a/example/embedded/gap_inquiry_and_bond.c +++ b/example/embedded/gap_inquiry_and_bond.c @@ -48,8 +48,8 @@ #include "btstack-config.h" -#include -#include +#include "run_loop.h" +#include "sdp_util.h" #include "debug.h" #include "btstack_memory.h" diff --git a/example/embedded/gap_le_advertisements.c b/example/embedded/gap_le_advertisements.c index 786a319a6..d798e952e 100644 --- a/example/embedded/gap_le_advertisements.c +++ b/example/embedded/gap_le_advertisements.c @@ -50,7 +50,7 @@ #include #include -#include +#include "hci_cmds.h" #include "btstack_memory.h" #include "hci.h" diff --git a/example/embedded/gatt_battery_query.c b/example/embedded/gatt_battery_query.c index d7420a680..a8e6bb265 100644 --- a/example/embedded/gatt_battery_query.c +++ b/example/embedded/gatt_battery_query.c @@ -45,10 +45,10 @@ #include #include #include -#include -#include -#include -#include +#include "run_loop.h" +#include "hci_cmds.h" +#include "utils.h" +#include "sdp_util.h" #include "btstack-config.h" diff --git a/example/embedded/gatt_browser.c b/example/embedded/gatt_browser.c index a2efe3826..93f9554b6 100644 --- a/example/embedded/gatt_browser.c +++ b/example/embedded/gatt_browser.c @@ -55,10 +55,10 @@ #include #include #include -#include -#include -#include -#include +#include "run_loop.h" +#include "hci_cmds.h" +#include "utils.h" +#include "sdp_util.h" #include "btstack-config.h" diff --git a/example/embedded/le_counter.c b/example/embedded/le_counter.c index 6d19c2dee..fb6e62fab 100644 --- a/example/embedded/le_counter.c +++ b/example/embedded/le_counter.c @@ -52,8 +52,8 @@ #include "btstack-config.h" -#include -#include +#include "run_loop.h" +#include "sdp_util.h" #include "debug.h" #include "btstack_memory.h" diff --git a/example/embedded/le_streamer.c b/example/embedded/le_streamer.c index c1e4e18ae..64d6e8f99 100644 --- a/example/embedded/le_streamer.c +++ b/example/embedded/le_streamer.c @@ -56,8 +56,8 @@ #include "btstack-config.h" -#include -#include +#include "run_loop.h" +#include "sdp_util.h" #include "debug.h" #include "btstack_memory.h" diff --git a/example/embedded/led_counter.c b/example/embedded/led_counter.c index 215d9c4b1..6ef55399a 100644 --- a/example/embedded/led_counter.c +++ b/example/embedded/led_counter.c @@ -48,8 +48,8 @@ #include #include -#include -#include +#include "run_loop.h" +#include "hal_led.h" #define HEARTBEAT_PERIOD_MS 1000 diff --git a/example/embedded/panu_demo.c b/example/embedded/panu_demo.c index 9dfd62edc..98a5e926d 100644 --- a/example/embedded/panu_demo.c +++ b/example/embedded/panu_demo.c @@ -81,9 +81,9 @@ #include #endif -#include -#include -#include +#include "hci_cmds.h" +#include "run_loop.h" +#include "sdp_util.h" #include "hci.h" #include "btstack_memory.h" diff --git a/example/embedded/sdp_bnep_query.c b/example/embedded/sdp_bnep_query.c index f8ad9d33a..2437f7dc8 100644 --- a/example/embedded/sdp_bnep_query.c +++ b/example/embedded/sdp_bnep_query.c @@ -51,9 +51,9 @@ #include #include -#include -#include -#include +#include "hci_cmds.h" +#include "run_loop.h" +#include "sdp_util.h" #include "hci.h" #include "btstack_memory.h" diff --git a/example/embedded/sdp_general_query.c b/example/embedded/sdp_general_query.c index a15d7d346..7d47b6da9 100644 --- a/example/embedded/sdp_general_query.c +++ b/example/embedded/sdp_general_query.c @@ -54,8 +54,8 @@ #include "sdp_client.h" #include "sdp_query_util.h" -#include -#include +#include "hci_cmds.h" +#include "run_loop.h" #include "hci.h" #include "btstack_memory.h" diff --git a/example/embedded/sdp_rfcomm_query.c b/example/embedded/sdp_rfcomm_query.c index 3f83690bb..38166512b 100644 --- a/example/embedded/sdp_rfcomm_query.c +++ b/example/embedded/sdp_rfcomm_query.c @@ -49,8 +49,8 @@ #include -#include -#include +#include "hci_cmds.h" +#include "run_loop.h" #include "hci.h" #include "btstack_memory.h" diff --git a/example/embedded/spp_and_le_counter.c b/example/embedded/spp_and_le_counter.c index 653dc6e6b..a8398ea57 100644 --- a/example/embedded/spp_and_le_counter.c +++ b/example/embedded/spp_and_le_counter.c @@ -54,8 +54,8 @@ #include "btstack-config.h" -#include -#include +#include "run_loop.h" +#include "sdp_util.h" #include "debug.h" #include "btstack_memory.h" diff --git a/example/embedded/spp_counter.c b/example/embedded/spp_counter.c index 0024b2936..2b6569339 100644 --- a/example/embedded/spp_counter.c +++ b/example/embedded/spp_counter.c @@ -51,8 +51,8 @@ #include "btstack-config.h" -#include -#include +#include "run_loop.h" +#include "sdp_util.h" #include "debug.h" #include "btstack_memory.h" diff --git a/example/embedded/spp_flowcontrol.c b/example/embedded/spp_flowcontrol.c index bc46eeb66..741ee30e3 100644 --- a/example/embedded/spp_flowcontrol.c +++ b/example/embedded/spp_flowcontrol.c @@ -49,9 +49,9 @@ #include #include -#include -#include -#include +#include "hci_cmds.h" +#include "run_loop.h" +#include "sdp_util.h" #include "hci.h" #include "l2cap.h" diff --git a/example/embedded/spp_streamer.c b/example/embedded/spp_streamer.c index 0ef3e9819..d41bf9b32 100644 --- a/example/embedded/spp_streamer.c +++ b/example/embedded/spp_streamer.c @@ -49,8 +49,8 @@ #include -#include -#include +#include "hci_cmds.h" +#include "run_loop.h" #include "hci.h" #include "btstack_memory.h" diff --git a/include/btstack/.gitignore b/include/btstack/.gitignore deleted file mode 100644 index 67020331b..000000000 --- a/include/btstack/.gitignore +++ /dev/null @@ -1 +0,0 @@ -version.h diff --git a/platforms/arduino/BTstack.cpp b/platforms/arduino/BTstack.cpp index 85dd855aa..bacd8b24c 100644 --- a/platforms/arduino/BTstack.cpp +++ b/platforms/arduino/BTstack.cpp @@ -16,12 +16,12 @@ #include "BTstack.h" #include "btstack_memory.h" -#include "btstack/hal_tick.h" -#include "btstack/hal_cpu.h" -#include "btstack/hci_cmds.h" -#include -#include -#include +#include "hal_tick.h" +#include "hal_cpu.h" +#include "hci_cmds.h" +#include "utils.h" +#include "run_loop.h" +#include "sdp_util.h" #include "bt_control_em9301.h" #include "hci.h" diff --git a/platforms/arduino/BTstack.h b/platforms/arduino/BTstack.h index a87cd88a4..1ba03df36 100644 --- a/platforms/arduino/BTstack.h +++ b/platforms/arduino/BTstack.h @@ -4,7 +4,7 @@ #pragma once #include "att.h" -#include +#include "utils.h" #include "gatt_client.h" #include "hci.h" #include diff --git a/platforms/arduino/Makefile b/platforms/arduino/Makefile index 88774d4ce..f02ce2a35 100644 --- a/platforms/arduino/Makefile +++ b/platforms/arduino/Makefile @@ -5,7 +5,7 @@ DIR=. BTSTACK_ROOT=${DIR}/../.. DUMMY=$(shell ) -VERSION=`sed -n -e 's/^.*BTSTACK_VERSION \"\(.*\)\"/\1/p' ${BTSTACK_ROOT}/include/btstack/version.h` +VERSION=`sed -n -e 's/^.*BTSTACK_VERSION \"\(.*\)\"/\1/p' ${BTSTACK_ROOT}/src/version.h` BTSTACK_PACKAGE=/tmp/btstack ARCHIVE=btstack-arduino-${VERSION}.zip diff --git a/platforms/arduino/bsp_arduino_em9301.cpp b/platforms/arduino/bsp_arduino_em9301.cpp index 690c0d67e..e135b3980 100644 --- a/platforms/arduino/bsp_arduino_em9301.cpp +++ b/platforms/arduino/bsp_arduino_em9301.cpp @@ -12,7 +12,7 @@ #endif #include -#include "btstack/hal_uart_dma.h" +#include "hal_uart_dma.h" #define HAVE_SHUTDOWN diff --git a/platforms/cocoa/run_loop_cocoa.m b/platforms/cocoa/run_loop_cocoa.m index 6adf8d75e..4c7750519 100644 --- a/platforms/cocoa/run_loop_cocoa.m +++ b/platforms/cocoa/run_loop_cocoa.m @@ -40,9 +40,9 @@ * Created by Matthias Ringwald on 8/2/09. */ -#include +#include "btstack.h" -#include +#include "run_loop.h" #include "run_loop_private.h" #include "debug.h" diff --git a/platforms/daemon/src/btstack.c b/platforms/daemon/src/btstack.c index 20b455c35..189e1f9ae 100644 --- a/platforms/daemon/src/btstack.c +++ b/platforms/daemon/src/btstack.c @@ -43,11 +43,11 @@ * BTstack client API */ -#include +#include "btstack.h" #include "l2cap.h" #include "socket_connection.h" -#include +#include "run_loop.h" #include #include diff --git a/platforms/daemon/src/daemon.c b/platforms/daemon/src/daemon.c index daaa58424..23fd29db9 100644 --- a/platforms/daemon/src/daemon.c +++ b/platforms/daemon/src/daemon.c @@ -55,11 +55,11 @@ #include -#include -#include -#include -#include -#include +#include "btstack.h" +#include "linked_list.h" +#include "run_loop.h" +#include "hci_cmds.h" +#include "version.h" #include "debug.h" #include "hci.h" diff --git a/platforms/daemon/src/socket_connection.c b/platforms/daemon/src/socket_connection.c index c04b53859..74f779739 100644 --- a/platforms/daemon/src/socket_connection.c +++ b/platforms/daemon/src/socket_connection.c @@ -51,7 +51,7 @@ #include "btstack-config.h" -#include +#include "btstack.h" #include #include diff --git a/platforms/daemon/src/socket_connection.h b/platforms/daemon/src/socket_connection.h index d55833384..0df59ece7 100644 --- a/platforms/daemon/src/socket_connection.h +++ b/platforms/daemon/src/socket_connection.h @@ -45,7 +45,7 @@ #ifndef __SOCKET_CONNECTION_H #define __SOCKET_CONNECTION_H -#include +#include "run_loop.h" #include diff --git a/platforms/ez430-rf2560/example/ant-test.c b/platforms/ez430-rf2560/example/ant-test.c index c2b2671f4..46299734a 100644 --- a/platforms/ez430-rf2560/example/ant-test.c +++ b/platforms/ez430-rf2560/example/ant-test.c @@ -57,10 +57,10 @@ #include "hal_usb.h" #include -#include -#include -#include -#include +#include "hci_cmds.h" +#include "run_loop.h" +#include "sdp_util.h" +#include "utils.h" #include "hci.h" #include "l2cap.h" diff --git a/platforms/ez430-rf2560/example/spp_accel.c b/platforms/ez430-rf2560/example/spp_accel.c index 6d7761742..5e2fdcfc2 100644 --- a/platforms/ez430-rf2560/example/spp_accel.c +++ b/platforms/ez430-rf2560/example/spp_accel.c @@ -54,9 +54,9 @@ #include "hal_compat.h" #include "hal_usb.h" -#include -#include -#include +#include "hci_cmds.h" +#include "run_loop.h" +#include "sdp_util.h" #include "hci.h" #include "l2cap.h" diff --git a/platforms/ez430-rf2560/src/hal_cpu.c b/platforms/ez430-rf2560/src/hal_cpu.c index 9433628bc..5c88a3173 100644 --- a/platforms/ez430-rf2560/src/hal_cpu.c +++ b/platforms/ez430-rf2560/src/hal_cpu.c @@ -43,7 +43,7 @@ * */ -#include +#include "hal_cpu.h" #include "hal_board.h" #include "hal_compat.h" diff --git a/platforms/ez430-rf2560/src/hal_tick.c b/platforms/ez430-rf2560/src/hal_tick.c index ef295ab62..6e6ab950f 100644 --- a/platforms/ez430-rf2560/src/hal_tick.c +++ b/platforms/ez430-rf2560/src/hal_tick.c @@ -47,7 +47,7 @@ #include #include "hal_compat.h" -#include +#include "hal_tick.h" static void dummy_handler(void){}; diff --git a/platforms/ez430-rf2560/src/hal_uart_dma.c b/platforms/ez430-rf2560/src/hal_uart_dma.c index af97fb624..9147312b4 100755 --- a/platforms/ez430-rf2560/src/hal_uart_dma.c +++ b/platforms/ez430-rf2560/src/hal_uart_dma.c @@ -43,7 +43,7 @@ #include #include "hal_compat.h" -#include +#include "hal_uart_dma.h" extern void hal_cpu_set_uart_needed_during_sleep(uint8_t enabled); diff --git a/platforms/ez430-rf2560/src/main.c b/platforms/ez430-rf2560/src/main.c index e328c3785..3e38efb04 100644 --- a/platforms/ez430-rf2560/src/main.c +++ b/platforms/ez430-rf2560/src/main.c @@ -55,8 +55,8 @@ #include "hal_compat.h" #include "hal_usb.h" -#include -#include +#include "hci_cmds.h" +#include "run_loop.h" #include "hci.h" #include "btstack_memory.h" diff --git a/platforms/ios/CocoaTouch/include/BTstack/BTDevice.h b/platforms/ios/CocoaTouch/include/BTstack/BTDevice.h index a679b1847..d22ac5a2b 100644 --- a/platforms/ios/CocoaTouch/include/BTstack/BTDevice.h +++ b/platforms/ios/CocoaTouch/include/BTstack/BTDevice.h @@ -36,7 +36,7 @@ // #import -#include +#include "utils.h" #define kCODHID 0x2540 #define kCODZeeMote 0x584 diff --git a/platforms/ios/CocoaTouch/include/BTstack/BTInquiryViewController.h b/platforms/ios/CocoaTouch/include/BTstack/BTInquiryViewController.h index bf43de66f..04d406d1e 100644 --- a/platforms/ios/CocoaTouch/include/BTstack/BTInquiryViewController.h +++ b/platforms/ios/CocoaTouch/include/BTstack/BTInquiryViewController.h @@ -37,7 +37,7 @@ #import -#include // for HCI_STATE +#include "hci_cmds.h" // for HCI_STATE #define PREFS_REMOTE_NAME @"RemoteName" #define PREFS_LINK_KEY @"LinkKey" diff --git a/platforms/ios/CocoaTouch/src/BTInquiryViewController.m b/platforms/ios/CocoaTouch/src/BTInquiryViewController.m index 5b667bc8f..772a3bad0 100644 --- a/platforms/ios/CocoaTouch/src/BTInquiryViewController.m +++ b/platforms/ios/CocoaTouch/src/BTInquiryViewController.m @@ -38,7 +38,7 @@ #import #import -#include +#include "btstack.h" #include #define INQUIRY_INTERVAL 3 diff --git a/platforms/ios/CocoaTouch/src/BTstackCocoaAppDelegate.m b/platforms/ios/CocoaTouch/src/BTstackCocoaAppDelegate.m index 62157ea43..c2189e4e7 100644 --- a/platforms/ios/CocoaTouch/src/BTstackCocoaAppDelegate.m +++ b/platforms/ios/CocoaTouch/src/BTstackCocoaAppDelegate.m @@ -44,9 +44,9 @@ #include #include -#include -#include -#include +#include "btstack.h" +#include "run_loop.h" +#include "hci_cmds.h" void packet_handler(uint8_t packet_type, uint16_t channel, uint8_t *packet, uint16_t size){ } diff --git a/platforms/libusb/Makefile b/platforms/libusb/Makefile index d78837393..c8cd68f28 100644 --- a/platforms/libusb/Makefile +++ b/platforms/libusb/Makefile @@ -26,4 +26,4 @@ CFLAGS += $(shell pkg-config libusb-1.0 --cflags) LDFLAGS += $(shell pkg-config libusb-1.0 --libs) endif -all: ${BTSTACK_ROOT}/include/btstack/version.h ${EXAMPLES} +all: ${BTSTACK_ROOT}/src/version.h ${EXAMPLES} diff --git a/platforms/libusb/main.c b/platforms/libusb/main.c index cb6c4df6b..b54e222c6 100644 --- a/platforms/libusb/main.c +++ b/platforms/libusb/main.c @@ -49,8 +49,8 @@ #include "btstack-config.h" -#include -#include +#include "run_loop.h" +#include "hal_led.h" #include "debug.h" #include "btstack_memory.h" diff --git a/platforms/msp-exp430f5438-cc2564b/example/ant-test.c b/platforms/msp-exp430f5438-cc2564b/example/ant-test.c index a12a9569d..9683c38ff 100644 --- a/platforms/msp-exp430f5438-cc2564b/example/ant-test.c +++ b/platforms/msp-exp430f5438-cc2564b/example/ant-test.c @@ -57,10 +57,10 @@ #include "hal_usb.h" #include -#include -#include -#include -#include +#include "hci_cmds.h" +#include "run_loop.h" +#include "sdp_util.h" +#include "utils.h" #include "hci.h" #include "l2cap.h" diff --git a/platforms/msp-exp430f5438-cc2564b/example/ble_server.c b/platforms/msp-exp430f5438-cc2564b/example/ble_server.c index 4061e64d7..acb32625d 100644 --- a/platforms/msp-exp430f5438-cc2564b/example/ble_server.c +++ b/platforms/msp-exp430f5438-cc2564b/example/ble_server.c @@ -65,7 +65,7 @@ #include "hal_usb.h" #include "UserExperienceGraphics.h" -#include +#include "run_loop.h" #include "btstack_memory.h" #include "bt_control_cc256x.h" diff --git a/platforms/msp-exp430f5438-cc2564b/example/hid_demo.c b/platforms/msp-exp430f5438-cc2564b/example/hid_demo.c index 971f46bbf..70c94b652 100644 --- a/platforms/msp-exp430f5438-cc2564b/example/hid_demo.c +++ b/platforms/msp-exp430f5438-cc2564b/example/hid_demo.c @@ -54,8 +54,8 @@ #include "UserExperienceGraphics.h" #include -#include -#include +#include "run_loop.h" +#include "hci_cmds.h" #include "btstack_memory.h" #include "hci.h" #include "l2cap.h" diff --git a/platforms/msp-exp430f5438-cc2564b/example/spp_accel.c b/platforms/msp-exp430f5438-cc2564b/example/spp_accel.c index a57da25d2..a4815019f 100644 --- a/platforms/msp-exp430f5438-cc2564b/example/spp_accel.c +++ b/platforms/msp-exp430f5438-cc2564b/example/spp_accel.c @@ -54,9 +54,9 @@ #include "hal_compat.h" #include "hal_usb.h" -#include -#include -#include +#include "hci_cmds.h" +#include "run_loop.h" +#include "sdp_util.h" #include "hci.h" #include "l2cap.h" diff --git a/platforms/msp-exp430f5438-cc2564b/src/hal_cpu.c b/platforms/msp-exp430f5438-cc2564b/src/hal_cpu.c index 9433628bc..5c88a3173 100644 --- a/platforms/msp-exp430f5438-cc2564b/src/hal_cpu.c +++ b/platforms/msp-exp430f5438-cc2564b/src/hal_cpu.c @@ -43,7 +43,7 @@ * */ -#include +#include "hal_cpu.h" #include "hal_board.h" #include "hal_compat.h" diff --git a/platforms/msp-exp430f5438-cc2564b/src/hal_tick.c b/platforms/msp-exp430f5438-cc2564b/src/hal_tick.c index ef295ab62..6e6ab950f 100644 --- a/platforms/msp-exp430f5438-cc2564b/src/hal_tick.c +++ b/platforms/msp-exp430f5438-cc2564b/src/hal_tick.c @@ -47,7 +47,7 @@ #include #include "hal_compat.h" -#include +#include "hal_tick.h" static void dummy_handler(void){}; diff --git a/platforms/msp-exp430f5438-cc2564b/src/hal_uart_dma.c b/platforms/msp-exp430f5438-cc2564b/src/hal_uart_dma.c index de7dc559d..9d336e4d1 100755 --- a/platforms/msp-exp430f5438-cc2564b/src/hal_uart_dma.c +++ b/platforms/msp-exp430f5438-cc2564b/src/hal_uart_dma.c @@ -43,7 +43,7 @@ #include #include "hal_compat.h" -#include +#include "hal_uart_dma.h" extern void hal_cpu_set_uart_needed_during_sleep(uint8_t enabled); diff --git a/platforms/msp-exp430f5438-cc2564b/src/main.c b/platforms/msp-exp430f5438-cc2564b/src/main.c index 83c25a679..0a78b2c88 100644 --- a/platforms/msp-exp430f5438-cc2564b/src/main.c +++ b/platforms/msp-exp430f5438-cc2564b/src/main.c @@ -55,7 +55,7 @@ #include "hal_compat.h" #include "hal_usb.h" -#include +#include "run_loop.h" #include "hci.h" #include "btstack_memory.h" diff --git a/platforms/msp430/hal_led.c b/platforms/msp430/hal_led.c index eb8d3532b..48769d0bf 100644 --- a/platforms/msp430/hal_led.c +++ b/platforms/msp430/hal_led.c @@ -1,4 +1,4 @@ -#include +#include "hal_led.h" #include "hal_board.h" #include diff --git a/platforms/msp430f5229lp-cc2564b/example/ble_server.c b/platforms/msp430f5229lp-cc2564b/example/ble_server.c index 1caeb676f..8703fe3ec 100644 --- a/platforms/msp430f5229lp-cc2564b/example/ble_server.c +++ b/platforms/msp430f5229lp-cc2564b/example/ble_server.c @@ -63,7 +63,7 @@ #include "hal_usb.h" #include "hal_usb.h" -#include +#include "run_loop.h" #include "btstack_memory.h" #include "bt_control_cc256x.h" diff --git a/platforms/msp430f5229lp-cc2564b/src/hal_cpu.c b/platforms/msp430f5229lp-cc2564b/src/hal_cpu.c index 7e440f862..72323634c 100644 --- a/platforms/msp430f5229lp-cc2564b/src/hal_cpu.c +++ b/platforms/msp430f5229lp-cc2564b/src/hal_cpu.c @@ -43,7 +43,7 @@ * */ -#include +#include "hal_cpu.h" #include "hal_board.h" #include "hal_compat.h" diff --git a/platforms/msp430f5229lp-cc2564b/src/hal_tick.c b/platforms/msp430f5229lp-cc2564b/src/hal_tick.c index 3d145240e..bbdd51686 100644 --- a/platforms/msp430f5229lp-cc2564b/src/hal_tick.c +++ b/platforms/msp430f5229lp-cc2564b/src/hal_tick.c @@ -47,7 +47,7 @@ #include #include "hal_compat.h" -#include +#include "hal_tick.h" static void dummy_handler(void){}; diff --git a/platforms/msp430f5229lp-cc2564b/src/hal_uart_dma.c b/platforms/msp430f5229lp-cc2564b/src/hal_uart_dma.c index 2cf485fe3..4d7a630d8 100755 --- a/platforms/msp430f5229lp-cc2564b/src/hal_uart_dma.c +++ b/platforms/msp430f5229lp-cc2564b/src/hal_uart_dma.c @@ -43,7 +43,7 @@ #include #include "hal_compat.h" -#include +#include "hal_uart_dma.h" extern void hal_cpu_set_uart_needed_during_sleep(uint8_t enabled); diff --git a/platforms/msp430f5229lp-cc2564b/src/main.c b/platforms/msp430f5229lp-cc2564b/src/main.c index 1d52fbc49..c9bd11548 100644 --- a/platforms/msp430f5229lp-cc2564b/src/main.c +++ b/platforms/msp430f5229lp-cc2564b/src/main.c @@ -53,9 +53,9 @@ #include "hal_compat.h" #include "hal_usb.h" -#include -#include -#include +#include "run_loop.h" +#include "hal_tick.h" +#include "hal_cpu.h" #include "hci.h" #include "hci_dump.h" diff --git a/platforms/mtk/Makefile b/platforms/mtk/Makefile index 402a6791f..9ed55106e 100644 --- a/platforms/mtk/Makefile +++ b/platforms/mtk/Makefile @@ -82,7 +82,7 @@ shell: version: $(BTSTACK_ROOT)/tools/get_version.sh - grep BTSTACK_DATE $(BTSTACK_ROOT)/include/btstack/version.h + grep BTSTACK_DATE $(BTSTACK_ROOT)/src/version.h BTstackDaemon: $(BTdaemon_OBJS) libbluetoothdrv.so $(GCC) $(LDFLAGS) -o $@ libbluetoothdrv.so $^ diff --git a/platforms/mtk/package.sh b/platforms/mtk/package.sh index 94fc3d9b4..54e6d61df 100755 --- a/platforms/mtk/package.sh +++ b/platforms/mtk/package.sh @@ -19,7 +19,7 @@ popd pushd . cd $DIR/../.. -VERSION=`sed -n -e 's/^.*BTSTACK_VERSION \"\(.*\)\"/\1/p' include/btstack/version.h` +VERSION=`sed -n -e 's/^.*BTSTACK_VERSION \"\(.*\)\"/\1/p' src/version.h` ARCHIVE=btstack-android-mtk-$VERSION.tar.gz echo "Create Archive $ARCHIVE" rm -f $ARCHIVE diff --git a/platforms/pic32-harmony/src/btstack_port.c b/platforms/pic32-harmony/src/btstack_port.c index 117ef4e08..c8d9293bb 100644 --- a/platforms/pic32-harmony/src/btstack_port.c +++ b/platforms/pic32-harmony/src/btstack_port.c @@ -5,7 +5,7 @@ #include "btstack_port.h" #include "system_config.h" #include "bt_control_csr.h" -#include +#include "run_loop.h" #include "hci_dump.h" #include "hci.h" #include "hci_transport.h" @@ -25,7 +25,7 @@ int btstack_main(int argc, const char * argv[]); /// HAL Tick /// -#include +#include "hal_tick.h" #define APP_TMR_ALARM_PERIOD 48825 #define APP_LED_PORT PORT_CHANNEL_A @@ -85,7 +85,7 @@ static void msleep(uint32_t delay) { } /// HAL CPU /// -#include +#include "hal_cpu.h" void hal_cpu_disable_irqs(void){ // TODO implement @@ -101,7 +101,7 @@ void hal_cpu_enable_irqs_and_sleep(void){ /// HAL UART DMA /// -#include +#include "hal_uart_dma.h" // handlers static void (*rx_done_handler)(void) = dummy_handler; diff --git a/platforms/posix-cc2564b/Makefile b/platforms/posix-cc2564b/Makefile index 9b9791495..bd5e3a242 100644 --- a/platforms/posix-cc2564b/Makefile +++ b/platforms/posix-cc2564b/Makefile @@ -37,4 +37,4 @@ EXAMPLES += ${EXAMPLES_CLI} CFLAGS += -I${POSIX_ROOT}/src endif -all: ${BTSTACK_ROOT}/include/btstack/version.h ${EXAMPLES} +all: ${BTSTACK_ROOT}/src/version.h ${EXAMPLES} diff --git a/platforms/posix-cc2564b/main.c b/platforms/posix-cc2564b/main.c index d15d0b0e4..bbb5df6bc 100644 --- a/platforms/posix-cc2564b/main.c +++ b/platforms/posix-cc2564b/main.c @@ -49,7 +49,7 @@ #include "btstack-config.h" -#include +#include "run_loop.h" #include "debug.h" #include "btstack_memory.h" diff --git a/platforms/posix-stlc2500d/Makefile b/platforms/posix-stlc2500d/Makefile index b2b687015..ca1f3c15d 100644 --- a/platforms/posix-stlc2500d/Makefile +++ b/platforms/posix-stlc2500d/Makefile @@ -38,4 +38,4 @@ endif # no BLE here EXAMPLES:= $(filter-out ${EXAMPLES_USING_LE},$(EXAMPLES)) -all: ${BTSTACK_ROOT}/include/btstack/version.h ${EXAMPLES} +all: ${BTSTACK_ROOT}/src/version.h ${EXAMPLES} diff --git a/platforms/posix-stlc2500d/main.c b/platforms/posix-stlc2500d/main.c index 404c040ab..7ce32958a 100644 --- a/platforms/posix-stlc2500d/main.c +++ b/platforms/posix-stlc2500d/main.c @@ -49,7 +49,7 @@ #include "btstack-config.h" -#include +#include "run_loop.h" #include "debug.h" #include "btstack_memory.h" diff --git a/platforms/posix-wl183x/Makefile b/platforms/posix-wl183x/Makefile index c788c509a..267fa53a2 100644 --- a/platforms/posix-wl183x/Makefile +++ b/platforms/posix-wl183x/Makefile @@ -37,4 +37,4 @@ EXAMPLES += ${EXAMPLES_CLI} CFLAGS += -I${POSIX_ROOT}/src endif -all: ${BTSTACK_ROOT}/include/btstack/version.h ${EXAMPLES} +all: ${BTSTACK_ROOT}/src/version.h ${EXAMPLES} diff --git a/platforms/posix-wl183x/main.c b/platforms/posix-wl183x/main.c index d15d0b0e4..bbb5df6bc 100644 --- a/platforms/posix-wl183x/main.c +++ b/platforms/posix-wl183x/main.c @@ -49,7 +49,7 @@ #include "btstack-config.h" -#include +#include "run_loop.h" #include "debug.h" #include "btstack_memory.h" diff --git a/platforms/posix/src/remote_device_db_fs.c b/platforms/posix/src/remote_device_db_fs.c index 521044689..c4aaa5a9b 100644 --- a/platforms/posix/src/remote_device_db_fs.c +++ b/platforms/posix/src/remote_device_db_fs.c @@ -43,7 +43,7 @@ #include "remote_device_db.h" #include "debug.h" -#include +#include "utils.h" #define LINK_KEY_PATH "/tmp/" #define LINK_KEY_PREFIX "btstack_link_key_" diff --git a/platforms/posix/src/run_loop_posix.c b/platforms/posix/src/run_loop_posix.c index 30e04b163..5a7ce52e0 100644 --- a/platforms/posix/src/run_loop_posix.c +++ b/platforms/posix/src/run_loop_posix.c @@ -41,8 +41,8 @@ * Created by Matthias Ringwald on 6/6/09. */ -#include -#include +#include "run_loop.h" +#include "linked_list.h" #include "debug.h" #include "run_loop_private.h" diff --git a/platforms/posix/src/stdin_support.c b/platforms/posix/src/stdin_support.c index 0f0e26f16..8b55e2627 100644 --- a/platforms/posix/src/stdin_support.c +++ b/platforms/posix/src/stdin_support.c @@ -37,7 +37,7 @@ #include #include -#include +#include "run_loop.h" #include #include "stdin_support.h" diff --git a/platforms/posix/src/stdin_support.h b/platforms/posix/src/stdin_support.h index 43996c87d..89652df23 100644 --- a/platforms/posix/src/stdin_support.h +++ b/platforms/posix/src/stdin_support.h @@ -38,7 +38,7 @@ #ifndef __STDIN_SUPPORT_H #define __STDIN_SUPPORT_H -#include +#include "run_loop.h" #if defined __cplusplus extern "C" { diff --git a/platforms/stm32-f103rb-nucleo/main.c b/platforms/stm32-f103rb-nucleo/main.c index db82ce355..4c5881d62 100644 --- a/platforms/stm32-f103rb-nucleo/main.c +++ b/platforms/stm32-f103rb-nucleo/main.c @@ -48,7 +48,7 @@ #include #include -#include +#include "run_loop.h" #include "hci.h" #include "bt_control_cc256x.h" #include "btstack_memory.h" @@ -80,7 +80,7 @@ void btstack_main(void); static void bluetooth_power_cycle(void); // hal_tick.h inmplementation -#include +#include "hal_tick.h" static void dummy_handler(void); static void (*tick_handler)(void) = &dummy_handler; @@ -117,7 +117,7 @@ static void msleep(uint32_t delay) { } // hal_led.h implementation -#include +#include "hal_led.h" void hal_led_off(void); void hal_led_on(void); @@ -132,7 +132,7 @@ void hal_led_toggle(void){ } // hal_cpu.h implementation -#include +#include "hal_cpu.h" void hal_cpu_disable_irqs(void){ __disable_irq(); @@ -152,7 +152,7 @@ void hal_cpu_enable_irqs_and_sleep(void){ } // hal_uart_dma.c implementation -#include +#include "hal_uart_dma.h" // handlers static void (*rx_done_handler)(void) = dummy_handler; diff --git a/include/btstack/ant_cmds.h b/src/ant_cmds.h similarity index 99% rename from include/btstack/ant_cmds.h rename to src/ant_cmds.h index 9362e5992..d850fb77a 100644 --- a/include/btstack/ant_cmds.h +++ b/src/ant_cmds.h @@ -39,7 +39,7 @@ #define __ANT_CMDS_H #include -#include +#include "hci_cmds.h" #if defined __cplusplus extern "C" { diff --git a/src/bnep.c b/src/bnep.c index e0a3e17e9..433621e1b 100644 --- a/src/bnep.c +++ b/src/bnep.c @@ -46,10 +46,10 @@ #include // memcpy #include -#include -#include -#include -#include +#include "btstack.h" +#include "hci_cmds.h" +#include "utils.h" +#include "sdp_util.h" #include "btstack_memory.h" #include "hci.h" diff --git a/src/bnep.h b/src/bnep.h index 74368ed45..058ed1a5c 100644 --- a/src/bnep.h +++ b/src/bnep.h @@ -44,8 +44,7 @@ #ifndef __BNEP_H #define __BNEP_H -#include -#include +#include "utils.h" #include diff --git a/src/bt_control.h b/src/bt_control.h index b56893a35..dfc5f072c 100644 --- a/src/bt_control.h +++ b/src/bt_control.h @@ -48,7 +48,7 @@ #define __BT_CONTROL_H #include -#include +#include "utils.h" #if defined __cplusplus extern "C" { diff --git a/include/btstack/btstack.h b/src/btstack.h similarity index 97% rename from include/btstack/btstack.h rename to src/btstack.h index 2ccc9be29..b64e1e09a 100644 --- a/include/btstack/btstack.h +++ b/src/btstack.h @@ -47,9 +47,9 @@ #ifndef __BTSTACK_H #define __BTSTACK_H -#include -#include -#include +#include "hci_cmds.h" +#include "run_loop.h" +#include "utils.h" #include "btstack-config.h" diff --git a/include/btstack/hal_cpu.h b/src/hal_cpu.h similarity index 100% rename from include/btstack/hal_cpu.h rename to src/hal_cpu.h diff --git a/include/btstack/hal_led.h b/src/hal_led.h similarity index 100% rename from include/btstack/hal_led.h rename to src/hal_led.h diff --git a/include/btstack/hal_tick.h b/src/hal_tick.h similarity index 100% rename from include/btstack/hal_tick.h rename to src/hal_tick.h diff --git a/include/btstack/hal_time_ms.h b/src/hal_time_ms.h similarity index 100% rename from include/btstack/hal_time_ms.h rename to src/hal_time_ms.h diff --git a/include/btstack/hal_uart_dma.h b/src/hal_uart_dma.h similarity index 100% rename from include/btstack/hal_uart_dma.h rename to src/hal_uart_dma.h diff --git a/src/hci.c b/src/hci.c index 537ef1acb..9f2aab622 100644 --- a/src/hci.c +++ b/src/hci.c @@ -62,15 +62,15 @@ #else #include // gethostbyname #endif -#include +#include "version.h" #endif #include "btstack_memory.h" #include "debug.h" #include "hci_dump.h" -#include -#include +#include "linked_list.h" +#include "hci_cmds.h" #define HCI_CONNECTION_TIMEOUT_MS 10000 diff --git a/src/hci.h b/src/hci.h index 7e0f82cdd..6139b7e73 100644 --- a/src/hci.h +++ b/src/hci.h @@ -47,8 +47,8 @@ #include "btstack-config.h" -#include -#include +#include "hci_cmds.h" +#include "utils.h" #include "hci_transport.h" #include "bt_control.h" #include "remote_device_db.h" @@ -56,7 +56,7 @@ #include #include #include -#include +#include "linked_list.h" #if defined __cplusplus extern "C" { diff --git a/src/hci_cmds.c b/src/hci_cmds.c index 23d162251..8292b2ff8 100644 --- a/src/hci_cmds.c +++ b/src/hci_cmds.c @@ -41,11 +41,11 @@ * Created by Matthias Ringwald on 7/23/09. */ -#include +#include "hci_cmds.h" #include -#include +#include "sdp_util.h" #include "btstack-config.h" #include "hci.h" diff --git a/include/btstack/hci_cmds.h b/src/hci_cmds.h similarity index 100% rename from include/btstack/hci_cmds.h rename to src/hci_cmds.h diff --git a/src/hci_dump.c b/src/hci_dump.c index b7c9527e2..e1341e39e 100644 --- a/src/hci_dump.c +++ b/src/hci_dump.c @@ -52,8 +52,8 @@ #include "hci_dump.h" #include "hci.h" #include "hci_transport.h" -#include -#include +#include "hci_cmds.h" +#include "run_loop.h" #include #ifndef EMBEDDED diff --git a/src/hci_transport.h b/src/hci_transport.h index d67481bd7..90173dd08 100644 --- a/src/hci_transport.h +++ b/src/hci_transport.h @@ -47,7 +47,7 @@ #define __HCI_TRANSPORT_H #include -#include +#include "run_loop.h" #if defined __cplusplus extern "C" { diff --git a/src/hci_transport_h4_dma.c b/src/hci_transport_h4_dma.c index dcf9bc250..6bad0b681 100644 --- a/src/hci_transport_h4_dma.c +++ b/src/hci_transport_h4_dma.c @@ -49,9 +49,9 @@ #include "debug.h" #include "hci.h" #include "hci_transport.h" -#include +#include "run_loop.h" -#include +#include "hal_uart_dma.h" typedef enum { H4_W4_PACKET_TYPE = 1, diff --git a/src/hci_transport_h4_ehcill_dma.c b/src/hci_transport_h4_ehcill_dma.c index 96a8ca778..32bdd4142 100644 --- a/src/hci_transport_h4_ehcill_dma.c +++ b/src/hci_transport_h4_ehcill_dma.c @@ -54,9 +54,9 @@ #include "debug.h" #include "hci.h" #include "hci_transport.h" -#include +#include "run_loop.h" -#include +#include "hal_uart_dma.h" // #include // #define GPIO_DEBUG_0 GPIO1 diff --git a/src/hfp.c b/src/hfp.c index 83f2f4c4f..3e367bb75 100644 --- a/src/hfp.c +++ b/src/hfp.c @@ -49,8 +49,8 @@ #include #include -#include -#include +#include "hci_cmds.h" +#include "run_loop.h" #include "hci.h" #include "btstack_memory.h" diff --git a/src/hfp_ag.c b/src/hfp_ag.c index 5cdf1b71d..75e6debc3 100644 --- a/src/hfp_ag.c +++ b/src/hfp_ag.c @@ -48,8 +48,8 @@ #include #include -#include -#include +#include "hci_cmds.h" +#include "run_loop.h" #include "hci.h" #include "btstack_memory.h" diff --git a/src/hfp_hf.c b/src/hfp_hf.c index c6aec3bfe..16ff47d40 100644 --- a/src/hfp_hf.c +++ b/src/hfp_hf.c @@ -48,8 +48,8 @@ #include #include -#include -#include +#include "hci_cmds.h" +#include "run_loop.h" #include "hci.h" #include "btstack_memory.h" diff --git a/src/hsp_ag.c b/src/hsp_ag.c index 4f0934c88..d59ec79bb 100644 --- a/src/hsp_ag.c +++ b/src/hsp_ag.c @@ -48,8 +48,8 @@ #include #include -#include -#include +#include "hci_cmds.h" +#include "run_loop.h" #include "hci.h" #include "btstack_memory.h" diff --git a/src/hsp_hs.c b/src/hsp_hs.c index 5843f7164..c2e701854 100644 --- a/src/hsp_hs.c +++ b/src/hsp_hs.c @@ -48,8 +48,8 @@ #include #include -#include -#include +#include "hci_cmds.h" +#include "run_loop.h" #include "hci.h" #include "btstack_memory.h" diff --git a/src/l2cap.h b/src/l2cap.h index bd2419b25..97f69f0de 100644 --- a/src/l2cap.h +++ b/src/l2cap.h @@ -48,8 +48,8 @@ #include "hci.h" #include "l2cap_signaling.h" -#include -#include +#include "utils.h" +#include "btstack.h" #if defined __cplusplus extern "C" { diff --git a/src/l2cap_signaling.h b/src/l2cap_signaling.h index 9106fb084..4e9d4feb2 100644 --- a/src/l2cap_signaling.h +++ b/src/l2cap_signaling.h @@ -46,8 +46,8 @@ #include #include -#include -#include +#include "utils.h" +#include "hci_cmds.h" #if defined __cplusplus extern "C" { diff --git a/src/linked_list.c b/src/linked_list.c index 7479239f2..aea4911a4 100644 --- a/src/linked_list.c +++ b/src/linked_list.c @@ -41,7 +41,7 @@ * Created by Matthias Ringwald on 7/13/09. */ -#include +#include "linked_list.h" #include #include diff --git a/include/btstack/linked_list.h b/src/linked_list.h similarity index 100% rename from include/btstack/linked_list.h rename to src/linked_list.h diff --git a/include/btstack/memory_pool.h b/src/memory_pool.h similarity index 100% rename from include/btstack/memory_pool.h rename to src/memory_pool.h diff --git a/src/pan.c b/src/pan.c index 6833b7251..33ab7d123 100644 --- a/src/pan.c +++ b/src/pan.c @@ -46,8 +46,8 @@ #include #include -#include -#include +#include "sdp_util.h" +#include "hci_cmds.h" static const char default_panu_service_name[] = "Personal Ad-hoc User Service"; static const char default_panu_service_desc[] = "Personal Ad-hoc User Service"; diff --git a/src/remote_device_db.h b/src/remote_device_db.h index f1e3c4f8a..a1fb64d8b 100644 --- a/src/remote_device_db.h +++ b/src/remote_device_db.h @@ -42,7 +42,7 @@ #ifndef __REMOTE_DEVICE_DB_H #define __REMOTE_DEVICE_DB_H -#include +#include "utils.h" #include "gap.h" #if defined __cplusplus @@ -90,7 +90,7 @@ extern const remote_device_db_t remote_device_db_fs; /* API_END */ // MARK: non-persistent implementation -#include +#include "linked_list.h" #define MAX_NAME_LEN 32 typedef struct { // linked list - assert: first field diff --git a/src/remote_device_db_memory.c b/src/remote_device_db_memory.c index 67768b40c..8f1168c2d 100644 --- a/src/remote_device_db_memory.c +++ b/src/remote_device_db_memory.c @@ -42,8 +42,8 @@ #include "btstack_memory.h" #include "debug.h" -#include -#include +#include "utils.h" +#include "linked_list.h" // This lists should be only accessed by tests. linked_list_t db_mem_link_keys = NULL; diff --git a/src/rfcomm.c b/src/rfcomm.c index 12ed7bd10..2bd394e94 100644 --- a/src/rfcomm.c +++ b/src/rfcomm.c @@ -44,11 +44,10 @@ #include // memcpy #include -#include -#include -#include +#include "hci_cmds.h" +#include "utils.h" -#include +#include "utils.h" #include "btstack_memory.h" #include "hci.h" #include "hci_dump.h" diff --git a/src/rfcomm.h b/src/rfcomm.h index 0f7dda2b1..a8174ebba 100644 --- a/src/rfcomm.h +++ b/src/rfcomm.h @@ -42,8 +42,7 @@ #ifndef __RFCOMM_H #define __RFCOMM_H -#include -#include +#include "utils.h" #include diff --git a/src/run_loop.c b/src/run_loop.c index 06ebb404e..fdccc4179 100644 --- a/src/run_loop.c +++ b/src/run_loop.c @@ -41,7 +41,7 @@ * Created by Matthias Ringwald on 6/6/09. */ -#include +#include "run_loop.h" #include #include // exit() diff --git a/include/btstack/run_loop.h b/src/run_loop.h similarity index 99% rename from include/btstack/run_loop.h rename to src/run_loop.h index e51df5dc7..154ffa428 100644 --- a/include/btstack/run_loop.h +++ b/src/run_loop.h @@ -46,7 +46,7 @@ #include "btstack-config.h" -#include +#include "linked_list.h" #include diff --git a/src/run_loop_embedded.c b/src/run_loop_embedded.c index 5f94af9a3..b419426cb 100644 --- a/src/run_loop_embedded.c +++ b/src/run_loop_embedded.c @@ -53,10 +53,10 @@ */ -#include -#include -#include -#include +#include "run_loop.h" +#include "linked_list.h" +#include "hal_tick.h" +#include "hal_cpu.h" #include "run_loop_private.h" #include "debug.h" @@ -64,7 +64,7 @@ #include // NULL #ifdef HAVE_TIME_MS -#include +#include "hal_time_ms.h" #endif #if defined(HAVE_TICK) && defined(HAVE_TIME_MS) diff --git a/src/run_loop_private.h b/src/run_loop_private.h index 109cc946b..88d499dbe 100644 --- a/src/run_loop_private.h +++ b/src/run_loop_private.h @@ -44,7 +44,7 @@ #ifndef __RUN_LOOP_PRIVATE_H #define __RUN_LOOP_PRIVATE_H -#include +#include "run_loop.h" #ifdef HAVE_TIME #include diff --git a/src/sdp.c b/src/sdp.c index 61d096572..d797245f4 100644 --- a/src/sdp.c +++ b/src/sdp.c @@ -44,7 +44,7 @@ #include #include -#include +#include "sdp_util.h" #include "hci_dump.h" #include "l2cap.h" diff --git a/src/sdp.h b/src/sdp.h index 88ca58126..c9ec173b2 100644 --- a/src/sdp.h +++ b/src/sdp.h @@ -38,7 +38,7 @@ #define __SDP_H #include -#include +#include "linked_list.h" #include "btstack-config.h" diff --git a/src/sdp_client.c b/src/sdp_client.c index ccf6ff197..49a8f4e9a 100644 --- a/src/sdp_client.c +++ b/src/sdp_client.c @@ -42,7 +42,7 @@ #include "btstack-config.h" #include "sdp_client.h" -#include +#include "hci_cmds.h" #include "l2cap.h" #include "sdp_parser.h" diff --git a/src/sdp_client.h b/src/sdp_client.h index 99d50f779..f9bb97766 100644 --- a/src/sdp_client.h +++ b/src/sdp_client.h @@ -44,7 +44,7 @@ #include "btstack-config.h" -#include +#include "utils.h" #if defined __cplusplus extern "C" { diff --git a/src/sdp_parser.c b/src/sdp_parser.c index 067572516..4de7c1d56 100644 --- a/src/sdp_parser.c +++ b/src/sdp_parser.c @@ -38,7 +38,7 @@ /* * sdp_parser.c */ -#include +#include "hci_cmds.h" #include "sdp_parser.h" #include "debug.h" diff --git a/src/sdp_parser.h b/src/sdp_parser.h index e0257ff5b..194774fbd 100644 --- a/src/sdp_parser.h +++ b/src/sdp_parser.h @@ -49,8 +49,8 @@ #include #include -#include -#include +#include "sdp_util.h" +#include "utils.h" #if defined __cplusplus extern "C" { diff --git a/src/sdp_query_rfcomm.c b/src/sdp_query_rfcomm.c index 882ed21be..b8a76b710 100644 --- a/src/sdp_query_rfcomm.c +++ b/src/sdp_query_rfcomm.c @@ -44,8 +44,8 @@ #include #include -#include -#include +#include "hci_cmds.h" +#include "sdp_util.h" #include "sdp_client.h" #include "sdp_query_rfcomm.h" diff --git a/src/sdp_query_rfcomm.h b/src/sdp_query_rfcomm.h index 688249830..ca2f04d10 100644 --- a/src/sdp_query_rfcomm.h +++ b/src/sdp_query_rfcomm.h @@ -42,7 +42,7 @@ #ifndef __SDP_QUERY_RFCOMM_H #define __SDP_QUERY_RFCOMM_H -#include +#include "utils.h" #include "sdp_parser.h" #include "sdp_query_util.h" diff --git a/src/sdp_util.c b/src/sdp_util.c index 9ffcab984..b3be7d294 100644 --- a/src/sdp_util.c +++ b/src/sdp_util.c @@ -39,8 +39,8 @@ * sdp_util.c */ -#include -#include +#include "sdp_util.h" +#include "utils.h" #include "btstack-config.h" #include diff --git a/include/btstack/sdp_util.h b/src/sdp_util.h similarity index 100% rename from include/btstack/sdp_util.h rename to src/sdp_util.h diff --git a/src/utils.c b/src/utils.c index 890a4beb1..0e1882e21 100644 --- a/src/utils.c +++ b/src/utils.c @@ -44,7 +44,7 @@ */ #include "btstack-config.h" -#include +#include "utils.h" #include #include #include "debug.h" diff --git a/include/btstack/utils.h b/src/utils.h similarity index 100% rename from include/btstack/utils.h rename to src/utils.h diff --git a/test/att_db/att_db_util_test.c b/test/att_db/att_db_util_test.c index eaffff316..9a155c7a5 100644 --- a/test/att_db/att_db_util_test.c +++ b/test/att_db/att_db_util_test.c @@ -53,7 +53,7 @@ #include "att.h" #include "att_db_util.h" #include "le_counter.h" -#include +#include "utils.h" #if 0 PRIMARY_SERVICE, GAP_SERVICE diff --git a/test/ble_client/advertising_data_parser.c b/test/ble_client/advertising_data_parser.c index d1efeb0c3..5d5951c90 100644 --- a/test/ble_client/advertising_data_parser.c +++ b/test/ble_client/advertising_data_parser.c @@ -50,7 +50,7 @@ #include "CppUTest/TestHarness.h" #include "CppUTest/CommandLineTestRunner.h" -#include +#include "hci_cmds.h" #include "btstack_memory.h" #include "hci.h" diff --git a/test/des_iterator/des_iterator_test.c b/test/des_iterator/des_iterator_test.c index c98600b5b..9f42efdbe 100644 --- a/test/des_iterator/des_iterator_test.c +++ b/test/des_iterator/des_iterator_test.c @@ -11,7 +11,7 @@ #include #include -#include +#include "sdp_util.h" #include "CppUTest/TestHarness.h" #include "CppUTest/CommandLineTestRunner.h" diff --git a/test/gatt_client/gatt_client_test.c b/test/gatt_client/gatt_client_test.c index d848ba389..701ffb502 100644 --- a/test/gatt_client/gatt_client_test.c +++ b/test/gatt_client/gatt_client_test.c @@ -14,7 +14,7 @@ #include "CppUTest/TestHarness.h" #include "CppUTest/CommandLineTestRunner.h" -#include +#include "hci_cmds.h" #include "btstack_memory.h" #include "hci.h" diff --git a/test/gatt_client/le_central.c b/test/gatt_client/le_central.c index 0e2570ce8..33d0aa874 100644 --- a/test/gatt_client/le_central.c +++ b/test/gatt_client/le_central.c @@ -15,7 +15,7 @@ #include "CppUTest/CommandLineTestRunner.h" #include "CppUTestExt/MockSupport.h" -#include +#include "hci_cmds.h" #include "btstack_memory.h" #include "hci.h" diff --git a/test/gatt_client/mock.c b/test/gatt_client/mock.c index bacc5bbe9..264ceb817 100644 --- a/test/gatt_client/mock.c +++ b/test/gatt_client/mock.c @@ -3,7 +3,7 @@ #include #include -#include +#include "btstack.h" #include "att.h" #include "hci.h" #include "hci_dump.h" diff --git a/test/hfp/Makefile b/test/hfp/Makefile index 3671d509f..34cd04d0d 100644 --- a/test/hfp/Makefile +++ b/test/hfp/Makefile @@ -55,7 +55,7 @@ LDFLAGS += -lCppUTest -lCppUTestExt EXAMPLES = hfp_ag_parser_test hfp_hf_parser_test hfp_hf_client_test hfp_ag_client_test -all: ${BTSTACK_ROOT}/include/btstack/version.h ${EXAMPLES} +all: ${BTSTACK_ROOT}/src/version.h ${EXAMPLES} clean: rm -rf *.o $(PARSER_EXAMPLES) $(CLIENT_EXAMPLES) *.dSYM diff --git a/test/hfp/hfp_ag_client_test.c b/test/hfp/hfp_ag_client_test.c index 9dc6c8aa3..35e0f1835 100644 --- a/test/hfp/hfp_ag_client_test.c +++ b/test/hfp/hfp_ag_client_test.c @@ -51,9 +51,9 @@ #include "CppUTest/TestHarness.h" #include "CppUTest/CommandLineTestRunner.h" -#include -#include -#include +#include "hci_cmds.h" +#include "run_loop.h" +#include "sdp_util.h" #include "hci.h" #include "l2cap.h" diff --git a/test/hfp/hfp_hf_client_test.c b/test/hfp/hfp_hf_client_test.c index 36ca0966f..99ebf4eba 100644 --- a/test/hfp/hfp_hf_client_test.c +++ b/test/hfp/hfp_hf_client_test.c @@ -51,9 +51,9 @@ #include "CppUTest/TestHarness.h" #include "CppUTest/CommandLineTestRunner.h" -#include -#include -#include +#include "hci_cmds.h" +#include "run_loop.h" +#include "sdp_util.h" #include "hci.h" #include "l2cap.h" diff --git a/test/hfp/mock.c b/test/hfp/mock.c index af0525433..7e8e7185f 100644 --- a/test/hfp/mock.c +++ b/test/hfp/mock.c @@ -46,7 +46,7 @@ #include #include -#include +#include "btstack.h" #include "hci.h" #include "hci_dump.h" #include "sdp_query_rfcomm.h" diff --git a/test/linked_list/linked_list_test.c b/test/linked_list/linked_list_test.c index e9d50b69f..a6a959050 100644 --- a/test/linked_list/linked_list_test.c +++ b/test/linked_list/linked_list_test.c @@ -1,6 +1,6 @@ #include "CppUTest/TestHarness.h" #include "CppUTest/CommandLineTestRunner.h" -#include +#include "linked_list.h" linked_list_t testList; linked_item_t itemA; diff --git a/test/pts/Makefile b/test/pts/Makefile index dd4c8d5ba..5a1bd47cf 100644 --- a/test/pts/Makefile +++ b/test/pts/Makefile @@ -26,7 +26,7 @@ LDFLAGS += $(shell pkg-config libusb-1.0 --libs) EXAMPLES = hfp_hf_test hfp_ag_test ble_peripheral_test ble_central_test l2cap_test classic_test bnep_test hsp_ag_test hsp_hs_test -all: ${BTSTACK_ROOT}/include/btstack/version.h ${EXAMPLES} +all: ${BTSTACK_ROOT}/src/version.h ${EXAMPLES} ble_peripheral_test: profile.h ${CORE_OBJ} ${COMMON_OBJ} ${ATT_OBJ} ${GATT_SERVER_OBJ} ${SM_REAL_OBJ} ble_peripheral_test.o ${CC} $(filter-out profile.h,$^) ${CFLAGS} ${LDFLAGS} -o $@ diff --git a/test/pts/ble_central_test.c b/test/pts/ble_central_test.c index 76748fc90..02a2afed9 100644 --- a/test/pts/ble_central_test.c +++ b/test/pts/ble_central_test.c @@ -49,7 +49,7 @@ #include "btstack-config.h" -#include +#include "run_loop.h" #include "debug.h" #include "btstack_memory.h" #include "hci.h" diff --git a/test/pts/ble_peripheral_test.c b/test/pts/ble_peripheral_test.c index ffffa8403..e76903eff 100644 --- a/test/pts/ble_peripheral_test.c +++ b/test/pts/ble_peripheral_test.c @@ -49,7 +49,7 @@ #include "btstack-config.h" -#include +#include "run_loop.h" #include "debug.h" #include "btstack_memory.h" #include "hci.h" diff --git a/test/pts/bnep_test.c b/test/pts/bnep_test.c index 23176772a..f88e0c7b5 100644 --- a/test/pts/bnep_test.c +++ b/test/pts/bnep_test.c @@ -55,9 +55,9 @@ #include #include -#include -#include -#include +#include "hci_cmds.h" +#include "run_loop.h" +#include "sdp_util.h" #include "hci.h" #include "btstack_memory.h" diff --git a/test/pts/classic_test.c b/test/pts/classic_test.c index 85895da19..33e4f246a 100644 --- a/test/pts/classic_test.c +++ b/test/pts/classic_test.c @@ -49,8 +49,8 @@ #include #include -#include -#include +#include "hci_cmds.h" +#include "run_loop.h" #include "hci.h" #include "gap.h" diff --git a/test/pts/hfp_ag_test.c b/test/pts/hfp_ag_test.c index 2b3a00e1b..fcea1387e 100644 --- a/test/pts/hfp_ag_test.c +++ b/test/pts/hfp_ag_test.c @@ -54,9 +54,9 @@ #include #include -#include -#include -#include +#include "hci_cmds.h" +#include "run_loop.h" +#include "sdp_util.h" #include "hci.h" #include "l2cap.h" diff --git a/test/pts/hfp_hf_test.c b/test/pts/hfp_hf_test.c index 94721fdbb..7f366c743 100644 --- a/test/pts/hfp_hf_test.c +++ b/test/pts/hfp_hf_test.c @@ -56,9 +56,9 @@ #include #include -#include -#include -#include +#include "hci_cmds.h" +#include "run_loop.h" +#include "sdp_util.h" #include "hci.h" #include "l2cap.h" diff --git a/test/pts/hfp_test.c b/test/pts/hfp_test.c index 86ef1448f..6fc8b2eaa 100644 --- a/test/pts/hfp_test.c +++ b/test/pts/hfp_test.c @@ -49,8 +49,8 @@ #include -#include -#include +#include "hci_cmds.h" +#include "run_loop.h" #include "hci.h" #include "btstack_memory.h" diff --git a/test/pts/hsp_ag_test.c b/test/pts/hsp_ag_test.c index e40a42993..79c1fe9cf 100644 --- a/test/pts/hsp_ag_test.c +++ b/test/pts/hsp_ag_test.c @@ -54,9 +54,9 @@ #include #include -#include -#include -#include +#include "hci_cmds.h" +#include "run_loop.h" +#include "sdp_util.h" #include "hci.h" #include "l2cap.h" diff --git a/test/pts/hsp_hs_test.c b/test/pts/hsp_hs_test.c index f3bb1b906..ba348908b 100644 --- a/test/pts/hsp_hs_test.c +++ b/test/pts/hsp_hs_test.c @@ -56,9 +56,9 @@ #include #include -#include -#include -#include +#include "hci_cmds.h" +#include "run_loop.h" +#include "sdp_util.h" #include "hci.h" #include "l2cap.h" diff --git a/test/pts/l2cap_test.c b/test/pts/l2cap_test.c index 27bd99cad..c6be060cf 100644 --- a/test/pts/l2cap_test.c +++ b/test/pts/l2cap_test.c @@ -49,8 +49,8 @@ #include #include -#include -#include +#include "hci_cmds.h" +#include "run_loop.h" #include "hci.h" #include "gap.h" diff --git a/test/sdp_client/general_sdp_query.c b/test/sdp_client/general_sdp_query.c index 95d85f9a0..df4a087e7 100644 --- a/test/sdp_client/general_sdp_query.c +++ b/test/sdp_client/general_sdp_query.c @@ -12,8 +12,8 @@ #include #include -#include -#include +#include "hci_cmds.h" +#include "run_loop.h" #include "hci.h" #include "btstack_memory.h" diff --git a/test/sdp_client/sdp_rfcomm_query.c b/test/sdp_client/sdp_rfcomm_query.c index 0a5a4f679..8f6655217 100644 --- a/test/sdp_client/sdp_rfcomm_query.c +++ b/test/sdp_client/sdp_rfcomm_query.c @@ -13,8 +13,8 @@ #include #include "sdp_query_rfcomm.h" -#include -#include +#include "hci_cmds.h" +#include "run_loop.h" #include "hci.h" #include "btstack_memory.h" diff --git a/test/sdp_client/service_attribute_search_query.c b/test/sdp_client/service_attribute_search_query.c index ad4b0bd35..88c577bd0 100644 --- a/test/sdp_client/service_attribute_search_query.c +++ b/test/sdp_client/service_attribute_search_query.c @@ -12,8 +12,8 @@ #include #include -#include -#include +#include "hci_cmds.h" +#include "run_loop.h" #include "hci.h" #include "btstack_memory.h" diff --git a/test/sdp_client/service_search_query.c b/test/sdp_client/service_search_query.c index 2af59147d..0b5e756c1 100644 --- a/test/sdp_client/service_search_query.c +++ b/test/sdp_client/service_search_query.c @@ -12,8 +12,8 @@ #include #include -#include -#include +#include "hci_cmds.h" +#include "run_loop.h" #include "hci.h" #include "btstack_memory.h" diff --git a/test/security_manager/mock.c b/test/security_manager/mock.c index 407b858f2..f4feaa52b 100644 --- a/test/security_manager/mock.c +++ b/test/security_manager/mock.c @@ -3,7 +3,7 @@ #include #include -#include +#include "btstack.h" #include "att.h" #include "hci.h" #include "hci_dump.h" diff --git a/test/security_manager/security_manager.c b/test/security_manager/security_manager.c index e0a37828c..f855edff0 100644 --- a/test/security_manager/security_manager.c +++ b/test/security_manager/security_manager.c @@ -14,8 +14,8 @@ #include "CppUTest/TestHarness.h" #include "CppUTest/CommandLineTestRunner.h" -#include -#include +#include "hci_cmds.h" +#include "utils.h" #include "btstack_memory.h" #include "hci.h" diff --git a/tools/get_version.sh b/tools/get_version.sh index 0ff4c4ec1..2f4beb77c 100755 --- a/tools/get_version.sh +++ b/tools/get_version.sh @@ -1,6 +1,6 @@ #!/bin/sh DIR=`dirname $0` -FILE=$DIR/../include/btstack/version.h +FILE=$DIR/../src/version.h COMMIT=`git log -1 --pretty=format:%h` MAJOR=0 MINOR=9