Merge branch 'develop' into a2dp

This commit is contained in:
Milanka Ringwald 2016-06-10 10:48:04 +02:00
commit f33cc9ef94
91 changed files with 2766 additions and 1647 deletions

5
.gitignore vendored
View File

@ -15,7 +15,8 @@
*.map
.theos
.stamp
bluetooth_init_cc2560B_1.2_BT_Spec_4.1.c
bluetooth_init_cc2564B_1.2_BT_Spec_4.1.c
.bts
bluetooth_init_cc2560B_1.*_BT_Spec_4.1.c
bluetooth_init_cc2564B_1.*_BT_Spec_4.1.c
TIInit_11.8.32.c
initscripts_TIInit_6.7.16_bt_spec_4.1.c

View File

@ -1,4 +1,5 @@
**_Note: Major API Changes. For older projects, you may use the [v0.9 branch](https://github.com/bluekitchen/btstack/tree/v0.9)_**
**_Note: Major API Changes. For older projects, you may use the [v0.9 branch](https://github.com/bluekitchen/btstack/tree/v0.9).
Please see [Migration notes](https://github.com/bluekitchen/btstack/blob/master/doc/manual/docs/appendix/migration.md)_**
# Welcome to BTstack
@ -26,8 +27,8 @@ It has been qualified with the the Bluetooth SIG for GAP, IOP, HFP, HSP, SPP, PA
GATT, SM of the Bluetooth 4.2 LE Central and Peripheral roles (QD ID 25340).
## Documentation
- [HTML](http://bluekitchen-gmbh.com/btstack/v1.0)
- [PDF](http://bluekitchen-gmbh.com/btstack_v1.0.pdf)
- [HTML](http://bluekitchen-gmbh.com/btstack)
- [PDF](http://bluekitchen-gmbh.com/btstack.pdf)
## Supported Protocols
* L2CAP

View File

@ -3,13 +3,41 @@
# http://processors.wiki.ti.com/index.php/CC256x_Downloads
#
BASE_URL = https://git.ti.com/ti-bt/service-packs/blobs/raw/a027ae390d8790e56e1c78136c78fe6537470e91
CONVERSION_SCRIPT=$(BTSTACK_ROOT)/chipset/cc256x/convert_bts_init_scripts.py
bluetooth_init_cc2560B_1.2_BT_Spec_4.0.bts:
curl -O $(BASE_URL)/bluetooth_init_cc2560B_1.2_BT_Spec_4.0.bts
# first generation CC2560 - TIInit_6.2.31.bts part of .zip archive
bluetooth_init_cc2564B_1.2_BT_Spec_4.0.bts:
curl -O $(BASE_URL)/bluetooth_init_cc2564B_1.2_BT_Spec_4.0.bts
CC2560_BT_SP_BTS.zip:
curl -O http://processors.wiki.ti.com/images/d/da/CC2560_BT_SP_BTS.zip
bluetooth_init_cc2560_2.44.bts: CC2560_BT_SP_BTS.zip
unzip CC2560_BT_SP_BTS.zip
mv CC2560_BT_SP_BTS/bluetooth_init_cc2560_2.44.bts .
rm -rf CC2560_BT_SP_BTS
# second generation CC2560A and CC2564 - TIInit_6.6.15.bts part of .zip archive
CC2560A_BT_SP_BTS.zip:
curl -O http://processors.wiki.ti.com/images/e/e7/CC2560A_BT_SP_BTS.zip
CC2564_BT_BLE_SP_BTS.zip:
curl -O http://processors.wiki.ti.com/images/1/1e/CC2564_BT_BLE_SP_BTS.zip
bluetooth_init_cc2560A_2.14.bts: CC2560A_BT_SP_BTS.zip
unzip CC2560A_BT_SP_BTS.zip
mv CC2560A_BT_SP_BTS/bluetooth_init_cc2560a_2.14.bts .
rm -rf CC2560A_BT_SP_BTS
bluetooth_init_cc2564_2.14.bts: CC2564_BT_BLE_SP_BTS.zip
unzip CC2564_BT_BLE_SP_BTS.zip
mv CC2564_BT_BLE_SP_BTS/bluetooth_init_cc2564_2.14.bts .
rm -rf CC2564_BT_BLE_SP_BTS
# third generation
# versioned files for v1.2
bluetooth_init_cc2560B_1.2_BT_Spec_4.1.bts:
curl -O $(BASE_URL)/bluetooth_init_cc2560B_1.2_BT_Spec_4.1.bts
@ -19,6 +47,14 @@ bluetooth_init_cc2564B_1.2_BT_Spec_4.1.bts:
BLE_init_cc2564B_1.2.bts:
curl -O $(BASE_URL)/BLE_init_cc2564B_1.2.bts
# unversioned files for v1.4
TIInit_6.7.16_bt_spec_4.1.bts:
curl -O https://git.ti.com/ti-bt/service-packs/blobs/raw/54f5c151dacc608b19ab2ce4c30e27a3983048b2/initscripts/TIInit_6.7.16_bt_spec_4.1.bts
TIInit_6.7.16_ble_add-on.bts:
curl -O https://git.ti.com/ti-bt/service-packs/blobs/raw/89c8db14929f10d75627b132690432cd71f5f54f/initscripts/TIInit_6.7.16_ble_add-on.bts
# WL chipset
TIInit_11.8.32.bts:
curl -O $(BASE_URL)/TIInit_11.8.32.bts
@ -29,7 +65,16 @@ TIInit_12.8.32.bts:
curl -O $(BASE_URL)/TIInit_12.8.32.bts
# convert to .c files
CONVERSION_SCRIPT=$(BTSTACK_ROOT)/chipset/cc256x/convert_bts_init_scripts.py
bluetooth_init_cc2560_2.44.c: bluetooth_init_cc2560_2.44.bts
$(CONVERSION_SCRIPT)
bluetooth_init_cc2560A_2.14.c: bluetooth_init_cc2560A_2.14.bts
$(CONVERSION_SCRIPT)
bluetooth_init_cc2564_2.14.c: bluetooth_init_cc2564_2.14.bts
$(CONVERSION_SCRIPT)
bluetooth_init_cc2560B_1.2_BT_Spec_4.0.c: bluetooth_init_cc2560B_1.2_BT_Spec_4.0.bts
$(CONVERSION_SCRIPT)
@ -43,11 +88,27 @@ bluetooth_init_cc2560B_1.2_BT_Spec_4.1.c: bluetooth_init_cc2560B_1.2_BT_Spec_4.1
bluetooth_init_cc2564B_1.2_BT_Spec_4.1.c: bluetooth_init_cc2564B_1.2_BT_Spec_4.1.bts BLE_init_cc2564B_1.2.bts
$(CONVERSION_SCRIPT)
bluetooth_init_cc2560B_1.4_BT_Spec_4.1.c: TIInit_6.7.16_bt_spec_4.1.bts
cp TIInit_6.7.16_bt_spec_4.1.bts bluetooth_init_cc2560B_1.4_BT_Spec_4.1.bts
$(CONVERSION_SCRIPT)
bluetooth_init_cc2564B_1.4_BT_Spec_4.1.c: TIInit_6.7.16_bt_spec_4.1.bts TIInit_6.7.16_ble_add-on.bts
cp TIInit_6.7.16_bt_spec_4.1.bts bluetooth_init_cc2564B_1.4_BT_Spec_4.1.bts
cp TIInit_6.7.16_ble_add-on.bts BLE_init_cc2564B_1.4.bts
$(CONVERSION_SCRIPT)
TIInit_11.8.32.c: TIInit_11.8.32.bts
$(CONVERSION_SCRIPT)
TIInit_12.10.28.c: TIInit_12.10.28.bts
$(CONVERSION_SCRIPT)
TIInit_12.8.32.c: /TIInit_12.8.32.bts
TIInit_12.8.32.c: TIInit_12.8.32.bts
$(CONVERSION_SCRIPT)
all-scripts: bluetooth_init_cc2560_2.44.c bluetooth_init_cc2560A_2.14.c bluetooth_init_cc2564_2.14.bts bluetooth_init_cc2560B_1.2_BT_Spec_4.0.c bluetooth_init_cc2564B_1.2_BT_Spec_4.0.c bluetooth_init_cc2560B_1.2_BT_Spec_4.1.c bluetooth_init_cc2564B_1.2_BT_Spec_4.1.c TIInit_11.8.32.c TIInit_12.10.28.c TIInit_12.8.32.c
clean-scripts:
rm -fr CC256*.zip bluetooth_init_cc256*.bts bluetooth_init_cc256*.c TIInit_*.bts TIInit_*.c BLE_init_cc256*.bts BLE_init_cc256*.c

View File

@ -84,14 +84,14 @@ extern const uint32_t cc256x_init_script_size;
// init script
static uint32_t init_script_offset = 0;
static int16_t init_power_in_dB = 13; // 13 dBm
static int init_ehcill_enabled = 0;
// support for SCO over HCI
#ifdef ENABLE_SCO_OVER_HCI
static int init_send_route_sco_over_hci = 0;
// route SCO over HCI (connection type=1, tx buffer size = 0x00 (don't change), tx buffer max latency=0x0000(don't chnage)), accept packets - 0)
// Follow recommendation from https://e2e.ti.com/support/wireless_connectivity/bluetooth_cc256x/f/660/t/397004
// route SCO over HCI (connection type=1, tx buffer size = 120, tx buffer max latency= 720, accept packets with CRC Error
static const uint8_t hci_route_sco_over_hci[] = {
0x10, 0xfe, 0x05, 0x01, 0x00, 0x00, 0x00, 0x00
0x10, 0xfe, 0x05, 0x01, 0x78, 0xd0, 0x02, 0x01,
};
#endif
@ -193,11 +193,11 @@ static void update_set_class2_single_power(uint8_t * hci_cmd_buffer){
// eHCILL activate from http://e2e.ti.com/support/low_power_rf/f/660/p/134855/484776.aspx
static void update_sleep_mode_configurations(uint8_t * hci_cmd_buffer){
if (init_ehcill_enabled) {
hci_cmd_buffer[4] = 1;
} else {
hci_cmd_buffer[4] = 0;
}
#ifdef ENABLE_EHCILL
hci_cmd_buffer[4] = 1;
#else
hci_cmd_buffer[4] = 0;
#endif
}
static void update_init_script_command(uint8_t *hci_cmd_buffer){
@ -275,14 +275,6 @@ static btstack_chipset_result_t chipset_next_command(uint8_t * hci_cmd_buffer){
// MARK: public API
void btstack_chipset_cc256x_enable_ehcill(int on){
init_ehcill_enabled = on;
}
int btstack_chipset_cc256x_ehcill_enabled(void){
return init_ehcill_enabled;
}
void btstack_chipset_cc256x_set_power(int16_t power_in_dB){
init_power_in_dB = power_in_dB;
}

View File

@ -50,8 +50,6 @@ extern "C" {
#include <stdint.h>
#include "btstack_chipset.h"
void btstack_chipset_cc256x_enable_ehcill(int on);
int btstack_chipset_cc256x_ehcill_enabled(void);
void btstack_chipset_cc256x_set_power(int16_t power_in_dB);
const btstack_chipset_t * btstack_chipset_cc256x_instance(void);

View File

@ -142,14 +142,13 @@ def convert_bts(main_bts_file, bts_add_on):
if (action_type == 1): # hci command
# opcode = (ord(action_data[2]) << 8) | ord(action_data[1])
opcode = (action_data[2] << 8) | action_data[1]
if opcode == 0xFF36:
continue # skip baud rate command
if opcode == 0xFD0C:
have_eHCILL = True
if opcode == 0xFD82:
modulation_type = ord(action_data[4])
modulation_type = action_data[4]
if modulation_type == 0:
have_power_vector_gfsk = True
elif modulation_type == 1:
@ -283,6 +282,9 @@ for name in files:
if name_lower.startswith('avpr_init_cc'):
print("Skipping AVPR add-on", name)
continue
if re.match("tiinit_.*_ble_add-on.bts", name_lower):
print("Skipping BLE add-on", name)
continue
if re.match("initscripts_tiinit_.*_ble_add-on.bts", name_lower):
print("Skipping BLE add-on", name)
continue
@ -290,6 +292,8 @@ for name in files:
print("Skipping AVPR add-on", name)
continue
print "check", name
# check for BLE add-on
add_on = ""
name_parts = re.match('bluetooth_init_(.....+_...)_.*.bts', name)
@ -299,6 +303,13 @@ for name in files:
add_on = potential_add_on
print("Found", add_on, "add-on for", name)
name_parts = re.match('TIInit_(\d*\.\d*\.\d*)_.*.bts', name)
if name_parts:
potential_add_on = 'TIInit_%s_ble_add-on.bts' % name_parts.group(1)
if os.path.isfile(potential_add_on):
add_on = potential_add_on
print("Found", add_on, "add-on for", name)
name_parts = re.match('initscripts_TIInit_(\d*\.\d*\.\d*)_.*.bts', name)
if name_parts:
potential_add_on = 'initscripts_TIInit_%s_ble_add-on.bts' % name_parts.group(1)

View File

@ -71,6 +71,12 @@ static const uint8_t init_script[] = {
0x01, 0x00, 0xFC, 0x13, 0xc2, 0x02, 0x00, 0x09, 0x00, 0x01, 0x00, 0x03, 0x70, 0x00, 0x00, 0xc9, 0x22, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
#endif
// Enable RTS/CTS for BCSP (0806 -> 080e)
0x01, 0x00, 0xFC, 0x13, 0xc2, 0x02, 0x00, 0x09, 0x00, 0x01, 0x00, 0x03, 0x70, 0x00, 0x00, 0xbf, 0x01, 0x01, 0x00, 0x00, 0x00, 0x0e, 0x08,
// Enable RTS/CTS for H5 (1806 -> 180e, even parity still on)
0x01, 0x00, 0xFC, 0x13, 0xc2, 0x02, 0x00, 0x09, 0x00, 0x01, 0x00, 0x03, 0x70, 0x00, 0x00, 0xc1, 0x01, 0x01, 0x00, 0x00, 0x00, 0x0e, 0x18,
// Set UART baudrate to 115200
0x01, 0x00, 0xFC, 0x15, 0xc2, 0x02, 0x00, 0x0a, 0x00, 0x02, 0x00, 0x03, 0x70, 0x00, 0x00, 0xea, 0x01, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0xc2,

View File

@ -39,7 +39,6 @@ System properties:
#define | Description
-----------------------------------|-------------------------------------
HAVE_EHCILL | TI CC256x/WL18xx with eHCILL is used
HAVE_MALLOC | Use dynamic memory
@ -70,6 +69,7 @@ BTstack properties:
-------------------------|---------------------------------------------
ENABLE_CLASSIC | Enable Classic related code in HCI and L2CAP
ENABLE_BLE | Enable BLE related code in HCI and L2CAP
ENABLE_EHCILL | Enable eHCILL low power mode on TI CC256x/WL18xx chipsets
ENABLE_LOG_DEBUG | Enable log_debug messages
ENABLE_LOG_ERROR | Enable log_error messages
ENABLE_LOG_INFO | Enable log_info messages

View File

@ -160,16 +160,16 @@ led_counter: ${CORE_OBJ} ${COMMON_OBJ} led_counter.c
gap_le_advertisements: ${CORE_OBJ} ${COMMON_OBJ} ad_parser.c gap_le_advertisements.c
${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@
hsp_hs_demo: ${CORE_OBJ} ${COMMON_OBJ} ${SDP_CLIENT} hsp_hs.o hsp_hs_demo.c
hsp_hs_demo: ${CORE_OBJ} ${COMMON_OBJ} ${SDP_CLIENT} sco_demo_util.o hsp_hs.o hsp_hs_demo.c
${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@
hsp_ag_demo: ${CORE_OBJ} ${COMMON_OBJ} ${SDP_CLIENT} hsp_ag.o hsp_ag_demo.c
hsp_ag_demo: ${CORE_OBJ} ${COMMON_OBJ} ${SDP_CLIENT} sco_demo_util.o hsp_ag.o hsp_ag_demo.c
${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@
hfp_ag_demo: ${CORE_OBJ} ${COMMON_OBJ} ${SDP_CLIENT} hfp.o hfp_gsm_model.o hfp_ag.o hfp_ag_demo.c
hfp_ag_demo: ${CORE_OBJ} ${COMMON_OBJ} ${SDP_CLIENT} sco_demo_util.o hfp.o hfp_gsm_model.o hfp_ag.o hfp_ag_demo.c
${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@
hfp_hf_demo: ${CORE_OBJ} ${COMMON_OBJ} ${SDP_CLIENT} hfp.o hfp_hf.o hfp_hf_demo.c
hfp_hf_demo: ${CORE_OBJ} ${COMMON_OBJ} ${SDP_CLIENT} sco_demo_util.o hfp.o hfp_hf.o hfp_hf_demo.c
${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@
clean:

View File

@ -133,9 +133,9 @@ static void dump_advertisement_data(const uint8_t * adv_data, uint8_t adv_size){
bd_addr_t address;
uint8_t uuid_128[16];
for (ad_iterator_init(&context, adv_size, (uint8_t *)adv_data) ; ad_iterator_has_more(&context) ; ad_iterator_next(&context)){
uint8_t data_type = ad_iterator_get_data_type(&context);
uint8_t size = ad_iterator_get_data_len(&context);
uint8_t * data = ad_iterator_get_data(&context);
uint8_t data_type = ad_iterator_get_data_type(&context);
uint8_t size = ad_iterator_get_data_len(&context);
const uint8_t * data = ad_iterator_get_data(&context);
if (data_type > 0 && data_type < 0x1B){
printf(" %s: ", ad_types[data_type]);

View File

@ -68,6 +68,10 @@ typedef enum {
TC_W4_BATTERY_DATA
} gc_state_t;
static int blacklist_index = 0;
static bd_addr_t blacklist[20];
static advertising_report_t report;
static void handle_gatt_client_event(uint8_t packet_type, uint16_t channel, uint8_t *packet, uint16_t size);
static bd_addr_t cmdline_addr = { };
@ -90,6 +94,24 @@ static void printUUID(uint8_t * uuid128, uint16_t uuid16){
}
}
static int blacklist_size(void){
return sizeof(blacklist) / sizeof(bd_addr_t);
}
static int blacklist_contains(bd_addr_t addr){
int i;
for (i=0; i<blacklist_size(); i++){
if (bd_addr_cmp(addr, blacklist[i]) == 0) return 1;
}
return 0;
}
static void add_to_blacklist(bd_addr_t addr){
printf("%s added to blacklist (no battery service found\n", bd_addr_to_str(addr));
bd_addr_copy(blacklist[blacklist_index], addr);
blacklist_index = (blacklist_index + 1) % blacklist_size();
}
static void dump_advertising_report(advertising_report_t * e){
printf(" * adv. event: evt-type %u, addr-type %u, addr %s, rssi %u, length adv %u, data: ", e->event_type,
e->address_type, bd_addr_to_str(e->address), e->rssi, e->length);
@ -116,36 +138,27 @@ static void dump_service(gatt_client_service_t * service){
printf("\n");
}
static void error_code(int status){
switch(status){
case ATT_ERROR_INSUFFICIENT_AUTHENTICATION:
printf("ATT_ERROR_INSUFFICIENT_AUTHENTICATION. TODO: security manager is not complete yet.\n");
break;
default:
printf(" status 0x%02x\n", status);
break;
}
}
static void handle_gatt_client_event(uint8_t packet_type, uint16_t channel, uint8_t *packet, uint16_t size){
int status;
uint8_t battery_level;
switch(state){
case TC_W4_SERVICE_RESULT:
switch(hci_event_packet_get_type(packet)){
case GATT_EVENT_SERVICE_QUERY_RESULT:
gatt_event_service_query_result_get_service(packet, &battery_service);
printf("Battery service found:\n");
dump_service(&battery_service);
break;
case GATT_EVENT_QUERY_COMPLETE:
if (!packet[4]){
printf("Battery service not found. Restart scan.\n");
state = TC_W4_SCAN_RESULT;
gap_start_scan();
if (packet[4] != 0){
printf("SERVICE_QUERY_RESULT - Error status %x.\n", packet[4]);
add_to_blacklist(report.address);
gap_disconnect(connection_handle);
break;
}
state = TC_W4_CHARACTERISTIC_RESULT;
printf("\nSearch for battery level characteristic in battery service. ");
printf("\nSearch for battery level characteristic.\n");
gatt_client_discover_characteristics_for_service_by_uuid16(handle_gatt_client_event, connection_handle, &battery_service, battery_level_characteristic_uuid);
break;
default:
@ -156,30 +169,54 @@ static void handle_gatt_client_event(uint8_t packet_type, uint16_t channel, uint
case TC_W4_CHARACTERISTIC_RESULT:
switch(hci_event_packet_get_type(packet)){
case GATT_EVENT_CHARACTERISTIC_QUERY_RESULT:
printf("Battery level characteristic found:\n");
gatt_event_characteristic_query_result_get_characteristic(packet, &config_characteristic);
dump_characteristic(&config_characteristic);
break;
case GATT_EVENT_QUERY_COMPLETE:
if (packet[4] != 0){
printf("CHARACTERISTIC_QUERY_RESULT - Error status %x.\n", packet[4]);
add_to_blacklist(report.address);
gap_disconnect(connection_handle);
break;
}
state = TC_W4_BATTERY_DATA;
printf("\nConfigure battery level characteristic for notify.");
gatt_client_write_client_characteristic_configuration(handle_gatt_client_event, connection_handle, &config_characteristic, GATT_CLIENT_CHARACTERISTICS_CONFIGURATION_NOTIFICATION);
printf("\nConfigure battery level characteristic for notify.\n");
status = gatt_client_write_client_characteristic_configuration(handle_gatt_client_event, connection_handle, &config_characteristic, GATT_CLIENT_CHARACTERISTICS_CONFIGURATION_NOTIFICATION);
if (status != 0){
printf("\nNotification not supported. Query value of characteristic.\n");
gatt_client_read_value_of_characteristic(handle_gatt_client_event, connection_handle, &config_characteristic);
}
break;
default:
break;
}
break;
case TC_W4_BATTERY_DATA:
if (hci_event_packet_get_type(packet) == GATT_EVENT_QUERY_COMPLETE){
if (packet[4] != 0){
printf("\nNotification is not possible: ");
error_code(packet[4]);
}
break;
switch(hci_event_packet_get_type(packet)){
case GATT_EVENT_NOTIFICATION:
printf("\nBattery Data:\n");
dump_characteristic_value(&packet[8], little_endian_read_16(packet, 6));
break;
case GATT_EVENT_CHARACTERISTIC_VALUE_QUERY_RESULT:
if (gatt_event_characteristic_value_query_result_get_value_length(packet) < 1) break;
battery_level = gatt_event_characteristic_value_query_result_get_value(packet)[0];
printf("Battry level %d \n", battery_level);
break;
case GATT_EVENT_QUERY_COMPLETE:
if (packet[4] != 0){
printf("CHARACTERISTIC_VALUE_QUERY_RESULT - Error status %x.\n", packet[4]);
break;
}
// Use timer if repeated request is needed and notification is not supperted
gap_disconnect(connection_handle);
break;
default:
printf("Unknown packet type %x\n", hci_event_packet_get_type(packet));
break;
}
if (hci_event_packet_get_type(packet) != GATT_EVENT_NOTIFICATION) break;
printf("\nBattery Data:\n");
dump_characteristic_value(&packet[8], little_endian_read_16(packet, 6));
break;
default:
@ -189,30 +226,30 @@ static void handle_gatt_client_event(uint8_t packet_type, uint16_t channel, uint
}
static void fill_advertising_report_from_packet(advertising_report_t * report, uint8_t *packet){
gap_event_advertising_report_get_address(packet, report->address);
report->event_type = gap_event_advertising_report_get_advertising_event_type(packet);
report->address_type = gap_event_advertising_report_get_address_type(packet);
report->rssi = gap_event_advertising_report_get_rssi(packet);
report->length = gap_event_advertising_report_get_data_length(packet);
report->data = gap_event_advertising_report_get_data(packet);
static void fill_advertising_report_from_packet(advertising_report_t * adv_report, uint8_t *packet){
gap_event_advertising_report_get_address(packet, adv_report->address);
adv_report->event_type = gap_event_advertising_report_get_advertising_event_type(packet);
adv_report->address_type = gap_event_advertising_report_get_address_type(packet);
adv_report->rssi = gap_event_advertising_report_get_rssi(packet);
adv_report->length = gap_event_advertising_report_get_data_length(packet);
adv_report->data = gap_event_advertising_report_get_data(packet);
}
static void hci_event_handler(uint8_t packet_type, uint16_t channel, uint8_t *packet, uint16_t size){
if (packet_type != HCI_EVENT_PACKET) return;
advertising_report_t report;
uint8_t event = hci_event_packet_get_type(packet);
switch (event) {
case BTSTACK_EVENT_STATE:
// BTstack activated, get started
if (btstack_event_state_get_state(packet) != HCI_STATE_WORKING) break;
if (cmdline_addr_found){
printf("Start connect to %s\n", bd_addr_to_str(cmdline_addr));
printf("Connect to %s\n", bd_addr_to_str(cmdline_addr));
state = TC_W4_CONNECT;
gap_connect(cmdline_addr, 0);
break;
}
printf("BTstack activated, start scanning!\n");
printf("Start scanning!\n");
state = TC_W4_SCAN_RESULT;
gap_set_scan_parameters(0,0x0030, 0x0030);
gap_start_scan();
@ -220,13 +257,17 @@ static void hci_event_handler(uint8_t packet_type, uint16_t channel, uint8_t *pa
case GAP_EVENT_ADVERTISING_REPORT:
if (state != TC_W4_SCAN_RESULT) return;
fill_advertising_report_from_packet(&report, packet);
if (blacklist_contains(report.address)) {
break;
}
dump_advertising_report(&report);
// stop scanning, and connect to the device
state = TC_W4_CONNECT;
gap_stop_scan();
printf("Stop scan. Start connect to device with addr %s.\n", bd_addr_to_str(report.address));
printf("Stop scan. Connect to device with addr %s.\n", bd_addr_to_str(report.address));
gap_connect(report.address,report.address_type);
break;
case HCI_EVENT_LE_META:
// wait for connection complete
@ -240,8 +281,16 @@ static void hci_event_handler(uint8_t packet_type, uint16_t channel, uint8_t *pa
gatt_client_discover_primary_services_by_uuid16(handle_gatt_client_event, connection_handle, battery_service_uuid);
break;
case HCI_EVENT_DISCONNECTION_COMPLETE:
printf("\nDISCONNECTED\n");
exit(0);
if (cmdline_addr_found){
printf("\nDisconnected %s\n", bd_addr_to_str(cmdline_addr));
exit(0);
}
printf("\nDisconnected %s\n", bd_addr_to_str(report.address));
printf("Restart scan.\n");
state = TC_W4_SCAN_RESULT;
gap_start_scan();
break;
default:
break;
@ -249,8 +298,8 @@ static void hci_event_handler(uint8_t packet_type, uint16_t channel, uint8_t *pa
}
static void usage(const char *name){
fprintf(stderr, "\nUsage: %s [-a|--address aa:bb:cc:dd:ee:ff]\n", name);
fprintf(stderr, "If no argument is provided, GATT browser will start scanning and connect to the first found device.\nTo connect to a specific device use argument [-a].\n\n");
fprintf(stderr, "\nUsage: %s [-a|--address aa:bb:cc:dd:ee:ff]\n", name);
fprintf(stderr, "If no argument is provided, GATT browser will start scanning and connect to the first found device.\nTo connect to a specific device use argument [-a].\n\n");
}
int btstack_main(int argc, const char * argv[]);
@ -260,15 +309,16 @@ int btstack_main(int argc, const char * argv[]){
cmdline_addr_found = 0;
while (arg < argc) {
if(!strcmp(argv[arg], "-a") || !strcmp(argv[arg], "--address")){
arg++;
cmdline_addr_found = sscanf_bd_addr(argv[arg], cmdline_addr);
if(!strcmp(argv[arg], "-a") || !strcmp(argv[arg], "--address")){
arg++;
cmdline_addr_found = sscanf_bd_addr(argv[arg], cmdline_addr);
arg++;
if (!cmdline_addr_found) exit(1);
continue;
}
usage(argv[0]);
return 0;
}
}
hci_event_callback_registration.callback = &hci_event_handler;
hci_add_event_handler(&hci_event_callback_registration);

View File

@ -56,19 +56,25 @@
#include <unistd.h>
#include "btstack.h"
#include "sco_demo_util.h"
#ifdef HAVE_POSIX_STDIN
#include "stdin_support.h"
#endif
uint8_t hfp_service_buffer[150];
const uint8_t rfcomm_channel_nr = 1;
const char hfp_ag_service_name[] = "BTstack HFP AG Test";
static bd_addr_t device_addr = {0x00,0x15,0x83,0x5F,0x9D,0x46};
// PTS
// static bd_addr_t device_addr = {0x00,0x15,0x83,0x5F,0x9D,0x46};
// BT-201
// static bd_addr_t device_addr = {0x00, 0x07, 0xB0, 0x83, 0x02, 0x5E};
// CC256x
bd_addr_t device_addr = { 0xD0, 0x39, 0x72, 0xCD, 0x83, 0x45};
static uint8_t codecs[1] = {HFP_CODEC_CVSD};
static uint16_t handle = -1;
static hci_con_handle_t sco_handle;
static int memory_1_enabled = 1;
static int ag_indicators_nr = 7;
@ -189,7 +195,7 @@ static void inquiry_packet_handler (uint8_t packet_type, uint8_t *packet, uint16
numResponses = hci_event_inquiry_result_get_num_responses(packet);
int offset = 3;
for (i=0; i<numResponses && deviceCount < MAX_DEVICES;i++){
reverse_bd_addr(addr, &packet[offset]);
reverse_bd_addr(&packet[offset], addr);
offset += 6;
index = getDeviceIndexForAddress(addr);
if (index >= 0) continue; // already in our list
@ -234,7 +240,7 @@ static void inquiry_packet_handler (uint8_t packet_type, uint8_t *packet, uint16
break;
case HCI_EVENT_REMOTE_NAME_REQUEST_COMPLETE:
reverse_bd_addr(addr, &packet[3]);
reverse_bd_addr(&packet[3], addr);
index = getDeviceIndexForAddress(addr);
if (index >= 0) {
if (packet[2] == 0) {
@ -259,10 +265,13 @@ static void show_usage(void);
// Testig User Interface
static void show_usage(void){
printf("\n--- Bluetooth HFP Audiogateway (AG) unit Test Console ---\n");
bd_addr_t iut_address;
gap_local_bd_addr(iut_address);
printf("\n--- Bluetooth HFP Audiogateway (AG) unit Test Console %s ---\n", bd_addr_to_str(iut_address));
printf("---\n");
printf("a - establish HFP connection to PTS module\n");
printf("a - establish HFP connection to PTS module %s\n", bd_addr_to_str(device_addr));
// printf("A - release HFP connection to PTS module\n");
printf("b - establish AUDIO connection\n");
@ -514,7 +523,7 @@ static void stdin_process(btstack_data_source_t *ds, btstack_data_source_callbac
break;
case 't':
log_info("USER:\'%c\'", cmd);
printf("Terminate HCI connection.\n");
printf("Terminate HCI connection. 0x%2x\n", handle);
gap_disconnect(handle);
break;
case 'u':
@ -547,77 +556,95 @@ static void stdin_process(btstack_data_source_t *ds, btstack_data_source_callbac
}
#endif
static void packet_handler(uint8_t * event, uint16_t event_size){
switch (event[0]){
case HCI_EVENT_INQUIRY_RESULT:
case HCI_EVENT_INQUIRY_RESULT_WITH_RSSI:
case HCI_EVENT_INQUIRY_COMPLETE:
case HCI_EVENT_REMOTE_NAME_REQUEST_COMPLETE:
inquiry_packet_handler(HCI_EVENT_PACKET, event, event_size);
break;
default:
break;
}
if (event[0] != HCI_EVENT_HFP_META) return;
if (event[3]
&& event[2] != HFP_SUBEVENT_PLACE_CALL_WITH_NUMBER
&& event[2] != HFP_SUBEVENT_ATTACH_NUMBER_TO_VOICE_TAG
&& event[2] != HFP_SUBEVENT_TRANSMIT_DTMF_CODES){
printf("ERROR, status: %u\n", event[3]);
return;
}
switch (event[2]) {
case HFP_SUBEVENT_SERVICE_LEVEL_CONNECTION_ESTABLISHED:
handle = hfp_subevent_service_level_connection_established_get_con_handle(event);
printf("Service level connection established.\n");
break;
case HFP_SUBEVENT_SERVICE_LEVEL_CONNECTION_RELEASED:
printf("Service level connection released.\n");
break;
case HFP_SUBEVENT_AUDIO_CONNECTION_ESTABLISHED:
printf("\n** Audio connection established **\n");
break;
case HFP_SUBEVENT_AUDIO_CONNECTION_RELEASED:
printf("\n** Audio connection released **\n");
break;
case HFP_SUBEVENT_START_RINGINIG:
printf("\n** Start Ringing **\n");
break;
case HFP_SUBEVENT_STOP_RINGINIG:
printf("\n** Stop Ringing **\n");
break;
case HFP_SUBEVENT_PLACE_CALL_WITH_NUMBER:
printf("\n** Outgoing call '%s' **\n", hfp_subevent_place_call_with_number_get_number(event));
// validate number
if ( strcmp("1234567", hfp_subevent_place_call_with_number_get_number(event)) == 0
|| strcmp("7654321", hfp_subevent_place_call_with_number_get_number(event)) == 0
|| (memory_1_enabled && strcmp(">1", hfp_subevent_place_call_with_number_get_number(event)) == 0)){
printf("Dialstring valid: accept call\n");
hfp_ag_outgoing_call_accepted();
} else {
printf("Dialstring invalid: reject call\n");
hfp_ag_outgoing_call_rejected();
static void packet_handler(uint8_t packet_type, uint16_t channel, uint8_t * event, uint16_t event_size){
switch (packet_type){
case HCI_EVENT_PACKET:
switch (event[0]){
case HCI_EVENT_INQUIRY_RESULT:
case HCI_EVENT_INQUIRY_RESULT_WITH_RSSI:
case HCI_EVENT_INQUIRY_COMPLETE:
case HCI_EVENT_REMOTE_NAME_REQUEST_COMPLETE:
inquiry_packet_handler(HCI_EVENT_PACKET, event, event_size);
break;
case HCI_EVENT_SCO_CAN_SEND_NOW:
sco_demo_send(sco_handle);
break;
default:
break;
}
break;
case HFP_SUBEVENT_ATTACH_NUMBER_TO_VOICE_TAG:
printf("\n** Attach number to voice tag. Sending '1234567\n");
hfp_ag_send_phone_number_for_voice_tag(device_addr, "1234567");
break;
case HFP_SUBEVENT_TRANSMIT_DTMF_CODES:
printf("\n** Send DTMF Codes: '%s'\n", hfp_subevent_transmit_dtmf_codes_get_dtmf(event));
hfp_ag_send_dtmf_code_done(device_addr);
break;
case HFP_SUBEVENT_CALL_ANSWERED:
printf("Call answered by HF\n");
if (event[0] != HCI_EVENT_HFP_META) return;
if (event[3]
&& event[2] != HFP_SUBEVENT_PLACE_CALL_WITH_NUMBER
&& event[2] != HFP_SUBEVENT_ATTACH_NUMBER_TO_VOICE_TAG
&& event[2] != HFP_SUBEVENT_TRANSMIT_DTMF_CODES){
printf("ERROR, status: %u\n", event[3]);
return;
}
switch (event[2]) {
case HFP_SUBEVENT_SERVICE_LEVEL_CONNECTION_ESTABLISHED:
handle = hfp_subevent_service_level_connection_established_get_con_handle(event);
printf("Service level connection established.\n");
break;
case HFP_SUBEVENT_SERVICE_LEVEL_CONNECTION_RELEASED:
printf("Service level connection released.\n");
sco_handle = 0;
break;
case HFP_SUBEVENT_AUDIO_CONNECTION_ESTABLISHED:
if (hfp_subevent_audio_connection_established_get_status(event)){
printf("Audio connection establishment failed with status %u\n", hfp_subevent_audio_connection_established_get_status(event));
sco_handle = 0;
} else {
sco_handle = hfp_subevent_audio_connection_established_get_handle(event);
printf("Audio connection established with SCO handle 0x%04x.\n", sco_handle);
hci_request_sco_can_send_now_event();
}
break;
case HFP_SUBEVENT_AUDIO_CONNECTION_RELEASED:
printf("\n** Audio connection released **\n");
sco_handle = 0;
break;
case HFP_SUBEVENT_START_RINGINIG:
printf("\n** Start Ringing **\n");
break;
case HFP_SUBEVENT_STOP_RINGINIG:
printf("\n** Stop Ringing **\n");
break;
case HFP_SUBEVENT_PLACE_CALL_WITH_NUMBER:
printf("\n** Outgoing call '%s' **\n", hfp_subevent_place_call_with_number_get_number(event));
// validate number
if ( strcmp("1234567", hfp_subevent_place_call_with_number_get_number(event)) == 0
|| strcmp("7654321", hfp_subevent_place_call_with_number_get_number(event)) == 0
|| (memory_1_enabled && strcmp(">1", hfp_subevent_place_call_with_number_get_number(event)) == 0)){
printf("Dialstring valid: accept call\n");
hfp_ag_outgoing_call_accepted();
} else {
printf("Dialstring invalid: reject call\n");
hfp_ag_outgoing_call_rejected();
}
break;
case HFP_SUBEVENT_ATTACH_NUMBER_TO_VOICE_TAG:
printf("\n** Attach number to voice tag. Sending '1234567\n");
hfp_ag_send_phone_number_for_voice_tag(device_addr, "1234567");
break;
case HFP_SUBEVENT_TRANSMIT_DTMF_CODES:
printf("\n** Send DTMF Codes: '%s'\n", hfp_subevent_transmit_dtmf_codes_get_dtmf(event));
hfp_ag_send_dtmf_code_done(device_addr);
break;
case HFP_SUBEVENT_CALL_ANSWERED:
printf("Call answered by HF\n");
break;
default:
printf("Event not handled %u\n", event[2]);
break;
}
case HCI_SCO_DATA_PACKET:
sco_demo_receive(event, event_size);
break;
default:
printf("Event not handled %u\n", event[2]);
break;
}
}
@ -639,22 +666,28 @@ static hfp_phone_number_t subscriber_number = {
int btstack_main(int argc, const char * argv[]);
int btstack_main(int argc, const char * argv[]){
// HFP HS address is hardcoded, please change it
// init L2CAP
l2cap_init();
rfcomm_init();
sdp_init();
sco_demo_init();
gap_discoverable_control(1);
// L2CAP
l2cap_init();
// HFP
rfcomm_init();
hfp_ag_init(rfcomm_channel_nr);
hfp_ag_init_supported_features(0x3ef | (1<<HFP_AGSF_HF_INDICATORS) | (1<<HFP_AGSF_ESCO_S4));
hfp_ag_init_codecs(sizeof(codecs), codecs);
hfp_ag_init_ag_indicators(ag_indicators_nr, ag_indicators);
hfp_ag_init_hf_indicators(hf_indicators_nr, hf_indicators);
hfp_ag_init_call_hold_services(call_hold_services_nr, call_hold_services);
hfp_ag_set_subcriber_number_information(&subscriber_number, 1);
hfp_ag_register_packet_handler(packet_handler);
hfp_ag_register_packet_handler(&packet_handler);
hci_register_sco_packet_handler(&packet_handler);
// SDP Server
sdp_init();
memset(hfp_service_buffer, 0, sizeof(hfp_service_buffer));
hfp_ag_create_sdp_record( hfp_service_buffer, 0x10001, rfcomm_channel_nr, hfp_ag_service_name, 0, 0);
printf("SDP service record size: %u\n", de_get_len( hfp_service_buffer));

View File

@ -59,20 +59,24 @@
#include <unistd.h>
#include "btstack.h"
#include "sco_demo_util.h"
#ifdef HAVE_POSIX_STDIN
#include "stdin_support.h"
#endif
uint8_t hfp_service_buffer[150];
const uint8_t rfcomm_channel_nr = 1;
const char hfp_hf_service_name[] = "BTstack HFP HF Demo";
#ifdef HAVE_POSIX_STDIN
static bd_addr_t device_addr = {0xD8,0xBb,0x2C,0xDf,0xF1,0x08};
static bd_addr_t device_addr = {0x80,0xbe,0x05,0xd5,0x28,0x48};
// 80:BE:05:D5:28:48
// prototypes
static void show_usage(void);
#endif
static uint16_t handle = -1;
static hci_con_handle_t sco_handle;
static uint8_t codecs[] = {HFP_CODEC_CVSD, HFP_CODEC_MSBC};
static uint16_t indicators[1] = {0x01};
@ -85,7 +89,7 @@ static void show_usage(void){
printf("\n--- Bluetooth HFP Hands-Free (HF) unit Test Console ---\n");
printf("---\n");
printf("a - establish SLC connection to device\n");
printf("a - establish SLC connection to device %s\n", bd_addr_to_str(device_addr));
printf("A - release SLC connection to device\n");
printf("b - establish Audio connection\n");
@ -444,7 +448,13 @@ static void stdin_process(btstack_data_source_t *ds, btstack_data_source_callbac
}
#endif
static void packet_handler(uint8_t * event, uint16_t event_size){
static void packet_handler(uint8_t packet_type, uint16_t channel, uint8_t * event, uint16_t event_size){
if (event[0] == HCI_EVENT_SCO_CAN_SEND_NOW){
sco_demo_send(sco_handle);
return;
}
if (event[0] != HCI_EVENT_HFP_META) return;
switch (event[2]) {
@ -456,10 +466,18 @@ static void packet_handler(uint8_t * event, uint16_t event_size){
printf("Service level connection released.\n\n");
break;
case HFP_SUBEVENT_AUDIO_CONNECTION_ESTABLISHED:
printf("\n** Audio connection established **\n");
if (hfp_subevent_audio_connection_established_get_status(event)){
sco_handle = 0;
printf("Audio connection establishment failed with status %u\n", hfp_subevent_audio_connection_established_get_status(event));
} else {
sco_handle = hfp_subevent_audio_connection_established_get_handle(event);
printf("Audio connection established with SCO handle 0x%04x.\n", sco_handle);
hci_request_sco_can_send_now_event();
}
break;
case HFP_SUBEVENT_AUDIO_CONNECTION_RELEASED:
printf("\n** Audio connection released **\n");
sco_handle = 0;
printf("Audio connection released\n");
break;
case HFP_SUBEVENT_COMPLETE:
switch (cmd){
@ -512,6 +530,11 @@ static void packet_handler(uint8_t * event, uint16_t event_size){
/* LISTING_START(MainConfiguration): Setup HFP Hands-Free unit */
int btstack_main(int argc, const char * argv[]);
int btstack_main(int argc, const char * argv[]){
sco_demo_init();
gap_discoverable_control(1);
// HFP AG address is hardcoded, please change it
// init L2CAP
l2cap_init();
@ -524,6 +547,7 @@ int btstack_main(int argc, const char * argv[]){
hfp_hf_init_codecs(sizeof(codecs), codecs);
hfp_hf_register_packet_handler(packet_handler);
hci_register_sco_packet_handler(&packet_handler);
memset(hfp_service_buffer, 0, sizeof(hfp_service_buffer));
hfp_hf_create_sdp_record(hfp_service_buffer, 0x10001, rfcomm_channel_nr, hfp_hf_service_name, 0);

View File

@ -59,12 +59,11 @@
#include <unistd.h>
#include "btstack.h"
#include "sco_demo_util.h"
#ifdef HAVE_POSIX_STDIN
#include "stdin_support.h"
#endif
#define SCO_REPORT_PERIOD 255
static uint8_t hsp_service_buffer[150];
static const uint8_t rfcomm_channel_nr = 1;
static const char hsp_ag_service_name[] = "Audio Gateway Test";
@ -74,17 +73,6 @@ static char hs_cmd_buffer[100];
static bd_addr_t device_addr = {0x00,0x1b,0xDC,0x07,0x32,0xEF};
static int phase = 0;
// input signal: pre-computed sine wave, 160 Hz
static const uint8_t sine[] = {
0, 15, 31, 46, 61, 74, 86, 97, 107, 114,
120, 124, 126, 126, 124, 120, 114, 107, 97, 86,
74, 61, 46, 31, 15, 0, 241, 225, 210, 195,
182, 170, 159, 149, 142, 136, 132, 130, 130, 132,
136, 142, 149, 159, 170, 182, 195, 210, 225, 241,
};
/* @section Audio Transfer Setup
*
* @text A pre-computed sine wave (160Hz) is used as the input audio signal. 160 Hz.
@ -190,102 +178,77 @@ static void stdin_process(btstack_data_source_t *ds, btstack_data_source_callbac
}
#endif
static void send_sco_data(void){
if (!sco_handle) return;
const int sco_packet_length = hci_get_sco_packet_length();
const int sco_payload_length = sco_packet_length - 3;
const int frames_per_packet = sco_payload_length; // for 8-bit data. for 16-bit data it's /2
static void packet_handler(uint8_t packet_type, uint16_t channel, uint8_t * event, uint16_t event_size){
hci_reserve_packet_buffer();
uint8_t * sco_packet = hci_get_outgoing_packet_buffer();
// set handle + flags
little_endian_store_16(sco_packet, 0, sco_handle);
// set len
sco_packet[2] = sco_payload_length;
int i;
for (i=0;i<frames_per_packet;i++){
sco_packet[3+i] = sine[phase];
phase++;
if (phase >= sizeof(sine)) phase = 0;
}
hci_send_sco_packet_buffer(sco_packet_length);
switch (packet_type){
// request another send event
hci_request_sco_can_send_now_event();
static int count = 0;
count++;
if ((count & SCO_REPORT_PERIOD) == 0) printf("Sent %u\n", count);
}
static void sco_packet_handler(uint8_t packet_type, uint8_t * packet, uint16_t size){
return;
static int count = 0;
count++;
if ((count & SCO_REPORT_PERIOD)) return;
printf("SCO packets %u\n", count);
}
static void packet_handler(uint8_t * event, uint16_t event_size){
switch (event[0]) {
case BTSTACK_EVENT_STATE:
if (event[2] != HCI_STATE_WORKING) break;
show_usage();
case HCI_SCO_DATA_PACKET:
sco_demo_receive(event, event_size);
break;
case HCI_EVENT_SCO_CAN_SEND_NOW:
send_sco_data();
break;
case HCI_EVENT_HSP_META:
switch (event[2]) {
case HSP_SUBEVENT_RFCOMM_CONNECTION_COMPLETE:
if (hsp_subevent_rfcomm_connection_complete_get_status(event)){
printf("RFCOMM connection establishement failed with status %u\n", hsp_subevent_audio_connection_complete_get_handle(event));
} else {
printf("RFCOMM connection established.\n");
}
case HCI_EVENT_PACKET:
switch (event[0]) {
case BTSTACK_EVENT_STATE:
if (event[2] != HCI_STATE_WORKING) break;
show_usage();
break;
case HSP_SUBEVENT_RFCOMM_DISCONNECTION_COMPLETE:
if (hsp_subevent_rfcomm_disconnection_complete_get_status(event)){
printf("RFCOMM disconnection failed with status %u.\n", hsp_subevent_rfcomm_disconnection_complete_get_status(event));
} else {
printf("RFCOMM disconnected.\n");
case HCI_EVENT_SCO_CAN_SEND_NOW:
sco_demo_send(sco_handle);
break;
case HCI_EVENT_HSP_META:
switch (event[2]) {
case HSP_SUBEVENT_RFCOMM_CONNECTION_COMPLETE:
if (hsp_subevent_rfcomm_connection_complete_get_status(event)){
printf("RFCOMM connection establishement failed with status %u\n", hsp_subevent_rfcomm_connection_complete_get_status(event));
} else {
printf("RFCOMM connection established.\n");
}
break;
case HSP_SUBEVENT_RFCOMM_DISCONNECTION_COMPLETE:
if (hsp_subevent_rfcomm_disconnection_complete_get_status(event)){
printf("RFCOMM disconnection failed with status %u.\n", hsp_subevent_rfcomm_disconnection_complete_get_status(event));
} else {
printf("RFCOMM disconnected.\n");
}
break;
case HSP_SUBEVENT_AUDIO_CONNECTION_COMPLETE:
if (hsp_subevent_audio_connection_complete_get_status(event)){
printf("Audio connection establishment failed with status %u\n", hsp_subevent_audio_connection_complete_get_status(event));
sco_handle = 0;
} else {
sco_handle = hsp_subevent_audio_connection_complete_get_handle(event);
printf("Audio connection established with SCO handle 0x%04x.\n", sco_handle);
hci_request_sco_can_send_now_event();
}
break;
case HSP_SUBEVENT_AUDIO_DISCONNECTION_COMPLETE:
if (hsp_subevent_audio_disconnection_complete_get_status(event)){
printf("Audio connection releasing failed with status %u\n", hsp_subevent_audio_disconnection_complete_get_status(event));
} else {
printf("Audio connection released.\n\n");
sco_handle = 0;
}
break;
case HSP_SUBEVENT_MICROPHONE_GAIN_CHANGED:
printf("Received microphone gain change %d\n", hsp_subevent_microphone_gain_changed_get_gain(event));
break;
case HSP_SUBEVENT_SPEAKER_GAIN_CHANGED:
printf("Received speaker gain change %d\n", hsp_subevent_speaker_gain_changed_get_gain(event));
break;
case HSP_SUBEVENT_HS_COMMAND:{
memset(hs_cmd_buffer, 0, sizeof(hs_cmd_buffer));
int cmd_length = hsp_subevent_hs_command_get_value_length(event);
int size = cmd_length <= sizeof(hs_cmd_buffer)? cmd_length : sizeof(hs_cmd_buffer);
memcpy(hs_cmd_buffer, hsp_subevent_hs_command_get_value(event), size - 1);
printf("Received custom command: \"%s\". \nExit code or call hsp_ag_send_result.\n", hs_cmd_buffer);
break;
}
default:
printf("event not handled %u\n", event[2]);
break;
}
break;
case HSP_SUBEVENT_AUDIO_CONNECTION_COMPLETE:
if (hsp_subevent_audio_connection_complete_get_status(event)){
printf("Audio connection establishment failed with status %u\n", hsp_subevent_audio_connection_complete_get_status(event));
sco_handle = 0;
} else {
sco_handle = hsp_subevent_audio_connection_complete_get_handle(event);
printf("Audio connection established with SCO handle 0x%04x.\n", sco_handle);
hci_request_sco_can_send_now_event();
}
break;
case HSP_SUBEVENT_AUDIO_DISCONNECTION_COMPLETE:
if (hsp_subevent_audio_disconnection_complete_get_status(event)){
printf("Audio connection releasing failed with status %u\n", hsp_subevent_audio_disconnection_complete_get_status(event));
} else {
printf("Audio connection released.\n\n");
sco_handle = 0;
}
break;
case HSP_SUBEVENT_MICROPHONE_GAIN_CHANGED:
printf("Received microphone gain change %d\n", hsp_subevent_microphone_gain_changed_get_gain(event));
break;
case HSP_SUBEVENT_SPEAKER_GAIN_CHANGED:
printf("Received speaker gain change %d\n", hsp_subevent_speaker_gain_changed_get_gain(event));
break;
case HSP_SUBEVENT_HS_COMMAND:{
memset(hs_cmd_buffer, 0, sizeof(hs_cmd_buffer));
int cmd_length = hsp_subevent_hs_command_get_value_length(event);
int size = cmd_length <= sizeof(hs_cmd_buffer)? cmd_length : sizeof(hs_cmd_buffer);
memcpy(hs_cmd_buffer, hsp_subevent_hs_command_get_value(event), size - 1);
printf("Received custom command: \"%s\". \nExit code or call hsp_ag_send_result.\n", hs_cmd_buffer);
break;
}
default:
printf("event not handled %u\n", event[2]);
break;
}
break;
@ -312,7 +275,7 @@ static void packet_handler(uint8_t * event, uint16_t event_size){
int btstack_main(int argc, const char * argv[]);
int btstack_main(int argc, const char * argv[]){
hci_register_sco_packet_handler(&sco_packet_handler);
sco_demo_init();
l2cap_init();
@ -326,7 +289,8 @@ int btstack_main(int argc, const char * argv[]){
rfcomm_init();
hsp_ag_init(rfcomm_channel_nr);
hsp_ag_register_packet_handler(packet_handler);
hsp_ag_register_packet_handler(&packet_handler);
hci_register_sco_packet_handler(&packet_handler);
#ifdef HAVE_POSIX_STDIN
btstack_stdin_setup(stdin_process);

View File

@ -59,12 +59,11 @@
#include <unistd.h>
#include "btstack.h"
#include "sco_demo_util.h"
#ifdef HAVE_POSIX_STDIN
#include "stdin_support.h"
#endif
#define SCO_REPORT_PERIOD 255
static btstack_packet_callback_registration_t hci_event_callback_registration;
static uint8_t hsp_service_buffer[150];
@ -75,17 +74,6 @@ static hci_con_handle_t sco_handle = 0;
static char hs_cmd_buffer[100];
static bd_addr_t device_addr = {0x00,0x1b,0xDC,0x07,0x32,0xEF};
static int phase = 0;
// input signal: pre-computed sine wave, 160 Hz
static const uint8_t sine[] = {
0, 15, 31, 46, 61, 74, 86, 97, 107, 114,
120, 124, 126, 126, 124, 120, 114, 107, 97, 86,
74, 61, 46, 31, 15, 0, 241, 225, 210, 195,
182, 170, 159, 149, 142, 136, 132, 130, 130, 132,
136, 142, 149, 159, 170, 182, 195, 210, 225, 241,
};
/* @section Audio Transfer Setup
*
* @text A pre-computed sine wave (160Hz) is used as the input audio signal. 160 Hz.
@ -190,120 +178,87 @@ static void stdin_process(btstack_data_source_t *ds, btstack_data_source_callbac
}
#endif
static void send_sco_data(void){
if (!sco_handle) return;
const int sco_packet_length = hci_get_sco_packet_length();
const int sco_payload_length = sco_packet_length - 3;
const int frames_per_packet = sco_payload_length; // for 8-bit data. for 16-bit data it's /2
hci_reserve_packet_buffer();
uint8_t * sco_packet = hci_get_outgoing_packet_buffer();
// set handle + flags
little_endian_store_16(sco_packet, 0, sco_handle);
// set len
sco_packet[2] = sco_payload_length;
int i;
for (i=0;i<frames_per_packet;i++){
sco_packet[3+i] = sine[phase];
phase++;
if (phase >= sizeof(sine)) phase = 0;
}
hci_send_sco_packet_buffer(sco_packet_length);
// request another send event
hci_request_sco_can_send_now_event();
static int count = 0;
count++;
if ((count & 15) == 0) printf("Sent %u\n", count);
}
static void sco_packet_handler(uint8_t packet_type, uint8_t * packet, uint16_t size){
static int count = 0;
// hexdumpf(packet, size);
count++;
if ((count & SCO_REPORT_PERIOD)) return;
printf("SCO packets %u\n", count);
}
static void packet_handler(uint8_t * event, uint16_t event_size){
switch (event[0]) {
case BTSTACK_EVENT_STATE:
if (btstack_event_state_get_state(event) != HCI_STATE_WORKING) break;
show_usage();
static void packet_handler(uint8_t packet_type, uint16_t channel, uint8_t * event, uint16_t event_size){
switch (packet_type){
case HCI_SCO_DATA_PACKET:
sco_demo_receive(event, event_size);
break;
case HCI_EVENT_SCO_CAN_SEND_NOW:
send_sco_data();
break;
case HCI_EVENT_HSP_META:
switch (event[2]) {
case HSP_SUBEVENT_RFCOMM_CONNECTION_COMPLETE:
if (hsp_subevent_rfcomm_connection_complete_get_status(event)){
printf("RFCOMM connection establishement failed with status %u\n", hsp_subevent_audio_connection_complete_get_handle(event));
} else {
printf("RFCOMM connection established.\n");
}
case HCI_EVENT_PACKET:
switch (event[0]) {
case BTSTACK_EVENT_STATE:
if (btstack_event_state_get_state(event) != HCI_STATE_WORKING) break;
show_usage();
break;
case HSP_SUBEVENT_RFCOMM_DISCONNECTION_COMPLETE:
if (hsp_subevent_rfcomm_disconnection_complete_get_status(event)){
printf("RFCOMM disconnection failed with status %u.\n", hsp_subevent_rfcomm_disconnection_complete_get_status(event));
} else {
printf("RFCOMM disconnected.\n");
}
case HCI_EVENT_SCO_CAN_SEND_NOW:
sco_demo_send(sco_handle);
break;
case HSP_SUBEVENT_AUDIO_CONNECTION_COMPLETE:
if (hsp_subevent_audio_connection_complete_get_status(event)){
printf("Audio connection establishment failed with status %u\n", hsp_subevent_audio_connection_complete_get_status(event));
sco_handle = 0;
} else {
sco_handle = hsp_subevent_audio_connection_complete_get_handle(event);
printf("Audio connection established with SCO handle 0x%04x.\n", sco_handle);
hci_request_sco_can_send_now_event();
}
break;
case HSP_SUBEVENT_AUDIO_DISCONNECTION_COMPLETE:
if (hsp_subevent_audio_disconnection_complete_get_status(event)){
printf("Audio connection releasing failed with status %u\n", hsp_subevent_audio_disconnection_complete_get_status(event));
} else {
printf("Audio connection released.\n\n");
sco_handle = 0;
}
break;
case HSP_SUBEVENT_MICROPHONE_GAIN_CHANGED:
printf("Received microphone gain change %d\n", hsp_subevent_microphone_gain_changed_get_gain(event));
break;
case HSP_SUBEVENT_SPEAKER_GAIN_CHANGED:
printf("Received speaker gain change %d\n", hsp_subevent_speaker_gain_changed_get_gain(event));
break;
case HSP_SUBEVENT_RING:
printf("HS: RING RING!\n");
break;
case HSP_SUBEVENT_AG_INDICATION: {
memset(hs_cmd_buffer, 0, sizeof(hs_cmd_buffer));
int size = hsp_subevent_ag_indication_get_value_length(event);
if (size >= sizeof(hs_cmd_buffer)-1){
size = sizeof(hs_cmd_buffer)-1;
}
memcpy(hs_cmd_buffer, hsp_subevent_ag_indication_get_value(event), size);
printf("Received custom indication: \"%s\". \nExit code or call hsp_hs_send_result.\n", hs_cmd_buffer);
case HCI_EVENT_HSP_META:
switch (event[2]) {
case HSP_SUBEVENT_RFCOMM_CONNECTION_COMPLETE:
if (hsp_subevent_rfcomm_connection_complete_get_status(event)){
printf("RFCOMM connection establishement failed with status %u\n", hsp_subevent_rfcomm_connection_complete_get_status(event));
} else {
printf("RFCOMM connection established.\n");
}
break;
case HSP_SUBEVENT_RFCOMM_DISCONNECTION_COMPLETE:
if (hsp_subevent_rfcomm_disconnection_complete_get_status(event)){
printf("RFCOMM disconnection failed with status %u.\n", hsp_subevent_rfcomm_disconnection_complete_get_status(event));
} else {
printf("RFCOMM disconnected.\n");
}
break;
case HSP_SUBEVENT_AUDIO_CONNECTION_COMPLETE:
if (hsp_subevent_audio_connection_complete_get_status(event)){
printf("Audio connection establishment failed with status %u\n", hsp_subevent_audio_connection_complete_get_status(event));
sco_handle = 0;
} else {
sco_handle = hsp_subevent_audio_connection_complete_get_handle(event);
printf("Audio connection established with SCO handle 0x%04x.\n", sco_handle);
hci_request_sco_can_send_now_event();
}
break;
case HSP_SUBEVENT_AUDIO_DISCONNECTION_COMPLETE:
if (hsp_subevent_audio_disconnection_complete_get_status(event)){
printf("Audio connection releasing failed with status %u\n", hsp_subevent_audio_disconnection_complete_get_status(event));
} else {
printf("Audio connection released.\n\n");
sco_handle = 0;
}
break;
case HSP_SUBEVENT_MICROPHONE_GAIN_CHANGED:
printf("Received microphone gain change %d\n", hsp_subevent_microphone_gain_changed_get_gain(event));
break;
case HSP_SUBEVENT_SPEAKER_GAIN_CHANGED:
printf("Received speaker gain change %d\n", hsp_subevent_speaker_gain_changed_get_gain(event));
break;
case HSP_SUBEVENT_RING:
printf("HS: RING RING!\n");
break;
case HSP_SUBEVENT_AG_INDICATION: {
memset(hs_cmd_buffer, 0, sizeof(hs_cmd_buffer));
int size = hsp_subevent_ag_indication_get_value_length(event);
if (size >= sizeof(hs_cmd_buffer)-1){
size = sizeof(hs_cmd_buffer)-1;
}
memcpy(hs_cmd_buffer, hsp_subevent_ag_indication_get_value(event), size);
printf("Received custom indication: \"%s\". \nExit code or call hsp_hs_send_result.\n", hs_cmd_buffer);
}
}
break;
default:
printf("event not handled %u\n", event[2]);
break;
}
break;
default:
printf("event not handled %u\n", event[2]);
break;
}
break;
default:
break;
}
}
static void handle_hci_event(uint8_t packet_type, uint16_t channel, uint8_t * packet, uint16_t size){
packet_handler(packet, size);
}
/* @section Main Application Setup
*
* @text Listing MainConfiguration shows main application code.
@ -322,10 +277,12 @@ static void handle_hci_event(uint8_t packet_type, uint16_t channel, uint8_t * pa
int btstack_main(int argc, const char * argv[]);
int btstack_main(int argc, const char * argv[]){
sco_demo_init();
// register for HCI events
hci_event_callback_registration.callback = &handle_hci_event;
hci_event_callback_registration.callback = &packet_handler;
hci_add_event_handler(&hci_event_callback_registration);
hci_register_sco_packet_handler(&sco_packet_handler);
hci_register_sco_packet_handler(&packet_handler);
l2cap_init();

View File

@ -117,6 +117,9 @@ static void le_counter_setup(void){
heartbeat.process = &heartbeat_handler;
btstack_run_loop_set_timer(&heartbeat, HEARTBEAT_PERIOD_MS);
btstack_run_loop_add_timer(&heartbeat);
// beat once
beat();
}
/* LISTING_END */
@ -191,9 +194,11 @@ static void packet_handler (uint8_t packet_type, uint16_t channel, uint8_t *pack
static uint16_t att_read_callback(hci_con_handle_t connection_handle, uint16_t att_handle, uint16_t offset, uint8_t * buffer, uint16_t buffer_size){
if (att_handle == ATT_CHARACTERISTIC_0000FF11_0000_1000_8000_00805F9B34FB_01_VALUE_HANDLE){
if (buffer){
memcpy(buffer, &counter_string[offset], counter_string_len - offset);
memcpy(buffer, &counter_string[offset], buffer_size);
return buffer_size;
} else {
return counter_string_len;
}
return counter_string_len - offset;
}
return 0;
}

219
example/sco_demo_util.c Normal file
View File

@ -0,0 +1,219 @@
/*
* Copyright (C) 2016 BlueKitchen GmbH
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of the copyright holders nor the names of
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
* 4. Any redistribution, use, or modification is done solely for
* personal benefit and not for any commercial purpose or for
* monetary gain.
*
* THIS SOFTWARE IS PROVIDED BY BLUEKITCHEN GMBH AND CONTRIBUTORS
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL MATTHIAS
* RINGWALD OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
* THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* Please inquire about commercial licensing options at
* contact@bluekitchen-gmbh.com
*
*/
/*
* sco_demo_util.c - send/receive test data via SCO, used by hfp_*_demo and hsp_*_demo
*/
#include "sco_demo_util.h"
#include <stdio.h>
// configure test mode
#define SCO_DEMO_MODE_SINE 0
#define SCO_DEMO_MODE_ASCII 1
#define SCO_DEMO_MODE_COUNTER 2
// SCO demo configuration
#define SCO_DEMO_MODE SCO_DEMO_MODE_SINE
#define SCO_REPORT_PERIOD 100
// portaudio config
#define NUM_CHANNELS 1
#define SAMPLE_RATE 8000
#define FRAMES_PER_BUFFER 24
#define PA_SAMPLE_TYPE paInt8
#if defined(HAVE_PORTAUDIO) && (SCO_DEMO_MODE == SCO_DEMO_MODE_SINE)
#define USE_PORTAUDIO
#endif
#ifdef USE_PORTAUDIO
#include <portaudio.h>
// portaudio globals
static PaStream * stream;
#endif
#if SCO_DEMO_MODE == SCO_DEMO_MODE_SINE
// input signal: pre-computed sine wave, 160 Hz
static const uint8_t sine[] = {
0, 15, 31, 46, 61, 74, 86, 97, 107, 114,
120, 124, 126, 126, 124, 120, 114, 107, 97, 86,
74, 61, 46, 31, 15, 0, 241, 225, 210, 195,
182, 170, 159, 149, 142, 136, 132, 130, 130, 132,
136, 142, 149, 159, 170, 182, 195, 210, 225, 241,
};
#endif
static int phase;
void sco_demo_init(void){
// status
#if SCO_DEMO_MODE == SCO_DEMO_MODE_SINE
#ifdef HAVE_PORTAUDIO
printf("SCO Demo: Sending sine wave, audio output via portaudio.\n");
#else
printf("SCO Demo: Sending sine wave, hexdump received data.\n");
#endif
#endif
#if SCO_DEMO_MODE == SCO_DEMO_MODE_ASCII
printf("SCO Demo: Sending ASCII blocks, print received data.\n");
#endif
#if SCO_DEMO_MODE == SCO_DEMO_MODE_COUNTER
printf("SCO Demo: Sending counter value, hexdump received data.\n");
#endif
#ifdef USE_PORTAUDIO
int err;
PaStreamParameters outputParameters;
/* -- initialize PortAudio -- */
err = Pa_Initialize();
if( err != paNoError ) return;
/* -- setup input and output -- */
outputParameters.device = Pa_GetDefaultOutputDevice(); /* default output device */
outputParameters.channelCount = NUM_CHANNELS;
outputParameters.sampleFormat = PA_SAMPLE_TYPE;
outputParameters.suggestedLatency = Pa_GetDeviceInfo( outputParameters.device )->defaultHighOutputLatency;
outputParameters.hostApiSpecificStreamInfo = NULL;
/* -- setup stream -- */
err = Pa_OpenStream(
&stream,
NULL, // &inputParameters,
&outputParameters,
SAMPLE_RATE,
FRAMES_PER_BUFFER,
paClipOff, /* we won't output out of range samples so don't bother clipping them */
NULL, /* no callback, use blocking API */
NULL ); /* no callback, so no callback userData */
if( err != paNoError ) return;
/* -- start stream -- */
err = Pa_StartStream( stream );
if( err != paNoError ) return;
#endif
#if SCO_DEMO_MODE != SCO_DEMO_MODE_SINE
hci_set_sco_voice_setting(0x03); // linear, unsigned, 8-bit, transparent
#endif
#if SCO_DEMO_MODE == SCO_DEMO_MODE_ASCII
phase = 'a';
#endif
}
void sco_demo_send(hci_con_handle_t sco_handle){
if (!sco_handle) return;
const int sco_packet_length = 24 + 3; // hci_get_sco_packet_length();
const int sco_payload_length = sco_packet_length - 3;
hci_reserve_packet_buffer();
uint8_t * sco_packet = hci_get_outgoing_packet_buffer();
// set handle + flags
little_endian_store_16(sco_packet, 0, sco_handle);
// set len
sco_packet[2] = sco_payload_length;
const int frames_per_packet = sco_payload_length; // for 8-bit data. for 16-bit data it's /2
#if SCO_DEMO_MODE == SCO_DEMO_MODE_SINE
int i;
for (i=0;i<frames_per_packet;i++){
sco_packet[3+i] = sine[phase];
phase++;
if (phase >= sizeof(sine)) phase = 0;
}
#else
#if SCO_DEMO_MODE == SCO_DEMO_MODE_ASCII
memset(&sco_packet[3], phase++, frames_per_packet);
if (phase > 'z') phase = 'a';
#else
for (i=0;i<frames_per_packet;i++){
sco_packet[3+i] = phase++;
}
#endif
#endif
hci_send_sco_packet_buffer(sco_packet_length);
// request another send event
hci_request_sco_can_send_now_event();
static int count = 0;
count++;
if ((count % SCO_REPORT_PERIOD) == 0) printf("SCO: sent %u\n", count);
}
/**
* @brief Process received data
*/
void sco_demo_receive(uint8_t * packet, uint16_t size){
if (packet[1] & 0xf0){
printf("SCO CRC Error: %x - data: ", packet[1] >> 4);
printf_hexdump(&packet[3], size-3);
return;
}
#if SCO_DEMO_MODE == SCO_DEMO_MODE_SINE
#ifdef USE_PORTAUDIO
uint32_t start = btstack_run_loop_get_time_ms();
Pa_WriteStream( stream, &packet[3], size -3);
uint32_t end = btstack_run_loop_get_time_ms();
if (end - start > 5){
printf("Portaudio: write stream took %u ms\n", end - start);
}
#else
printf_hexdump(&packet[3], size-3);
#endif
#else
printf("data: ");
#if SCO_DEMO_MODE == SCO_DEMO_MODE_ASCII
int i;
for (i=3;i<size;i++){
printf("%c", packet[i]);
}
printf("\n");
#endif
printf_hexdump(&packet[3], size-3);
#endif
static int count = 0;
count++;
if ((count % SCO_REPORT_PERIOD) == 0) printf("SCO: received %u\n", count);
}

72
example/sco_demo_util.h Normal file
View File

@ -0,0 +1,72 @@
/*
* Copyright (C) 2016 BlueKitchen GmbH
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of the copyright holders nor the names of
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
* 4. Any redistribution, use, or modification is done solely for
* personal benefit and not for any commercial purpose or for
* monetary gain.
*
* THIS SOFTWARE IS PROVIDED BY BLUEKITCHEN GMBH AND CONTRIBUTORS
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL MATTHIAS
* RINGWALD OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
* THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* Please inquire about commercial licensing options at
* contact@bluekitchen-gmbh.com
*
*/
/*
* sco_demo_util.h - send/receive test data via SCO, used by hfp_*_demo and hsp_*_demo
*/
#ifndef __SCO_DEMO_UTIL_H
#define __SCO_DEMO_UTIL_H
#include "hci.h"
#if defined __cplusplus
extern "C" {
#endif
/**
* @brief Init demo SCO data production/consumtion
*/
void sco_demo_init(void);
/**
* @brief Send next data on con_handle
* @param con_handle
*/
void sco_demo_send(hci_con_handle_t con_handle);
/**
* @brief Process received data
*/
void sco_demo_receive(uint8_t * packet, uint16_t size);
#if defined __cplusplus
}
#endif
#endif

View File

@ -178,10 +178,11 @@ static void packet_handler (uint8_t packet_type, uint16_t channel, uint8_t *pack
static uint16_t att_read_callback(hci_con_handle_t con_handle, uint16_t att_handle, uint16_t offset, uint8_t * buffer, uint16_t buffer_size){
if (att_handle == ATT_CHARACTERISTIC_0000FF11_0000_1000_8000_00805F9B34FB_01_VALUE_HANDLE){
if (buffer){
log_info("att_read_callback for Characteristic *FF11*, value %s", counter_string);
memcpy(buffer, &counter_string[offset], counter_string_len - offset);
memcpy(buffer, &counter_string[offset], buffer_size);
return buffer_size;
} else {
return counter_string_len;
}
return counter_string_len - offset;
}
return 0;
}
@ -207,6 +208,12 @@ static int att_write_callback(hci_con_handle_t con_handle, uint16_t att_handle,
}
}
static void beat(void){
counter++;
counter_string_len = sprintf(counter_string, "BTstack counter %04u", counter);
puts(counter_string);
}
/*
* @section Heartbeat Handler
*
@ -217,9 +224,9 @@ static int att_write_callback(hci_con_handle_t con_handle, uint16_t att_handle,
/* LISTING_START(heartbeat): Combined Heartbeat handler */
static void heartbeat_handler(struct btstack_timer_source *ts){
counter++;
counter_string_len = sprintf(counter_string, "BTstack counter %04u\n", counter);
// log_info("%s", counter_string);
if (rfcomm_channel_id || le_notification_enabled) {
beat();
}
if (rfcomm_channel_id){
rfcomm_request_can_send_now_event(rfcomm_channel_id);
@ -228,6 +235,7 @@ static void heartbeat_handler(struct btstack_timer_source *ts){
if (le_notification_enabled) {
att_server_request_can_send_now_event(att_con_handle);
}
btstack_run_loop_set_timer(ts, HEARTBEAT_PERIOD_MS);
btstack_run_loop_add_timer(ts);
}
@ -288,6 +296,9 @@ int btstack_main(void)
gap_advertisements_set_data(adv_data_len, (uint8_t*) adv_data);
gap_advertisements_enable(1);
// beat once
beat();
// turn on!
hci_power_control(HCI_POWER_ON);

View File

@ -85,8 +85,8 @@ static void btstack_uart_embedded_process(btstack_data_source_t *ds, btstack_dat
send_complete = 0;
block_sent();
}
if (block_received){
block_received = 0;
if (receive_complete){
receive_complete = 0;
block_received();
}
break;

View File

@ -59,7 +59,7 @@
#error HCI_OUTGOING_PRE_BUFFER_SIZE not defined. Please update hci.h
#endif
#ifdef HAVE_EHCILL
#ifdef ENABLE_EHCILL
#error "HCI Transport H4 DMA does not support eHCILL. Please use hci_transport_h4_ehcill_dma.c instead."
#endif
@ -67,6 +67,7 @@ typedef enum {
H4_W4_PACKET_TYPE = 1,
H4_W4_EVENT_HEADER,
H4_W4_ACL_HEADER,
H4_W4_SCO_HEADER,
H4_W4_PAYLOAD,
H4_PACKET_RECEIVED
} H4_STATE;
@ -172,13 +173,17 @@ static void h4_block_received(void){
switch (h4_state) {
case H4_W4_PACKET_TYPE:
switch (hci_packet[0]) {
case HCI_EVENT_PACKET:
h4_state = H4_W4_EVENT_HEADER;
bytes_to_read = HCI_EVENT_HEADER_SIZE;
break;
case HCI_ACL_DATA_PACKET:
h4_state = H4_W4_ACL_HEADER;
bytes_to_read = HCI_ACL_HEADER_SIZE;
break;
case HCI_EVENT_PACKET:
h4_state = H4_W4_EVENT_HEADER;
bytes_to_read = HCI_EVENT_HEADER_SIZE;
case HCI_SCO_DATA_PACKET:
h4_state = H4_W4_SCO_HEADER;
bytes_to_read = HCI_SCO_HEADER_SIZE;
break;
default:
log_error("h4_process: invalid packet type 0x%02x", hci_packet[0]);
@ -210,7 +215,16 @@ static void h4_block_received(void){
}
h4_state = H4_W4_PAYLOAD;
break;
case H4_W4_SCO_HEADER:
bytes_to_read = hci_packet[2];
if (bytes_to_read == 0) {
h4_state = H4_PACKET_RECEIVED;
break;
}
h4_state = H4_W4_PAYLOAD;
break;
case H4_W4_PAYLOAD:
h4_state = H4_PACKET_RECEIVED;
bytes_to_read = 0;

View File

@ -4,8 +4,8 @@
#
# init scripts
CC2560B = bluetooth_init_cc2560B_1.2_BT_Spec_4.1.o
CC2564B = bluetooth_init_cc2564B_1.2_BT_Spec_4.1.o
CC2560B = bluetooth_init_cc2560B_1.4_BT_Spec_4.1.o
CC2564B = bluetooth_init_cc2564B_1.4_BT_Spec_4.1.o
CC2567 = CC256x_BT_Service_Pack_2.8_ANT_1.16.o
BTSTACK_ROOT = ../..

View File

@ -8,7 +8,6 @@
// Port related features
#define HAVE_INIT_SCRIPT
#define HAVE_EMBEDDED_TICK
#define HAVE_EHCILL
// BTstack features that can be enabled
#define ENABLE_BLE
@ -16,6 +15,7 @@
#define ENABLE_LOG_INTO_HCI_DUMP
// #define ENABLE_LOG_ERROR
// #define ENABLE_LOG_INFO
// #define ENABLE_EHCILL
// BTstack configuration. buffers, sizes, ...
#define HCI_ACL_PAYLOAD_SIZE 52

View File

@ -114,9 +114,6 @@ int main(void)
// inform about BTstack state
hci_event_callback_registration.callback = &packet_handler;
hci_add_event_handler(&hci_event_callback_registration);
// use eHCILL
btstack_chipset_cc256x_enable_ehcill(1);
// ready - enable irq used in h4 task
__enable_interrupt();

View File

@ -28,4 +28,11 @@ CFLAGS += $(shell pkg-config libusb-1.0 --cflags)
LDFLAGS += $(shell pkg-config libusb-1.0 --libs)
endif
# use pkg-config for portaudio
# CFLAGS += $(shell pkg-config portaudio-2.0 --cflags) -DHAVE_PORTAUDIO
# LDFLAGS += $(shell pkg-config portaudio-2.0 --libs)
# hard coded flags for portaudio in /usr/local/lib
# CFLAGS += -I/usr/local/include -DHAVE_PORTAUDIO
# LDFLAGS += -L/sw/lib -lportaudio -Wl,-framework,CoreAudio -Wl,-framework,AudioToolbox -Wl,-framework,AudioUnit -Wl,-framework,Carbon
all: ${EXAMPLES}

View File

@ -69,11 +69,13 @@
#define HAVE_USB_VENDOR_ID_AND_PRODUCT_ID
#endif
#define ASYNC_BUFFERS 2
#define AYSNC_POLLING_INTERVAL_MS 1
#define ASYNC_BUFFERS 3
#define ISOC_BUFFERS 10
#define ASYNC_POLLING_INTERVAL_MS 1
//
// Bluetooth USB Transprot Alternate Settings:
// Bluetooth USB Transport Alternate Settings:
//
// 0: No active voice channels (for USB compliance)
// 1: One 8 kHz voice channel with 8-bit encoding
@ -147,8 +149,8 @@ static H2_SCO_STATE sco_state;
static uint8_t sco_buffer[255+3 + SCO_PACKET_SIZE];
static uint16_t sco_read_pos;
static uint16_t sco_bytes_to_read;
static struct libusb_transfer *sco_in_transfer[ASYNC_BUFFERS];
static uint8_t hci_sco_in_buffer[ASYNC_BUFFERS][SCO_PACKET_SIZE];
static struct libusb_transfer *sco_in_transfer[ISOC_BUFFERS];
static uint8_t hci_sco_in_buffer[ISOC_BUFFERS][SCO_PACKET_SIZE];
// outgoing SCO
static uint8_t sco_ring_buffer[SCO_RING_BUFFER_SIZE];
@ -439,7 +441,7 @@ static void usb_process_ts(btstack_timer_source_t *timer) {
usb_process_ds((struct btstack_data_source *) NULL, DATA_SOURCE_CALLBACK_READ);
// Get the amount of time until next event is due
long msec = AYSNC_POLLING_INTERVAL_MS;
long msec = ASYNC_POLLING_INTERVAL_MS;
// Activate timer
btstack_run_loop_set_timer(&usb_timer, msec);
@ -774,7 +776,7 @@ static int usb_open(void){
#ifdef ENABLE_SCO_OVER_HCI
// incoming
for (c = 0 ; c < ASYNC_BUFFERS ; c++) {
for (c = 0 ; c < ISOC_BUFFERS ; c++) {
sco_in_transfer[c] = libusb_alloc_transfer(NUM_ISO_PACKETS); // isochronous transfers SCO in
log_info("Alloc iso transfer");
if (!sco_in_transfer[c]) {
@ -853,7 +855,7 @@ static int usb_open(void){
log_info("Async using timers:");
usb_timer.process = usb_process_ts;
btstack_run_loop_set_timer(&usb_timer, AYSNC_POLLING_INTERVAL_MS);
btstack_run_loop_set_timer(&usb_timer, ASYNC_POLLING_INTERVAL_MS);
btstack_run_loop_add_timer(&usb_timer);
usb_timer_active = 1;
}
@ -882,10 +884,13 @@ static int usb_close(void){
for (c = 0 ; c < ASYNC_BUFFERS ; c++) {
libusb_cancel_transfer(event_in_transfer[c]);
libusb_cancel_transfer(acl_in_transfer[c]);
#ifdef ENABLE_SCO_OVER_HCI
libusb_cancel_transfer(sco_in_transfer[c]);
#endif
}
#ifdef ENABLE_SCO_OVER_HCI
// Cancel all synchronous transfer
for (c = 0 ; c < ISOC_BUFFERS ; c++) {
libusb_cancel_transfer(sco_in_transfer[c]);
}
#endif
/* TODO - find a better way to ensure that all transfers have completed */
struct timeval tv;
@ -905,16 +910,19 @@ static int usb_close(void){
}
case LIB_USB_INTERFACE_CLAIMED:
// Cancel any asynchronous transfers
for (c = 0 ; c < ASYNC_BUFFERS ; c++) {
if (event_in_transfer[c]) libusb_free_transfer(event_in_transfer[c]);
if (acl_in_transfer[c]) libusb_free_transfer(acl_in_transfer[c]);
#ifdef ENABLE_SCO_OVER_HCI
if (sco_in_transfer[c]) libusb_free_transfer(sco_in_transfer[c]);
#endif
libusb_cancel_transfer(event_in_transfer[c]);
libusb_cancel_transfer(acl_in_transfer[c]);
}
#ifdef ENABLE_SCO_OVER_HCI
// Cancel all synchronous transfer
for (c = 0 ; c < ISOC_BUFFERS ; c++) {
libusb_cancel_transfer(sco_in_transfer[c]);
}
#endif
// TODO free control and acl out transfers
libusb_release_interface(handle, 0);
case LIB_USB_DEVICE_OPENDED:

View File

@ -4,8 +4,8 @@
#
# init scripts
CC2560B = bluetooth_init_cc2560B_1.2_BT_Spec_4.1.o
CC2564B = bluetooth_init_cc2564B_1.2_BT_Spec_4.1.o
CC2560B = bluetooth_init_cc2560B_1.4_BT_Spec_4.1.o
CC2564B = bluetooth_init_cc2564B_1.4_BT_Spec_4.1.o
CC2567 = CC256x_BT_Service_Pack_2.8_ANT_1.16.o
BTSTACK_ROOT = ../..

View File

@ -6,7 +6,6 @@
#define __BTSTACK_CONFIG
// Port related features
#define HAVE_EHCILL
#define HAVE_INIT_SCRIPT
#define HAVE_EMBEDDED_TICK
@ -16,6 +15,7 @@
// #define ENABLE_LOG_INTO_HCI_DUMP
// #define ENABLE_LOG_ERROR
// #define ENABLE_LOG_INFO
// #define ENABLE_EHCILL
// BTstack configuration. buffers, sizes, ...
#define HCI_ACL_PAYLOAD_SIZE 52

View File

@ -384,9 +384,6 @@ int main(void){
hci_set_link_key_db(link_key_db);
hci_set_chipset(btstack_chipset_cc256x_instance());
// use eHCILL
btstack_chipset_cc256x_enable_ehcill(1);
// register for HCI events
hci_event_callback_registration.callback = &packet_handler;
hci_add_event_handler(&hci_event_callback_registration);

View File

@ -114,9 +114,6 @@ static void btstack_setup(void){
// inform about BTstack state
hci_event_callback_registration.callback = &packet_handler;
hci_add_event_handler(&hci_event_callback_registration);
// use eHCILL
btstack_chipset_cc256x_enable_ehcill(1);
}
int btstack_main(int argc, const char * argv[]);

View File

@ -4,8 +4,8 @@
#
# init scripts
CC2560B = bluetooth_init_cc2560B_1.2_BT_Spec_4.1.o
CC2564B = bluetooth_init_cc2564B_1.2_BT_Spec_4.1.o
CC2560B = bluetooth_init_cc2560B_1.4_BT_Spec_4.1.o
CC2564B = bluetooth_init_cc2564B_1.4_BT_Spec_4.1.o
CC2567 = CC256x_BT_Service_Pack_2.8_ANT_1.16.o
BTSTACK_ROOT = ../..

View File

@ -9,14 +9,13 @@
#define HAVE_INIT_SCRIPT
#define HAVE_EMBEDDED_TICK
// #define HAVE_EHCILL
// BTstack features that can be enabled
#define ENABLE_BLE
#define ENABLE_CLASSIC
#define ENABLE_LOG_INTO_HCI_DUMP
// #define ENABLE_LOG_ERROR
// #define ENABLE_LOG_INFO
// #define ENABLE_EHCILL
// BTstack configuration. buffers, sizes, ...
#define HCI_ACL_PAYLOAD_SIZE 52

View File

@ -121,9 +121,6 @@ static void btstack_setup(void){
// inform about BTstack state
hci_event_callback_registration.callback = &packet_handler;
hci_add_event_handler(&hci_event_callback_registration);
// use eHCILL
// btstack_chipset_cc256x_enable_ehcill(1);
}
int btstack_main(int argc, const char * argv[]);

View File

@ -6,9 +6,7 @@
#define __BTSTACK_CONFIG
// Port related features
#define HAVE_EHCILL
#define HAVE_EMBEDDED_TIME_MS
#define WICED_BT_UART_MANUAL_CTS_RTS
// BTstack features that can be enabled
#define ENABLE_BLE

File diff suppressed because it is too large Load Diff

View File

@ -1,7 +0,0 @@
BTstack Port for the Microchip PIC32 Harmony Platform
Status: Port started
Installation: place BTstack tree into harmony/framework folder.
Examples: app.X can be opened and compiled in Microchip MPLABX

View File

@ -0,0 +1,16 @@
# BTstack Port for the Microchip PIC32 Harmony Platform
Status: All examples working, polling UART driver. Tested on Bluetooth Audio Development Kit only.
## Setup
- Place BTstack tree into harmony/framework folder.
-Rrun port/pic32-harmony/create_examples.py to create examples in harmony/apps/btstack folder.
## Usage
The examples can be opened and compiled in Microchip MPLABX.
### Modifications to the GATT Database
After changing the GATT definition in $example.gatt, please run ./update_gatt_db.h to regenerate $example.h in the $example folder.

View File

@ -45,17 +45,17 @@ OBJECTDIR=build/${CND_CONF}/${IMAGE_TYPE}
DISTDIR=dist/${CND_CONF}/${IMAGE_TYPE}
# Source Files Quoted if spaced
SOURCEFILES_QUOTED_IF_SPACED=../src/system_config/bk-audio-dk/system_init.c ../src/system_config/bk-audio-dk/system_tasks.c ../src/btstack_port.c ../src/app_debug.c ../src/app.c ../src/main.c ../../../example/spp_and_le_counter.c ../../../src/ble/ad_parser.c ../../../src/ble/att_db.c ../../../src/ble/att_dispatch.c ../../../src/ble/att_server.c ../../../src/ble/le_device_db_memory.c ../../../src/ble/sm.c ../../../chipset/csr/btstack_chipset_csr.c ../../../src/btstack_memory.c ../../../src/hci.c ../../../src/hci_cmd.c ../../../src/hci_dump.c ../../../src/l2cap.c ../../../src/l2cap_signaling.c ../../../src/btstack_linked_list.c ../../../src/btstack_memory_pool.c ../../../src/classic/btstack_link_key_db_memory.c ../../../src/classic/rfcomm.c ../../../src/btstack_run_loop.c ../../../src/classic/sdp_server.c ../../../src/classic/sdp_client.c ../../../src/classic/sdp_client_rfcomm.c ../../../src/classic/sdp_util.c ../../../src/btstack_util.c ../../../platform/embedded/btstack_run_loop_embedded.c ../../../platform/embedded/hci_transport_h4_embedded.c ../../../../driver/tmr/src/dynamic/drv_tmr.c ../../../../system/clk/src/sys_clk.c ../../../../system/clk/src/sys_clk_pic32mx.c ../../../../system/devcon/src/sys_devcon.c ../../../../system/devcon/src/sys_devcon_pic32mx.c ../../../../system/int/src/sys_int_pic32.c ../../../../system/ports/src/sys_ports.c
SOURCEFILES_QUOTED_IF_SPACED=../src/system_config/bt_audio_dk/system_init.c ../src/system_config/bt_audio_dk/system_tasks.c ../src/btstack_port.c ../src/app_debug.c ../src/app.c ../src/main.c ../../../example/spp_and_le_counter.c ../../../src/ble/ad_parser.c ../../../src/ble/att_db.c ../../../src/ble/att_dispatch.c ../../../src/ble/att_server.c ../../../src/ble/le_device_db_memory.c ../../../src/ble/sm.c ../../../chipset/csr/btstack_chipset_csr.c ../../../platform/embedded/btstack_run_loop_embedded.c ../../../platform/embedded/btstack_uart_block_embedded.c ../../../src/btstack_memory.c ../../../src/hci.c ../../../src/hci_cmd.c ../../../src/hci_dump.c ../../../src/l2cap.c ../../../src/l2cap_signaling.c ../../../src/btstack_linked_list.c ../../../src/btstack_memory_pool.c ../../../src/classic/btstack_link_key_db_memory.c ../../../src/classic/rfcomm.c ../../../src/btstack_run_loop.c ../../../src/classic/sdp_server.c ../../../src/classic/sdp_client.c ../../../src/classic/sdp_client_rfcomm.c ../../../src/classic/sdp_util.c ../../../src/btstack_util.c ../../../src/classic/spp_server.c ../../../src/hci_transport_h4.c ../../../src/hci_transport_h5.c ../../../src/btstack_slip.c ../../../../driver/tmr/src/dynamic/drv_tmr.c ../../../../system/clk/src/sys_clk.c ../../../../system/clk/src/sys_clk_pic32mx.c ../../../../system/devcon/src/sys_devcon.c ../../../../system/devcon/src/sys_devcon_pic32mx.c ../../../../system/int/src/sys_int_pic32.c ../../../../system/ports/src/sys_ports.c
# Object Files Quoted if spaced
OBJECTFILES_QUOTED_IF_SPACED=${OBJECTDIR}/_ext/2048875307/system_init.o ${OBJECTDIR}/_ext/2048875307/system_tasks.o ${OBJECTDIR}/_ext/1360937237/btstack_port.o ${OBJECTDIR}/_ext/1360937237/app_debug.o ${OBJECTDIR}/_ext/1360937237/app.o ${OBJECTDIR}/_ext/1360937237/main.o ${OBJECTDIR}/_ext/97075643/spp_and_le_counter.o ${OBJECTDIR}/_ext/534563071/ad_parser.o ${OBJECTDIR}/_ext/534563071/att_db.o ${OBJECTDIR}/_ext/534563071/att_dispatch.o ${OBJECTDIR}/_ext/534563071/att_server.o ${OBJECTDIR}/_ext/534563071/le_device_db_memory.o ${OBJECTDIR}/_ext/534563071/sm.o ${OBJECTDIR}/_ext/1768064806/btstack_chipset_csr.o ${OBJECTDIR}/_ext/1386528437/btstack_memory.o ${OBJECTDIR}/_ext/1386528437/hci.o ${OBJECTDIR}/_ext/1386528437/hci_cmd.o ${OBJECTDIR}/_ext/1386528437/hci_dump.o ${OBJECTDIR}/_ext/1386528437/l2cap.o ${OBJECTDIR}/_ext/1386528437/l2cap_signaling.o ${OBJECTDIR}/_ext/1386528437/btstack_linked_list.o ${OBJECTDIR}/_ext/1386528437/btstack_memory_pool.o ${OBJECTDIR}/_ext/1386327864/btstack_link_key_db_memory.o ${OBJECTDIR}/_ext/1386327864/rfcomm.o ${OBJECTDIR}/_ext/1386528437/btstack_run_loop.o ${OBJECTDIR}/_ext/1386327864/sdp_server.o ${OBJECTDIR}/_ext/1386327864/sdp_client.o ${OBJECTDIR}/_ext/1386327864/sdp_client_rfcomm.o ${OBJECTDIR}/_ext/1386327864/sdp_util.o ${OBJECTDIR}/_ext/1386528437/btstack_util.o ${OBJECTDIR}/_ext/993942601/btstack_run_loop_embedded.o ${OBJECTDIR}/_ext/993942601/hci_transport_h4_embedded.o ${OBJECTDIR}/_ext/1880736137/drv_tmr.o ${OBJECTDIR}/_ext/1112166103/sys_clk.o ${OBJECTDIR}/_ext/1112166103/sys_clk_pic32mx.o ${OBJECTDIR}/_ext/1510368962/sys_devcon.o ${OBJECTDIR}/_ext/1510368962/sys_devcon_pic32mx.o ${OBJECTDIR}/_ext/2087176412/sys_int_pic32.o ${OBJECTDIR}/_ext/2147153351/sys_ports.o
POSSIBLE_DEPFILES=${OBJECTDIR}/_ext/2048875307/system_init.o.d ${OBJECTDIR}/_ext/2048875307/system_tasks.o.d ${OBJECTDIR}/_ext/1360937237/btstack_port.o.d ${OBJECTDIR}/_ext/1360937237/app_debug.o.d ${OBJECTDIR}/_ext/1360937237/app.o.d ${OBJECTDIR}/_ext/1360937237/main.o.d ${OBJECTDIR}/_ext/97075643/spp_and_le_counter.o.d ${OBJECTDIR}/_ext/534563071/ad_parser.o.d ${OBJECTDIR}/_ext/534563071/att_db.o.d ${OBJECTDIR}/_ext/534563071/att_dispatch.o.d ${OBJECTDIR}/_ext/534563071/att_server.o.d ${OBJECTDIR}/_ext/534563071/le_device_db_memory.o.d ${OBJECTDIR}/_ext/534563071/sm.o.d ${OBJECTDIR}/_ext/1768064806/btstack_chipset_csr.o.d ${OBJECTDIR}/_ext/1386528437/btstack_memory.o.d ${OBJECTDIR}/_ext/1386528437/hci.o.d ${OBJECTDIR}/_ext/1386528437/hci_cmd.o.d ${OBJECTDIR}/_ext/1386528437/hci_dump.o.d ${OBJECTDIR}/_ext/1386528437/l2cap.o.d ${OBJECTDIR}/_ext/1386528437/l2cap_signaling.o.d ${OBJECTDIR}/_ext/1386528437/btstack_linked_list.o.d ${OBJECTDIR}/_ext/1386528437/btstack_memory_pool.o.d ${OBJECTDIR}/_ext/1386327864/btstack_link_key_db_memory.o.d ${OBJECTDIR}/_ext/1386327864/rfcomm.o.d ${OBJECTDIR}/_ext/1386528437/btstack_run_loop.o.d ${OBJECTDIR}/_ext/1386327864/sdp_server.o.d ${OBJECTDIR}/_ext/1386327864/sdp_client.o.d ${OBJECTDIR}/_ext/1386327864/sdp_client_rfcomm.o.d ${OBJECTDIR}/_ext/1386327864/sdp_util.o.d ${OBJECTDIR}/_ext/1386528437/btstack_util.o.d ${OBJECTDIR}/_ext/993942601/btstack_run_loop_embedded.o.d ${OBJECTDIR}/_ext/993942601/hci_transport_h4_embedded.o.d ${OBJECTDIR}/_ext/1880736137/drv_tmr.o.d ${OBJECTDIR}/_ext/1112166103/sys_clk.o.d ${OBJECTDIR}/_ext/1112166103/sys_clk_pic32mx.o.d ${OBJECTDIR}/_ext/1510368962/sys_devcon.o.d ${OBJECTDIR}/_ext/1510368962/sys_devcon_pic32mx.o.d ${OBJECTDIR}/_ext/2087176412/sys_int_pic32.o.d ${OBJECTDIR}/_ext/2147153351/sys_ports.o.d
OBJECTFILES_QUOTED_IF_SPACED=${OBJECTDIR}/_ext/101891878/system_init.o ${OBJECTDIR}/_ext/101891878/system_tasks.o ${OBJECTDIR}/_ext/1360937237/btstack_port.o ${OBJECTDIR}/_ext/1360937237/app_debug.o ${OBJECTDIR}/_ext/1360937237/app.o ${OBJECTDIR}/_ext/1360937237/main.o ${OBJECTDIR}/_ext/97075643/spp_and_le_counter.o ${OBJECTDIR}/_ext/534563071/ad_parser.o ${OBJECTDIR}/_ext/534563071/att_db.o ${OBJECTDIR}/_ext/534563071/att_dispatch.o ${OBJECTDIR}/_ext/534563071/att_server.o ${OBJECTDIR}/_ext/534563071/le_device_db_memory.o ${OBJECTDIR}/_ext/534563071/sm.o ${OBJECTDIR}/_ext/1768064806/btstack_chipset_csr.o ${OBJECTDIR}/_ext/993942601/btstack_run_loop_embedded.o ${OBJECTDIR}/_ext/993942601/btstack_uart_block_embedded.o ${OBJECTDIR}/_ext/1386528437/btstack_memory.o ${OBJECTDIR}/_ext/1386528437/hci.o ${OBJECTDIR}/_ext/1386528437/hci_cmd.o ${OBJECTDIR}/_ext/1386528437/hci_dump.o ${OBJECTDIR}/_ext/1386528437/l2cap.o ${OBJECTDIR}/_ext/1386528437/l2cap_signaling.o ${OBJECTDIR}/_ext/1386528437/btstack_linked_list.o ${OBJECTDIR}/_ext/1386528437/btstack_memory_pool.o ${OBJECTDIR}/_ext/1386327864/btstack_link_key_db_memory.o ${OBJECTDIR}/_ext/1386327864/rfcomm.o ${OBJECTDIR}/_ext/1386528437/btstack_run_loop.o ${OBJECTDIR}/_ext/1386327864/sdp_server.o ${OBJECTDIR}/_ext/1386327864/sdp_client.o ${OBJECTDIR}/_ext/1386327864/sdp_client_rfcomm.o ${OBJECTDIR}/_ext/1386327864/sdp_util.o ${OBJECTDIR}/_ext/1386528437/btstack_util.o ${OBJECTDIR}/_ext/1386327864/spp_server.o ${OBJECTDIR}/_ext/1386528437/hci_transport_h4.o ${OBJECTDIR}/_ext/1386528437/hci_transport_h5.o ${OBJECTDIR}/_ext/1386528437/btstack_slip.o ${OBJECTDIR}/_ext/1880736137/drv_tmr.o ${OBJECTDIR}/_ext/1112166103/sys_clk.o ${OBJECTDIR}/_ext/1112166103/sys_clk_pic32mx.o ${OBJECTDIR}/_ext/1510368962/sys_devcon.o ${OBJECTDIR}/_ext/1510368962/sys_devcon_pic32mx.o ${OBJECTDIR}/_ext/2087176412/sys_int_pic32.o ${OBJECTDIR}/_ext/2147153351/sys_ports.o
POSSIBLE_DEPFILES=${OBJECTDIR}/_ext/101891878/system_init.o.d ${OBJECTDIR}/_ext/101891878/system_tasks.o.d ${OBJECTDIR}/_ext/1360937237/btstack_port.o.d ${OBJECTDIR}/_ext/1360937237/app_debug.o.d ${OBJECTDIR}/_ext/1360937237/app.o.d ${OBJECTDIR}/_ext/1360937237/main.o.d ${OBJECTDIR}/_ext/97075643/spp_and_le_counter.o.d ${OBJECTDIR}/_ext/534563071/ad_parser.o.d ${OBJECTDIR}/_ext/534563071/att_db.o.d ${OBJECTDIR}/_ext/534563071/att_dispatch.o.d ${OBJECTDIR}/_ext/534563071/att_server.o.d ${OBJECTDIR}/_ext/534563071/le_device_db_memory.o.d ${OBJECTDIR}/_ext/534563071/sm.o.d ${OBJECTDIR}/_ext/1768064806/btstack_chipset_csr.o.d ${OBJECTDIR}/_ext/993942601/btstack_run_loop_embedded.o.d ${OBJECTDIR}/_ext/993942601/btstack_uart_block_embedded.o.d ${OBJECTDIR}/_ext/1386528437/btstack_memory.o.d ${OBJECTDIR}/_ext/1386528437/hci.o.d ${OBJECTDIR}/_ext/1386528437/hci_cmd.o.d ${OBJECTDIR}/_ext/1386528437/hci_dump.o.d ${OBJECTDIR}/_ext/1386528437/l2cap.o.d ${OBJECTDIR}/_ext/1386528437/l2cap_signaling.o.d ${OBJECTDIR}/_ext/1386528437/btstack_linked_list.o.d ${OBJECTDIR}/_ext/1386528437/btstack_memory_pool.o.d ${OBJECTDIR}/_ext/1386327864/btstack_link_key_db_memory.o.d ${OBJECTDIR}/_ext/1386327864/rfcomm.o.d ${OBJECTDIR}/_ext/1386528437/btstack_run_loop.o.d ${OBJECTDIR}/_ext/1386327864/sdp_server.o.d ${OBJECTDIR}/_ext/1386327864/sdp_client.o.d ${OBJECTDIR}/_ext/1386327864/sdp_client_rfcomm.o.d ${OBJECTDIR}/_ext/1386327864/sdp_util.o.d ${OBJECTDIR}/_ext/1386528437/btstack_util.o.d ${OBJECTDIR}/_ext/1386327864/spp_server.o.d ${OBJECTDIR}/_ext/1386528437/hci_transport_h4.o.d ${OBJECTDIR}/_ext/1386528437/hci_transport_h5.o.d ${OBJECTDIR}/_ext/1386528437/btstack_slip.o.d ${OBJECTDIR}/_ext/1880736137/drv_tmr.o.d ${OBJECTDIR}/_ext/1112166103/sys_clk.o.d ${OBJECTDIR}/_ext/1112166103/sys_clk_pic32mx.o.d ${OBJECTDIR}/_ext/1510368962/sys_devcon.o.d ${OBJECTDIR}/_ext/1510368962/sys_devcon_pic32mx.o.d ${OBJECTDIR}/_ext/2087176412/sys_int_pic32.o.d ${OBJECTDIR}/_ext/2147153351/sys_ports.o.d
# Object Files
OBJECTFILES=${OBJECTDIR}/_ext/2048875307/system_init.o ${OBJECTDIR}/_ext/2048875307/system_tasks.o ${OBJECTDIR}/_ext/1360937237/btstack_port.o ${OBJECTDIR}/_ext/1360937237/app_debug.o ${OBJECTDIR}/_ext/1360937237/app.o ${OBJECTDIR}/_ext/1360937237/main.o ${OBJECTDIR}/_ext/97075643/spp_and_le_counter.o ${OBJECTDIR}/_ext/534563071/ad_parser.o ${OBJECTDIR}/_ext/534563071/att_db.o ${OBJECTDIR}/_ext/534563071/att_dispatch.o ${OBJECTDIR}/_ext/534563071/att_server.o ${OBJECTDIR}/_ext/534563071/le_device_db_memory.o ${OBJECTDIR}/_ext/534563071/sm.o ${OBJECTDIR}/_ext/1768064806/btstack_chipset_csr.o ${OBJECTDIR}/_ext/1386528437/btstack_memory.o ${OBJECTDIR}/_ext/1386528437/hci.o ${OBJECTDIR}/_ext/1386528437/hci_cmd.o ${OBJECTDIR}/_ext/1386528437/hci_dump.o ${OBJECTDIR}/_ext/1386528437/l2cap.o ${OBJECTDIR}/_ext/1386528437/l2cap_signaling.o ${OBJECTDIR}/_ext/1386528437/btstack_linked_list.o ${OBJECTDIR}/_ext/1386528437/btstack_memory_pool.o ${OBJECTDIR}/_ext/1386327864/btstack_link_key_db_memory.o ${OBJECTDIR}/_ext/1386327864/rfcomm.o ${OBJECTDIR}/_ext/1386528437/btstack_run_loop.o ${OBJECTDIR}/_ext/1386327864/sdp_server.o ${OBJECTDIR}/_ext/1386327864/sdp_client.o ${OBJECTDIR}/_ext/1386327864/sdp_client_rfcomm.o ${OBJECTDIR}/_ext/1386327864/sdp_util.o ${OBJECTDIR}/_ext/1386528437/btstack_util.o ${OBJECTDIR}/_ext/993942601/btstack_run_loop_embedded.o ${OBJECTDIR}/_ext/993942601/hci_transport_h4_embedded.o ${OBJECTDIR}/_ext/1880736137/drv_tmr.o ${OBJECTDIR}/_ext/1112166103/sys_clk.o ${OBJECTDIR}/_ext/1112166103/sys_clk_pic32mx.o ${OBJECTDIR}/_ext/1510368962/sys_devcon.o ${OBJECTDIR}/_ext/1510368962/sys_devcon_pic32mx.o ${OBJECTDIR}/_ext/2087176412/sys_int_pic32.o ${OBJECTDIR}/_ext/2147153351/sys_ports.o
OBJECTFILES=${OBJECTDIR}/_ext/101891878/system_init.o ${OBJECTDIR}/_ext/101891878/system_tasks.o ${OBJECTDIR}/_ext/1360937237/btstack_port.o ${OBJECTDIR}/_ext/1360937237/app_debug.o ${OBJECTDIR}/_ext/1360937237/app.o ${OBJECTDIR}/_ext/1360937237/main.o ${OBJECTDIR}/_ext/97075643/spp_and_le_counter.o ${OBJECTDIR}/_ext/534563071/ad_parser.o ${OBJECTDIR}/_ext/534563071/att_db.o ${OBJECTDIR}/_ext/534563071/att_dispatch.o ${OBJECTDIR}/_ext/534563071/att_server.o ${OBJECTDIR}/_ext/534563071/le_device_db_memory.o ${OBJECTDIR}/_ext/534563071/sm.o ${OBJECTDIR}/_ext/1768064806/btstack_chipset_csr.o ${OBJECTDIR}/_ext/993942601/btstack_run_loop_embedded.o ${OBJECTDIR}/_ext/993942601/btstack_uart_block_embedded.o ${OBJECTDIR}/_ext/1386528437/btstack_memory.o ${OBJECTDIR}/_ext/1386528437/hci.o ${OBJECTDIR}/_ext/1386528437/hci_cmd.o ${OBJECTDIR}/_ext/1386528437/hci_dump.o ${OBJECTDIR}/_ext/1386528437/l2cap.o ${OBJECTDIR}/_ext/1386528437/l2cap_signaling.o ${OBJECTDIR}/_ext/1386528437/btstack_linked_list.o ${OBJECTDIR}/_ext/1386528437/btstack_memory_pool.o ${OBJECTDIR}/_ext/1386327864/btstack_link_key_db_memory.o ${OBJECTDIR}/_ext/1386327864/rfcomm.o ${OBJECTDIR}/_ext/1386528437/btstack_run_loop.o ${OBJECTDIR}/_ext/1386327864/sdp_server.o ${OBJECTDIR}/_ext/1386327864/sdp_client.o ${OBJECTDIR}/_ext/1386327864/sdp_client_rfcomm.o ${OBJECTDIR}/_ext/1386327864/sdp_util.o ${OBJECTDIR}/_ext/1386528437/btstack_util.o ${OBJECTDIR}/_ext/1386327864/spp_server.o ${OBJECTDIR}/_ext/1386528437/hci_transport_h4.o ${OBJECTDIR}/_ext/1386528437/hci_transport_h5.o ${OBJECTDIR}/_ext/1386528437/btstack_slip.o ${OBJECTDIR}/_ext/1880736137/drv_tmr.o ${OBJECTDIR}/_ext/1112166103/sys_clk.o ${OBJECTDIR}/_ext/1112166103/sys_clk_pic32mx.o ${OBJECTDIR}/_ext/1510368962/sys_devcon.o ${OBJECTDIR}/_ext/1510368962/sys_devcon_pic32mx.o ${OBJECTDIR}/_ext/2087176412/sys_int_pic32.o ${OBJECTDIR}/_ext/2147153351/sys_ports.o
# Source Files
SOURCEFILES=../src/system_config/bk-audio-dk/system_init.c ../src/system_config/bk-audio-dk/system_tasks.c ../src/btstack_port.c ../src/app_debug.c ../src/app.c ../src/main.c ../../../example/spp_and_le_counter.c ../../../src/ble/ad_parser.c ../../../src/ble/att_db.c ../../../src/ble/att_dispatch.c ../../../src/ble/att_server.c ../../../src/ble/le_device_db_memory.c ../../../src/ble/sm.c ../../../chipset/csr/btstack_chipset_csr.c ../../../src/btstack_memory.c ../../../src/hci.c ../../../src/hci_cmd.c ../../../src/hci_dump.c ../../../src/l2cap.c ../../../src/l2cap_signaling.c ../../../src/btstack_linked_list.c ../../../src/btstack_memory_pool.c ../../../src/classic/btstack_link_key_db_memory.c ../../../src/classic/rfcomm.c ../../../src/btstack_run_loop.c ../../../src/classic/sdp_server.c ../../../src/classic/sdp_client.c ../../../src/classic/sdp_client_rfcomm.c ../../../src/classic/sdp_util.c ../../../src/btstack_util.c ../../../platform/embedded/btstack_run_loop_embedded.c ../../../platform/embedded/hci_transport_h4_embedded.c ../../../../driver/tmr/src/dynamic/drv_tmr.c ../../../../system/clk/src/sys_clk.c ../../../../system/clk/src/sys_clk_pic32mx.c ../../../../system/devcon/src/sys_devcon.c ../../../../system/devcon/src/sys_devcon_pic32mx.c ../../../../system/int/src/sys_int_pic32.c ../../../../system/ports/src/sys_ports.c
SOURCEFILES=../src/system_config/bt_audio_dk/system_init.c ../src/system_config/bt_audio_dk/system_tasks.c ../src/btstack_port.c ../src/app_debug.c ../src/app.c ../src/main.c ../../../example/spp_and_le_counter.c ../../../src/ble/ad_parser.c ../../../src/ble/att_db.c ../../../src/ble/att_dispatch.c ../../../src/ble/att_server.c ../../../src/ble/le_device_db_memory.c ../../../src/ble/sm.c ../../../chipset/csr/btstack_chipset_csr.c ../../../platform/embedded/btstack_run_loop_embedded.c ../../../platform/embedded/btstack_uart_block_embedded.c ../../../src/btstack_memory.c ../../../src/hci.c ../../../src/hci_cmd.c ../../../src/hci_dump.c ../../../src/l2cap.c ../../../src/l2cap_signaling.c ../../../src/btstack_linked_list.c ../../../src/btstack_memory_pool.c ../../../src/classic/btstack_link_key_db_memory.c ../../../src/classic/rfcomm.c ../../../src/btstack_run_loop.c ../../../src/classic/sdp_server.c ../../../src/classic/sdp_client.c ../../../src/classic/sdp_client_rfcomm.c ../../../src/classic/sdp_util.c ../../../src/btstack_util.c ../../../src/classic/spp_server.c ../../../src/hci_transport_h4.c ../../../src/hci_transport_h5.c ../../../src/btstack_slip.c ../../../../driver/tmr/src/dynamic/drv_tmr.c ../../../../system/clk/src/sys_clk.c ../../../../system/clk/src/sys_clk_pic32mx.c ../../../../system/devcon/src/sys_devcon.c ../../../../system/devcon/src/sys_devcon_pic32mx.c ../../../../system/int/src/sys_int_pic32.c ../../../../system/ports/src/sys_ports.c
CFLAGS=
@ -94,474 +94,522 @@ endif
# ------------------------------------------------------------------------------------
# Rules for buildStep: compile
ifeq ($(TYPE_IMAGE), DEBUG_RUN)
${OBJECTDIR}/_ext/2048875307/system_init.o: ../src/system_config/bk-audio-dk/system_init.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/2048875307"
@${RM} ${OBJECTDIR}/_ext/2048875307/system_init.o.d
@${RM} ${OBJECTDIR}/_ext/2048875307/system_init.o
@${FIXDEPS} "${OBJECTDIR}/_ext/2048875307/system_init.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bk-audio-dk" -I"../../../include" -I"../../../src" -I"../../../ble" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/2048875307/system_init.o.d" -o ${OBJECTDIR}/_ext/2048875307/system_init.o ../src/system_config/bk-audio-dk/system_init.c
${OBJECTDIR}/_ext/101891878/system_init.o: ../src/system_config/bt_audio_dk/system_init.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/101891878"
@${RM} ${OBJECTDIR}/_ext/101891878/system_init.o.d
@${RM} ${OBJECTDIR}/_ext/101891878/system_init.o
@${FIXDEPS} "${OBJECTDIR}/_ext/101891878/system_init.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bt_audio_dk" -I"../../../src" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/101891878/system_init.o.d" -o ${OBJECTDIR}/_ext/101891878/system_init.o ../src/system_config/bt_audio_dk/system_init.c
${OBJECTDIR}/_ext/2048875307/system_tasks.o: ../src/system_config/bk-audio-dk/system_tasks.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/2048875307"
@${RM} ${OBJECTDIR}/_ext/2048875307/system_tasks.o.d
@${RM} ${OBJECTDIR}/_ext/2048875307/system_tasks.o
@${FIXDEPS} "${OBJECTDIR}/_ext/2048875307/system_tasks.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bk-audio-dk" -I"../../../include" -I"../../../src" -I"../../../ble" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/2048875307/system_tasks.o.d" -o ${OBJECTDIR}/_ext/2048875307/system_tasks.o ../src/system_config/bk-audio-dk/system_tasks.c
${OBJECTDIR}/_ext/101891878/system_tasks.o: ../src/system_config/bt_audio_dk/system_tasks.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/101891878"
@${RM} ${OBJECTDIR}/_ext/101891878/system_tasks.o.d
@${RM} ${OBJECTDIR}/_ext/101891878/system_tasks.o
@${FIXDEPS} "${OBJECTDIR}/_ext/101891878/system_tasks.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bt_audio_dk" -I"../../../src" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/101891878/system_tasks.o.d" -o ${OBJECTDIR}/_ext/101891878/system_tasks.o ../src/system_config/bt_audio_dk/system_tasks.c
${OBJECTDIR}/_ext/1360937237/btstack_port.o: ../src/btstack_port.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/1360937237"
@${RM} ${OBJECTDIR}/_ext/1360937237/btstack_port.o.d
@${RM} ${OBJECTDIR}/_ext/1360937237/btstack_port.o
@${FIXDEPS} "${OBJECTDIR}/_ext/1360937237/btstack_port.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bk-audio-dk" -I"../../../include" -I"../../../src" -I"../../../ble" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1360937237/btstack_port.o.d" -o ${OBJECTDIR}/_ext/1360937237/btstack_port.o ../src/btstack_port.c
@${FIXDEPS} "${OBJECTDIR}/_ext/1360937237/btstack_port.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bt_audio_dk" -I"../../../src" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1360937237/btstack_port.o.d" -o ${OBJECTDIR}/_ext/1360937237/btstack_port.o ../src/btstack_port.c
${OBJECTDIR}/_ext/1360937237/app_debug.o: ../src/app_debug.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/1360937237"
@${RM} ${OBJECTDIR}/_ext/1360937237/app_debug.o.d
@${RM} ${OBJECTDIR}/_ext/1360937237/app_debug.o
@${FIXDEPS} "${OBJECTDIR}/_ext/1360937237/app_debug.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bk-audio-dk" -I"../../../include" -I"../../../src" -I"../../../ble" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1360937237/app_debug.o.d" -o ${OBJECTDIR}/_ext/1360937237/app_debug.o ../src/app_debug.c
@${FIXDEPS} "${OBJECTDIR}/_ext/1360937237/app_debug.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bt_audio_dk" -I"../../../src" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1360937237/app_debug.o.d" -o ${OBJECTDIR}/_ext/1360937237/app_debug.o ../src/app_debug.c
${OBJECTDIR}/_ext/1360937237/app.o: ../src/app.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/1360937237"
@${RM} ${OBJECTDIR}/_ext/1360937237/app.o.d
@${RM} ${OBJECTDIR}/_ext/1360937237/app.o
@${FIXDEPS} "${OBJECTDIR}/_ext/1360937237/app.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bk-audio-dk" -I"../../../include" -I"../../../src" -I"../../../ble" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1360937237/app.o.d" -o ${OBJECTDIR}/_ext/1360937237/app.o ../src/app.c
@${FIXDEPS} "${OBJECTDIR}/_ext/1360937237/app.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bt_audio_dk" -I"../../../src" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1360937237/app.o.d" -o ${OBJECTDIR}/_ext/1360937237/app.o ../src/app.c
${OBJECTDIR}/_ext/1360937237/main.o: ../src/main.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/1360937237"
@${RM} ${OBJECTDIR}/_ext/1360937237/main.o.d
@${RM} ${OBJECTDIR}/_ext/1360937237/main.o
@${FIXDEPS} "${OBJECTDIR}/_ext/1360937237/main.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bk-audio-dk" -I"../../../include" -I"../../../src" -I"../../../ble" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1360937237/main.o.d" -o ${OBJECTDIR}/_ext/1360937237/main.o ../src/main.c
@${FIXDEPS} "${OBJECTDIR}/_ext/1360937237/main.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bt_audio_dk" -I"../../../src" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1360937237/main.o.d" -o ${OBJECTDIR}/_ext/1360937237/main.o ../src/main.c
${OBJECTDIR}/_ext/97075643/spp_and_le_counter.o: ../../../example/spp_and_le_counter.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/97075643"
@${RM} ${OBJECTDIR}/_ext/97075643/spp_and_le_counter.o.d
@${RM} ${OBJECTDIR}/_ext/97075643/spp_and_le_counter.o
@${FIXDEPS} "${OBJECTDIR}/_ext/97075643/spp_and_le_counter.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bk-audio-dk" -I"../../../include" -I"../../../src" -I"../../../ble" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/97075643/spp_and_le_counter.o.d" -o ${OBJECTDIR}/_ext/97075643/spp_and_le_counter.o ../../../example/spp_and_le_counter.c
@${FIXDEPS} "${OBJECTDIR}/_ext/97075643/spp_and_le_counter.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bt_audio_dk" -I"../../../src" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/97075643/spp_and_le_counter.o.d" -o ${OBJECTDIR}/_ext/97075643/spp_and_le_counter.o ../../../example/spp_and_le_counter.c
${OBJECTDIR}/_ext/534563071/ad_parser.o: ../../../src/ble/ad_parser.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/534563071"
@${RM} ${OBJECTDIR}/_ext/534563071/ad_parser.o.d
@${RM} ${OBJECTDIR}/_ext/534563071/ad_parser.o
@${FIXDEPS} "${OBJECTDIR}/_ext/534563071/ad_parser.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bk-audio-dk" -I"../../../include" -I"../../../src" -I"../../../ble" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/534563071/ad_parser.o.d" -o ${OBJECTDIR}/_ext/534563071/ad_parser.o ../../../src/ble/ad_parser.c
@${FIXDEPS} "${OBJECTDIR}/_ext/534563071/ad_parser.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bt_audio_dk" -I"../../../src" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/534563071/ad_parser.o.d" -o ${OBJECTDIR}/_ext/534563071/ad_parser.o ../../../src/ble/ad_parser.c
${OBJECTDIR}/_ext/534563071/att_db.o: ../../../src/ble/att_db.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/534563071"
@${RM} ${OBJECTDIR}/_ext/534563071/att_db.o.d
@${RM} ${OBJECTDIR}/_ext/534563071/att_db.o
@${FIXDEPS} "${OBJECTDIR}/_ext/534563071/att_db.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bk-audio-dk" -I"../../../include" -I"../../../src" -I"../../../ble" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/534563071/att_db.o.d" -o ${OBJECTDIR}/_ext/534563071/att_db.o ../../../src/ble/att_db.c
@${FIXDEPS} "${OBJECTDIR}/_ext/534563071/att_db.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bt_audio_dk" -I"../../../src" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/534563071/att_db.o.d" -o ${OBJECTDIR}/_ext/534563071/att_db.o ../../../src/ble/att_db.c
${OBJECTDIR}/_ext/534563071/att_dispatch.o: ../../../src/ble/att_dispatch.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/534563071"
@${RM} ${OBJECTDIR}/_ext/534563071/att_dispatch.o.d
@${RM} ${OBJECTDIR}/_ext/534563071/att_dispatch.o
@${FIXDEPS} "${OBJECTDIR}/_ext/534563071/att_dispatch.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bk-audio-dk" -I"../../../include" -I"../../../src" -I"../../../ble" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/534563071/att_dispatch.o.d" -o ${OBJECTDIR}/_ext/534563071/att_dispatch.o ../../../src/ble/att_dispatch.c
@${FIXDEPS} "${OBJECTDIR}/_ext/534563071/att_dispatch.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bt_audio_dk" -I"../../../src" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/534563071/att_dispatch.o.d" -o ${OBJECTDIR}/_ext/534563071/att_dispatch.o ../../../src/ble/att_dispatch.c
${OBJECTDIR}/_ext/534563071/att_server.o: ../../../src/ble/att_server.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/534563071"
@${RM} ${OBJECTDIR}/_ext/534563071/att_server.o.d
@${RM} ${OBJECTDIR}/_ext/534563071/att_server.o
@${FIXDEPS} "${OBJECTDIR}/_ext/534563071/att_server.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bk-audio-dk" -I"../../../include" -I"../../../src" -I"../../../ble" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/534563071/att_server.o.d" -o ${OBJECTDIR}/_ext/534563071/att_server.o ../../../src/ble/att_server.c
@${FIXDEPS} "${OBJECTDIR}/_ext/534563071/att_server.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bt_audio_dk" -I"../../../src" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/534563071/att_server.o.d" -o ${OBJECTDIR}/_ext/534563071/att_server.o ../../../src/ble/att_server.c
${OBJECTDIR}/_ext/534563071/le_device_db_memory.o: ../../../src/ble/le_device_db_memory.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/534563071"
@${RM} ${OBJECTDIR}/_ext/534563071/le_device_db_memory.o.d
@${RM} ${OBJECTDIR}/_ext/534563071/le_device_db_memory.o
@${FIXDEPS} "${OBJECTDIR}/_ext/534563071/le_device_db_memory.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bk-audio-dk" -I"../../../include" -I"../../../src" -I"../../../ble" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/534563071/le_device_db_memory.o.d" -o ${OBJECTDIR}/_ext/534563071/le_device_db_memory.o ../../../src/ble/le_device_db_memory.c
@${FIXDEPS} "${OBJECTDIR}/_ext/534563071/le_device_db_memory.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bt_audio_dk" -I"../../../src" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/534563071/le_device_db_memory.o.d" -o ${OBJECTDIR}/_ext/534563071/le_device_db_memory.o ../../../src/ble/le_device_db_memory.c
${OBJECTDIR}/_ext/534563071/sm.o: ../../../src/ble/sm.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/534563071"
@${RM} ${OBJECTDIR}/_ext/534563071/sm.o.d
@${RM} ${OBJECTDIR}/_ext/534563071/sm.o
@${FIXDEPS} "${OBJECTDIR}/_ext/534563071/sm.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bk-audio-dk" -I"../../../include" -I"../../../src" -I"../../../ble" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/534563071/sm.o.d" -o ${OBJECTDIR}/_ext/534563071/sm.o ../../../src/ble/sm.c
@${FIXDEPS} "${OBJECTDIR}/_ext/534563071/sm.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bt_audio_dk" -I"../../../src" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/534563071/sm.o.d" -o ${OBJECTDIR}/_ext/534563071/sm.o ../../../src/ble/sm.c
${OBJECTDIR}/_ext/1768064806/btstack_chipset_csr.o: ../../../chipset/csr/btstack_chipset_csr.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/1768064806"
@${RM} ${OBJECTDIR}/_ext/1768064806/btstack_chipset_csr.o.d
@${RM} ${OBJECTDIR}/_ext/1768064806/btstack_chipset_csr.o
@${FIXDEPS} "${OBJECTDIR}/_ext/1768064806/btstack_chipset_csr.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bk-audio-dk" -I"../../../include" -I"../../../src" -I"../../../ble" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1768064806/btstack_chipset_csr.o.d" -o ${OBJECTDIR}/_ext/1768064806/btstack_chipset_csr.o ../../../chipset/csr/btstack_chipset_csr.c
${OBJECTDIR}/_ext/1386528437/btstack_memory.o: ../../../src/btstack_memory.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/1386528437"
@${RM} ${OBJECTDIR}/_ext/1386528437/btstack_memory.o.d
@${RM} ${OBJECTDIR}/_ext/1386528437/btstack_memory.o
@${FIXDEPS} "${OBJECTDIR}/_ext/1386528437/btstack_memory.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bk-audio-dk" -I"../../../include" -I"../../../src" -I"../../../ble" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1386528437/btstack_memory.o.d" -o ${OBJECTDIR}/_ext/1386528437/btstack_memory.o ../../../src/btstack_memory.c
${OBJECTDIR}/_ext/1386528437/hci.o: ../../../src/hci.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/1386528437"
@${RM} ${OBJECTDIR}/_ext/1386528437/hci.o.d
@${RM} ${OBJECTDIR}/_ext/1386528437/hci.o
@${FIXDEPS} "${OBJECTDIR}/_ext/1386528437/hci.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bk-audio-dk" -I"../../../include" -I"../../../src" -I"../../../ble" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1386528437/hci.o.d" -o ${OBJECTDIR}/_ext/1386528437/hci.o ../../../src/hci.c
${OBJECTDIR}/_ext/1386528437/hci_cmd.o: ../../../src/hci_cmd.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/1386528437"
@${RM} ${OBJECTDIR}/_ext/1386528437/hci_cmd.o.d
@${RM} ${OBJECTDIR}/_ext/1386528437/hci_cmd.o
@${FIXDEPS} "${OBJECTDIR}/_ext/1386528437/hci_cmd.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bk-audio-dk" -I"../../../include" -I"../../../src" -I"../../../ble" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1386528437/hci_cmd.o.d" -o ${OBJECTDIR}/_ext/1386528437/hci_cmd.o ../../../src/hci_cmd.c
${OBJECTDIR}/_ext/1386528437/hci_dump.o: ../../../src/hci_dump.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/1386528437"
@${RM} ${OBJECTDIR}/_ext/1386528437/hci_dump.o.d
@${RM} ${OBJECTDIR}/_ext/1386528437/hci_dump.o
@${FIXDEPS} "${OBJECTDIR}/_ext/1386528437/hci_dump.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bk-audio-dk" -I"../../../include" -I"../../../src" -I"../../../ble" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1386528437/hci_dump.o.d" -o ${OBJECTDIR}/_ext/1386528437/hci_dump.o ../../../src/hci_dump.c
${OBJECTDIR}/_ext/1386528437/l2cap.o: ../../../src/l2cap.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/1386528437"
@${RM} ${OBJECTDIR}/_ext/1386528437/l2cap.o.d
@${RM} ${OBJECTDIR}/_ext/1386528437/l2cap.o
@${FIXDEPS} "${OBJECTDIR}/_ext/1386528437/l2cap.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bk-audio-dk" -I"../../../include" -I"../../../src" -I"../../../ble" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1386528437/l2cap.o.d" -o ${OBJECTDIR}/_ext/1386528437/l2cap.o ../../../src/l2cap.c
${OBJECTDIR}/_ext/1386528437/l2cap_signaling.o: ../../../src/l2cap_signaling.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/1386528437"
@${RM} ${OBJECTDIR}/_ext/1386528437/l2cap_signaling.o.d
@${RM} ${OBJECTDIR}/_ext/1386528437/l2cap_signaling.o
@${FIXDEPS} "${OBJECTDIR}/_ext/1386528437/l2cap_signaling.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bk-audio-dk" -I"../../../include" -I"../../../src" -I"../../../ble" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1386528437/l2cap_signaling.o.d" -o ${OBJECTDIR}/_ext/1386528437/l2cap_signaling.o ../../../src/l2cap_signaling.c
${OBJECTDIR}/_ext/1386528437/btstack_linked_list.o: ../../../src/btstack_linked_list.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/1386528437"
@${RM} ${OBJECTDIR}/_ext/1386528437/btstack_linked_list.o.d
@${RM} ${OBJECTDIR}/_ext/1386528437/btstack_linked_list.o
@${FIXDEPS} "${OBJECTDIR}/_ext/1386528437/btstack_linked_list.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bk-audio-dk" -I"../../../include" -I"../../../src" -I"../../../ble" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1386528437/btstack_linked_list.o.d" -o ${OBJECTDIR}/_ext/1386528437/btstack_linked_list.o ../../../src/btstack_linked_list.c
${OBJECTDIR}/_ext/1386528437/btstack_memory_pool.o: ../../../src/btstack_memory_pool.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/1386528437"
@${RM} ${OBJECTDIR}/_ext/1386528437/btstack_memory_pool.o.d
@${RM} ${OBJECTDIR}/_ext/1386528437/btstack_memory_pool.o
@${FIXDEPS} "${OBJECTDIR}/_ext/1386528437/btstack_memory_pool.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bk-audio-dk" -I"../../../include" -I"../../../src" -I"../../../ble" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1386528437/btstack_memory_pool.o.d" -o ${OBJECTDIR}/_ext/1386528437/btstack_memory_pool.o ../../../src/btstack_memory_pool.c
${OBJECTDIR}/_ext/1386327864/btstack_link_key_db_memory.o: ../../../src/classic/btstack_link_key_db_memory.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/1386327864"
@${RM} ${OBJECTDIR}/_ext/1386327864/btstack_link_key_db_memory.o.d
@${RM} ${OBJECTDIR}/_ext/1386327864/btstack_link_key_db_memory.o
@${FIXDEPS} "${OBJECTDIR}/_ext/1386327864/btstack_link_key_db_memory.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bk-audio-dk" -I"../../../include" -I"../../../src" -I"../../../ble" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1386327864/btstack_link_key_db_memory.o.d" -o ${OBJECTDIR}/_ext/1386327864/btstack_link_key_db_memory.o ../../../src/classic/btstack_link_key_db_memory.c
${OBJECTDIR}/_ext/1386327864/rfcomm.o: ../../../src/classic/rfcomm.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/1386327864"
@${RM} ${OBJECTDIR}/_ext/1386327864/rfcomm.o.d
@${RM} ${OBJECTDIR}/_ext/1386327864/rfcomm.o
@${FIXDEPS} "${OBJECTDIR}/_ext/1386327864/rfcomm.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bk-audio-dk" -I"../../../include" -I"../../../src" -I"../../../ble" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1386327864/rfcomm.o.d" -o ${OBJECTDIR}/_ext/1386327864/rfcomm.o ../../../src/classic/rfcomm.c
${OBJECTDIR}/_ext/1386528437/btstack_run_loop.o: ../../../src/btstack_run_loop.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/1386528437"
@${RM} ${OBJECTDIR}/_ext/1386528437/btstack_run_loop.o.d
@${RM} ${OBJECTDIR}/_ext/1386528437/btstack_run_loop.o
@${FIXDEPS} "${OBJECTDIR}/_ext/1386528437/btstack_run_loop.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bk-audio-dk" -I"../../../include" -I"../../../src" -I"../../../ble" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1386528437/btstack_run_loop.o.d" -o ${OBJECTDIR}/_ext/1386528437/btstack_run_loop.o ../../../src/btstack_run_loop.c
${OBJECTDIR}/_ext/1386327864/sdp_server.o: ../../../src/classic/sdp_server.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/1386327864"
@${RM} ${OBJECTDIR}/_ext/1386327864/sdp_server.o.d
@${RM} ${OBJECTDIR}/_ext/1386327864/sdp_server.o
@${FIXDEPS} "${OBJECTDIR}/_ext/1386327864/sdp_server.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bk-audio-dk" -I"../../../include" -I"../../../src" -I"../../../ble" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1386327864/sdp_server.o.d" -o ${OBJECTDIR}/_ext/1386327864/sdp_server.o ../../../src/classic/sdp_server.c
${OBJECTDIR}/_ext/1386327864/sdp_client.o: ../../../src/classic/sdp_client.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/1386327864"
@${RM} ${OBJECTDIR}/_ext/1386327864/sdp_client.o.d
@${RM} ${OBJECTDIR}/_ext/1386327864/sdp_client.o
@${FIXDEPS} "${OBJECTDIR}/_ext/1386327864/sdp_client.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bk-audio-dk" -I"../../../include" -I"../../../src" -I"../../../ble" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1386327864/sdp_client.o.d" -o ${OBJECTDIR}/_ext/1386327864/sdp_client.o ../../../src/classic/sdp_client.c
${OBJECTDIR}/_ext/1386327864/sdp_client_rfcomm.o: ../../../src/classic/sdp_client_rfcomm.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/1386327864"
@${RM} ${OBJECTDIR}/_ext/1386327864/sdp_client_rfcomm.o.d
@${RM} ${OBJECTDIR}/_ext/1386327864/sdp_client_rfcomm.o
@${FIXDEPS} "${OBJECTDIR}/_ext/1386327864/sdp_client_rfcomm.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bk-audio-dk" -I"../../../include" -I"../../../src" -I"../../../ble" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1386327864/sdp_client_rfcomm.o.d" -o ${OBJECTDIR}/_ext/1386327864/sdp_client_rfcomm.o ../../../src/classic/sdp_client_rfcomm.c
${OBJECTDIR}/_ext/1386327864/sdp_util.o: ../../../src/classic/sdp_util.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/1386327864"
@${RM} ${OBJECTDIR}/_ext/1386327864/sdp_util.o.d
@${RM} ${OBJECTDIR}/_ext/1386327864/sdp_util.o
@${FIXDEPS} "${OBJECTDIR}/_ext/1386327864/sdp_util.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bk-audio-dk" -I"../../../include" -I"../../../src" -I"../../../ble" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1386327864/sdp_util.o.d" -o ${OBJECTDIR}/_ext/1386327864/sdp_util.o ../../../src/classic/sdp_util.c
${OBJECTDIR}/_ext/1386528437/btstack_util.o: ../../../src/btstack_util.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/1386528437"
@${RM} ${OBJECTDIR}/_ext/1386528437/btstack_util.o.d
@${RM} ${OBJECTDIR}/_ext/1386528437/btstack_util.o
@${FIXDEPS} "${OBJECTDIR}/_ext/1386528437/btstack_util.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bk-audio-dk" -I"../../../include" -I"../../../src" -I"../../../ble" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1386528437/btstack_util.o.d" -o ${OBJECTDIR}/_ext/1386528437/btstack_util.o ../../../src/btstack_util.c
@${FIXDEPS} "${OBJECTDIR}/_ext/1768064806/btstack_chipset_csr.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bt_audio_dk" -I"../../../src" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1768064806/btstack_chipset_csr.o.d" -o ${OBJECTDIR}/_ext/1768064806/btstack_chipset_csr.o ../../../chipset/csr/btstack_chipset_csr.c
${OBJECTDIR}/_ext/993942601/btstack_run_loop_embedded.o: ../../../platform/embedded/btstack_run_loop_embedded.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/993942601"
@${RM} ${OBJECTDIR}/_ext/993942601/btstack_run_loop_embedded.o.d
@${RM} ${OBJECTDIR}/_ext/993942601/btstack_run_loop_embedded.o
@${FIXDEPS} "${OBJECTDIR}/_ext/993942601/btstack_run_loop_embedded.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bk-audio-dk" -I"../../../include" -I"../../../src" -I"../../../ble" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/993942601/btstack_run_loop_embedded.o.d" -o ${OBJECTDIR}/_ext/993942601/btstack_run_loop_embedded.o ../../../platform/embedded/btstack_run_loop_embedded.c
@${FIXDEPS} "${OBJECTDIR}/_ext/993942601/btstack_run_loop_embedded.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bt_audio_dk" -I"../../../src" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/993942601/btstack_run_loop_embedded.o.d" -o ${OBJECTDIR}/_ext/993942601/btstack_run_loop_embedded.o ../../../platform/embedded/btstack_run_loop_embedded.c
${OBJECTDIR}/_ext/993942601/hci_transport_h4_embedded.o: ../../../platform/embedded/hci_transport_h4_embedded.c nbproject/Makefile-${CND_CONF}.mk
${OBJECTDIR}/_ext/993942601/btstack_uart_block_embedded.o: ../../../platform/embedded/btstack_uart_block_embedded.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/993942601"
@${RM} ${OBJECTDIR}/_ext/993942601/hci_transport_h4_embedded.o.d
@${RM} ${OBJECTDIR}/_ext/993942601/hci_transport_h4_embedded.o
@${FIXDEPS} "${OBJECTDIR}/_ext/993942601/hci_transport_h4_embedded.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bk-audio-dk" -I"../../../include" -I"../../../src" -I"../../../ble" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/993942601/hci_transport_h4_embedded.o.d" -o ${OBJECTDIR}/_ext/993942601/hci_transport_h4_embedded.o ../../../platform/embedded/hci_transport_h4_embedded.c
@${RM} ${OBJECTDIR}/_ext/993942601/btstack_uart_block_embedded.o.d
@${RM} ${OBJECTDIR}/_ext/993942601/btstack_uart_block_embedded.o
@${FIXDEPS} "${OBJECTDIR}/_ext/993942601/btstack_uart_block_embedded.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bt_audio_dk" -I"../../../src" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/993942601/btstack_uart_block_embedded.o.d" -o ${OBJECTDIR}/_ext/993942601/btstack_uart_block_embedded.o ../../../platform/embedded/btstack_uart_block_embedded.c
${OBJECTDIR}/_ext/1386528437/btstack_memory.o: ../../../src/btstack_memory.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/1386528437"
@${RM} ${OBJECTDIR}/_ext/1386528437/btstack_memory.o.d
@${RM} ${OBJECTDIR}/_ext/1386528437/btstack_memory.o
@${FIXDEPS} "${OBJECTDIR}/_ext/1386528437/btstack_memory.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bt_audio_dk" -I"../../../src" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1386528437/btstack_memory.o.d" -o ${OBJECTDIR}/_ext/1386528437/btstack_memory.o ../../../src/btstack_memory.c
${OBJECTDIR}/_ext/1386528437/hci.o: ../../../src/hci.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/1386528437"
@${RM} ${OBJECTDIR}/_ext/1386528437/hci.o.d
@${RM} ${OBJECTDIR}/_ext/1386528437/hci.o
@${FIXDEPS} "${OBJECTDIR}/_ext/1386528437/hci.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bt_audio_dk" -I"../../../src" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1386528437/hci.o.d" -o ${OBJECTDIR}/_ext/1386528437/hci.o ../../../src/hci.c
${OBJECTDIR}/_ext/1386528437/hci_cmd.o: ../../../src/hci_cmd.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/1386528437"
@${RM} ${OBJECTDIR}/_ext/1386528437/hci_cmd.o.d
@${RM} ${OBJECTDIR}/_ext/1386528437/hci_cmd.o
@${FIXDEPS} "${OBJECTDIR}/_ext/1386528437/hci_cmd.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bt_audio_dk" -I"../../../src" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1386528437/hci_cmd.o.d" -o ${OBJECTDIR}/_ext/1386528437/hci_cmd.o ../../../src/hci_cmd.c
${OBJECTDIR}/_ext/1386528437/hci_dump.o: ../../../src/hci_dump.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/1386528437"
@${RM} ${OBJECTDIR}/_ext/1386528437/hci_dump.o.d
@${RM} ${OBJECTDIR}/_ext/1386528437/hci_dump.o
@${FIXDEPS} "${OBJECTDIR}/_ext/1386528437/hci_dump.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bt_audio_dk" -I"../../../src" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1386528437/hci_dump.o.d" -o ${OBJECTDIR}/_ext/1386528437/hci_dump.o ../../../src/hci_dump.c
${OBJECTDIR}/_ext/1386528437/l2cap.o: ../../../src/l2cap.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/1386528437"
@${RM} ${OBJECTDIR}/_ext/1386528437/l2cap.o.d
@${RM} ${OBJECTDIR}/_ext/1386528437/l2cap.o
@${FIXDEPS} "${OBJECTDIR}/_ext/1386528437/l2cap.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bt_audio_dk" -I"../../../src" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1386528437/l2cap.o.d" -o ${OBJECTDIR}/_ext/1386528437/l2cap.o ../../../src/l2cap.c
${OBJECTDIR}/_ext/1386528437/l2cap_signaling.o: ../../../src/l2cap_signaling.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/1386528437"
@${RM} ${OBJECTDIR}/_ext/1386528437/l2cap_signaling.o.d
@${RM} ${OBJECTDIR}/_ext/1386528437/l2cap_signaling.o
@${FIXDEPS} "${OBJECTDIR}/_ext/1386528437/l2cap_signaling.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bt_audio_dk" -I"../../../src" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1386528437/l2cap_signaling.o.d" -o ${OBJECTDIR}/_ext/1386528437/l2cap_signaling.o ../../../src/l2cap_signaling.c
${OBJECTDIR}/_ext/1386528437/btstack_linked_list.o: ../../../src/btstack_linked_list.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/1386528437"
@${RM} ${OBJECTDIR}/_ext/1386528437/btstack_linked_list.o.d
@${RM} ${OBJECTDIR}/_ext/1386528437/btstack_linked_list.o
@${FIXDEPS} "${OBJECTDIR}/_ext/1386528437/btstack_linked_list.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bt_audio_dk" -I"../../../src" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1386528437/btstack_linked_list.o.d" -o ${OBJECTDIR}/_ext/1386528437/btstack_linked_list.o ../../../src/btstack_linked_list.c
${OBJECTDIR}/_ext/1386528437/btstack_memory_pool.o: ../../../src/btstack_memory_pool.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/1386528437"
@${RM} ${OBJECTDIR}/_ext/1386528437/btstack_memory_pool.o.d
@${RM} ${OBJECTDIR}/_ext/1386528437/btstack_memory_pool.o
@${FIXDEPS} "${OBJECTDIR}/_ext/1386528437/btstack_memory_pool.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bt_audio_dk" -I"../../../src" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1386528437/btstack_memory_pool.o.d" -o ${OBJECTDIR}/_ext/1386528437/btstack_memory_pool.o ../../../src/btstack_memory_pool.c
${OBJECTDIR}/_ext/1386327864/btstack_link_key_db_memory.o: ../../../src/classic/btstack_link_key_db_memory.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/1386327864"
@${RM} ${OBJECTDIR}/_ext/1386327864/btstack_link_key_db_memory.o.d
@${RM} ${OBJECTDIR}/_ext/1386327864/btstack_link_key_db_memory.o
@${FIXDEPS} "${OBJECTDIR}/_ext/1386327864/btstack_link_key_db_memory.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bt_audio_dk" -I"../../../src" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1386327864/btstack_link_key_db_memory.o.d" -o ${OBJECTDIR}/_ext/1386327864/btstack_link_key_db_memory.o ../../../src/classic/btstack_link_key_db_memory.c
${OBJECTDIR}/_ext/1386327864/rfcomm.o: ../../../src/classic/rfcomm.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/1386327864"
@${RM} ${OBJECTDIR}/_ext/1386327864/rfcomm.o.d
@${RM} ${OBJECTDIR}/_ext/1386327864/rfcomm.o
@${FIXDEPS} "${OBJECTDIR}/_ext/1386327864/rfcomm.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bt_audio_dk" -I"../../../src" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1386327864/rfcomm.o.d" -o ${OBJECTDIR}/_ext/1386327864/rfcomm.o ../../../src/classic/rfcomm.c
${OBJECTDIR}/_ext/1386528437/btstack_run_loop.o: ../../../src/btstack_run_loop.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/1386528437"
@${RM} ${OBJECTDIR}/_ext/1386528437/btstack_run_loop.o.d
@${RM} ${OBJECTDIR}/_ext/1386528437/btstack_run_loop.o
@${FIXDEPS} "${OBJECTDIR}/_ext/1386528437/btstack_run_loop.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bt_audio_dk" -I"../../../src" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1386528437/btstack_run_loop.o.d" -o ${OBJECTDIR}/_ext/1386528437/btstack_run_loop.o ../../../src/btstack_run_loop.c
${OBJECTDIR}/_ext/1386327864/sdp_server.o: ../../../src/classic/sdp_server.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/1386327864"
@${RM} ${OBJECTDIR}/_ext/1386327864/sdp_server.o.d
@${RM} ${OBJECTDIR}/_ext/1386327864/sdp_server.o
@${FIXDEPS} "${OBJECTDIR}/_ext/1386327864/sdp_server.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bt_audio_dk" -I"../../../src" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1386327864/sdp_server.o.d" -o ${OBJECTDIR}/_ext/1386327864/sdp_server.o ../../../src/classic/sdp_server.c
${OBJECTDIR}/_ext/1386327864/sdp_client.o: ../../../src/classic/sdp_client.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/1386327864"
@${RM} ${OBJECTDIR}/_ext/1386327864/sdp_client.o.d
@${RM} ${OBJECTDIR}/_ext/1386327864/sdp_client.o
@${FIXDEPS} "${OBJECTDIR}/_ext/1386327864/sdp_client.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bt_audio_dk" -I"../../../src" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1386327864/sdp_client.o.d" -o ${OBJECTDIR}/_ext/1386327864/sdp_client.o ../../../src/classic/sdp_client.c
${OBJECTDIR}/_ext/1386327864/sdp_client_rfcomm.o: ../../../src/classic/sdp_client_rfcomm.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/1386327864"
@${RM} ${OBJECTDIR}/_ext/1386327864/sdp_client_rfcomm.o.d
@${RM} ${OBJECTDIR}/_ext/1386327864/sdp_client_rfcomm.o
@${FIXDEPS} "${OBJECTDIR}/_ext/1386327864/sdp_client_rfcomm.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bt_audio_dk" -I"../../../src" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1386327864/sdp_client_rfcomm.o.d" -o ${OBJECTDIR}/_ext/1386327864/sdp_client_rfcomm.o ../../../src/classic/sdp_client_rfcomm.c
${OBJECTDIR}/_ext/1386327864/sdp_util.o: ../../../src/classic/sdp_util.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/1386327864"
@${RM} ${OBJECTDIR}/_ext/1386327864/sdp_util.o.d
@${RM} ${OBJECTDIR}/_ext/1386327864/sdp_util.o
@${FIXDEPS} "${OBJECTDIR}/_ext/1386327864/sdp_util.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bt_audio_dk" -I"../../../src" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1386327864/sdp_util.o.d" -o ${OBJECTDIR}/_ext/1386327864/sdp_util.o ../../../src/classic/sdp_util.c
${OBJECTDIR}/_ext/1386528437/btstack_util.o: ../../../src/btstack_util.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/1386528437"
@${RM} ${OBJECTDIR}/_ext/1386528437/btstack_util.o.d
@${RM} ${OBJECTDIR}/_ext/1386528437/btstack_util.o
@${FIXDEPS} "${OBJECTDIR}/_ext/1386528437/btstack_util.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bt_audio_dk" -I"../../../src" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1386528437/btstack_util.o.d" -o ${OBJECTDIR}/_ext/1386528437/btstack_util.o ../../../src/btstack_util.c
${OBJECTDIR}/_ext/1386327864/spp_server.o: ../../../src/classic/spp_server.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/1386327864"
@${RM} ${OBJECTDIR}/_ext/1386327864/spp_server.o.d
@${RM} ${OBJECTDIR}/_ext/1386327864/spp_server.o
@${FIXDEPS} "${OBJECTDIR}/_ext/1386327864/spp_server.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bt_audio_dk" -I"../../../src" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1386327864/spp_server.o.d" -o ${OBJECTDIR}/_ext/1386327864/spp_server.o ../../../src/classic/spp_server.c
${OBJECTDIR}/_ext/1386528437/hci_transport_h4.o: ../../../src/hci_transport_h4.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/1386528437"
@${RM} ${OBJECTDIR}/_ext/1386528437/hci_transport_h4.o.d
@${RM} ${OBJECTDIR}/_ext/1386528437/hci_transport_h4.o
@${FIXDEPS} "${OBJECTDIR}/_ext/1386528437/hci_transport_h4.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bt_audio_dk" -I"../../../src" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1386528437/hci_transport_h4.o.d" -o ${OBJECTDIR}/_ext/1386528437/hci_transport_h4.o ../../../src/hci_transport_h4.c
${OBJECTDIR}/_ext/1386528437/hci_transport_h5.o: ../../../src/hci_transport_h5.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/1386528437"
@${RM} ${OBJECTDIR}/_ext/1386528437/hci_transport_h5.o.d
@${RM} ${OBJECTDIR}/_ext/1386528437/hci_transport_h5.o
@${FIXDEPS} "${OBJECTDIR}/_ext/1386528437/hci_transport_h5.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bt_audio_dk" -I"../../../src" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1386528437/hci_transport_h5.o.d" -o ${OBJECTDIR}/_ext/1386528437/hci_transport_h5.o ../../../src/hci_transport_h5.c
${OBJECTDIR}/_ext/1386528437/btstack_slip.o: ../../../src/btstack_slip.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/1386528437"
@${RM} ${OBJECTDIR}/_ext/1386528437/btstack_slip.o.d
@${RM} ${OBJECTDIR}/_ext/1386528437/btstack_slip.o
@${FIXDEPS} "${OBJECTDIR}/_ext/1386528437/btstack_slip.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bt_audio_dk" -I"../../../src" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1386528437/btstack_slip.o.d" -o ${OBJECTDIR}/_ext/1386528437/btstack_slip.o ../../../src/btstack_slip.c
${OBJECTDIR}/_ext/1880736137/drv_tmr.o: ../../../../driver/tmr/src/dynamic/drv_tmr.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/1880736137"
@${RM} ${OBJECTDIR}/_ext/1880736137/drv_tmr.o.d
@${RM} ${OBJECTDIR}/_ext/1880736137/drv_tmr.o
@${FIXDEPS} "${OBJECTDIR}/_ext/1880736137/drv_tmr.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bk-audio-dk" -I"../../../include" -I"../../../src" -I"../../../ble" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1880736137/drv_tmr.o.d" -o ${OBJECTDIR}/_ext/1880736137/drv_tmr.o ../../../../driver/tmr/src/dynamic/drv_tmr.c
@${FIXDEPS} "${OBJECTDIR}/_ext/1880736137/drv_tmr.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bt_audio_dk" -I"../../../src" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1880736137/drv_tmr.o.d" -o ${OBJECTDIR}/_ext/1880736137/drv_tmr.o ../../../../driver/tmr/src/dynamic/drv_tmr.c
${OBJECTDIR}/_ext/1112166103/sys_clk.o: ../../../../system/clk/src/sys_clk.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/1112166103"
@${RM} ${OBJECTDIR}/_ext/1112166103/sys_clk.o.d
@${RM} ${OBJECTDIR}/_ext/1112166103/sys_clk.o
@${FIXDEPS} "${OBJECTDIR}/_ext/1112166103/sys_clk.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bk-audio-dk" -I"../../../include" -I"../../../src" -I"../../../ble" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1112166103/sys_clk.o.d" -o ${OBJECTDIR}/_ext/1112166103/sys_clk.o ../../../../system/clk/src/sys_clk.c
@${FIXDEPS} "${OBJECTDIR}/_ext/1112166103/sys_clk.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bt_audio_dk" -I"../../../src" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1112166103/sys_clk.o.d" -o ${OBJECTDIR}/_ext/1112166103/sys_clk.o ../../../../system/clk/src/sys_clk.c
${OBJECTDIR}/_ext/1112166103/sys_clk_pic32mx.o: ../../../../system/clk/src/sys_clk_pic32mx.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/1112166103"
@${RM} ${OBJECTDIR}/_ext/1112166103/sys_clk_pic32mx.o.d
@${RM} ${OBJECTDIR}/_ext/1112166103/sys_clk_pic32mx.o
@${FIXDEPS} "${OBJECTDIR}/_ext/1112166103/sys_clk_pic32mx.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bk-audio-dk" -I"../../../include" -I"../../../src" -I"../../../ble" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1112166103/sys_clk_pic32mx.o.d" -o ${OBJECTDIR}/_ext/1112166103/sys_clk_pic32mx.o ../../../../system/clk/src/sys_clk_pic32mx.c
@${FIXDEPS} "${OBJECTDIR}/_ext/1112166103/sys_clk_pic32mx.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bt_audio_dk" -I"../../../src" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1112166103/sys_clk_pic32mx.o.d" -o ${OBJECTDIR}/_ext/1112166103/sys_clk_pic32mx.o ../../../../system/clk/src/sys_clk_pic32mx.c
${OBJECTDIR}/_ext/1510368962/sys_devcon.o: ../../../../system/devcon/src/sys_devcon.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/1510368962"
@${RM} ${OBJECTDIR}/_ext/1510368962/sys_devcon.o.d
@${RM} ${OBJECTDIR}/_ext/1510368962/sys_devcon.o
@${FIXDEPS} "${OBJECTDIR}/_ext/1510368962/sys_devcon.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bk-audio-dk" -I"../../../include" -I"../../../src" -I"../../../ble" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1510368962/sys_devcon.o.d" -o ${OBJECTDIR}/_ext/1510368962/sys_devcon.o ../../../../system/devcon/src/sys_devcon.c
@${FIXDEPS} "${OBJECTDIR}/_ext/1510368962/sys_devcon.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bt_audio_dk" -I"../../../src" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1510368962/sys_devcon.o.d" -o ${OBJECTDIR}/_ext/1510368962/sys_devcon.o ../../../../system/devcon/src/sys_devcon.c
${OBJECTDIR}/_ext/1510368962/sys_devcon_pic32mx.o: ../../../../system/devcon/src/sys_devcon_pic32mx.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/1510368962"
@${RM} ${OBJECTDIR}/_ext/1510368962/sys_devcon_pic32mx.o.d
@${RM} ${OBJECTDIR}/_ext/1510368962/sys_devcon_pic32mx.o
@${FIXDEPS} "${OBJECTDIR}/_ext/1510368962/sys_devcon_pic32mx.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bk-audio-dk" -I"../../../include" -I"../../../src" -I"../../../ble" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1510368962/sys_devcon_pic32mx.o.d" -o ${OBJECTDIR}/_ext/1510368962/sys_devcon_pic32mx.o ../../../../system/devcon/src/sys_devcon_pic32mx.c
@${FIXDEPS} "${OBJECTDIR}/_ext/1510368962/sys_devcon_pic32mx.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bt_audio_dk" -I"../../../src" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1510368962/sys_devcon_pic32mx.o.d" -o ${OBJECTDIR}/_ext/1510368962/sys_devcon_pic32mx.o ../../../../system/devcon/src/sys_devcon_pic32mx.c
${OBJECTDIR}/_ext/2087176412/sys_int_pic32.o: ../../../../system/int/src/sys_int_pic32.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/2087176412"
@${RM} ${OBJECTDIR}/_ext/2087176412/sys_int_pic32.o.d
@${RM} ${OBJECTDIR}/_ext/2087176412/sys_int_pic32.o
@${FIXDEPS} "${OBJECTDIR}/_ext/2087176412/sys_int_pic32.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bk-audio-dk" -I"../../../include" -I"../../../src" -I"../../../ble" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/2087176412/sys_int_pic32.o.d" -o ${OBJECTDIR}/_ext/2087176412/sys_int_pic32.o ../../../../system/int/src/sys_int_pic32.c
@${FIXDEPS} "${OBJECTDIR}/_ext/2087176412/sys_int_pic32.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bt_audio_dk" -I"../../../src" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/2087176412/sys_int_pic32.o.d" -o ${OBJECTDIR}/_ext/2087176412/sys_int_pic32.o ../../../../system/int/src/sys_int_pic32.c
${OBJECTDIR}/_ext/2147153351/sys_ports.o: ../../../../system/ports/src/sys_ports.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/2147153351"
@${RM} ${OBJECTDIR}/_ext/2147153351/sys_ports.o.d
@${RM} ${OBJECTDIR}/_ext/2147153351/sys_ports.o
@${FIXDEPS} "${OBJECTDIR}/_ext/2147153351/sys_ports.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bk-audio-dk" -I"../../../include" -I"../../../src" -I"../../../ble" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/2147153351/sys_ports.o.d" -o ${OBJECTDIR}/_ext/2147153351/sys_ports.o ../../../../system/ports/src/sys_ports.c
@${FIXDEPS} "${OBJECTDIR}/_ext/2147153351/sys_ports.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bt_audio_dk" -I"../../../src" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/2147153351/sys_ports.o.d" -o ${OBJECTDIR}/_ext/2147153351/sys_ports.o ../../../../system/ports/src/sys_ports.c
else
${OBJECTDIR}/_ext/2048875307/system_init.o: ../src/system_config/bk-audio-dk/system_init.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/2048875307"
@${RM} ${OBJECTDIR}/_ext/2048875307/system_init.o.d
@${RM} ${OBJECTDIR}/_ext/2048875307/system_init.o
@${FIXDEPS} "${OBJECTDIR}/_ext/2048875307/system_init.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bk-audio-dk" -I"../../../include" -I"../../../src" -I"../../../ble" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/2048875307/system_init.o.d" -o ${OBJECTDIR}/_ext/2048875307/system_init.o ../src/system_config/bk-audio-dk/system_init.c
${OBJECTDIR}/_ext/101891878/system_init.o: ../src/system_config/bt_audio_dk/system_init.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/101891878"
@${RM} ${OBJECTDIR}/_ext/101891878/system_init.o.d
@${RM} ${OBJECTDIR}/_ext/101891878/system_init.o
@${FIXDEPS} "${OBJECTDIR}/_ext/101891878/system_init.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bt_audio_dk" -I"../../../src" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/101891878/system_init.o.d" -o ${OBJECTDIR}/_ext/101891878/system_init.o ../src/system_config/bt_audio_dk/system_init.c
${OBJECTDIR}/_ext/2048875307/system_tasks.o: ../src/system_config/bk-audio-dk/system_tasks.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/2048875307"
@${RM} ${OBJECTDIR}/_ext/2048875307/system_tasks.o.d
@${RM} ${OBJECTDIR}/_ext/2048875307/system_tasks.o
@${FIXDEPS} "${OBJECTDIR}/_ext/2048875307/system_tasks.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bk-audio-dk" -I"../../../include" -I"../../../src" -I"../../../ble" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/2048875307/system_tasks.o.d" -o ${OBJECTDIR}/_ext/2048875307/system_tasks.o ../src/system_config/bk-audio-dk/system_tasks.c
${OBJECTDIR}/_ext/101891878/system_tasks.o: ../src/system_config/bt_audio_dk/system_tasks.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/101891878"
@${RM} ${OBJECTDIR}/_ext/101891878/system_tasks.o.d
@${RM} ${OBJECTDIR}/_ext/101891878/system_tasks.o
@${FIXDEPS} "${OBJECTDIR}/_ext/101891878/system_tasks.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bt_audio_dk" -I"../../../src" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/101891878/system_tasks.o.d" -o ${OBJECTDIR}/_ext/101891878/system_tasks.o ../src/system_config/bt_audio_dk/system_tasks.c
${OBJECTDIR}/_ext/1360937237/btstack_port.o: ../src/btstack_port.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/1360937237"
@${RM} ${OBJECTDIR}/_ext/1360937237/btstack_port.o.d
@${RM} ${OBJECTDIR}/_ext/1360937237/btstack_port.o
@${FIXDEPS} "${OBJECTDIR}/_ext/1360937237/btstack_port.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bk-audio-dk" -I"../../../include" -I"../../../src" -I"../../../ble" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1360937237/btstack_port.o.d" -o ${OBJECTDIR}/_ext/1360937237/btstack_port.o ../src/btstack_port.c
@${FIXDEPS} "${OBJECTDIR}/_ext/1360937237/btstack_port.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bt_audio_dk" -I"../../../src" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1360937237/btstack_port.o.d" -o ${OBJECTDIR}/_ext/1360937237/btstack_port.o ../src/btstack_port.c
${OBJECTDIR}/_ext/1360937237/app_debug.o: ../src/app_debug.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/1360937237"
@${RM} ${OBJECTDIR}/_ext/1360937237/app_debug.o.d
@${RM} ${OBJECTDIR}/_ext/1360937237/app_debug.o
@${FIXDEPS} "${OBJECTDIR}/_ext/1360937237/app_debug.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bk-audio-dk" -I"../../../include" -I"../../../src" -I"../../../ble" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1360937237/app_debug.o.d" -o ${OBJECTDIR}/_ext/1360937237/app_debug.o ../src/app_debug.c
@${FIXDEPS} "${OBJECTDIR}/_ext/1360937237/app_debug.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bt_audio_dk" -I"../../../src" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1360937237/app_debug.o.d" -o ${OBJECTDIR}/_ext/1360937237/app_debug.o ../src/app_debug.c
${OBJECTDIR}/_ext/1360937237/app.o: ../src/app.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/1360937237"
@${RM} ${OBJECTDIR}/_ext/1360937237/app.o.d
@${RM} ${OBJECTDIR}/_ext/1360937237/app.o
@${FIXDEPS} "${OBJECTDIR}/_ext/1360937237/app.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bk-audio-dk" -I"../../../include" -I"../../../src" -I"../../../ble" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1360937237/app.o.d" -o ${OBJECTDIR}/_ext/1360937237/app.o ../src/app.c
@${FIXDEPS} "${OBJECTDIR}/_ext/1360937237/app.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bt_audio_dk" -I"../../../src" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1360937237/app.o.d" -o ${OBJECTDIR}/_ext/1360937237/app.o ../src/app.c
${OBJECTDIR}/_ext/1360937237/main.o: ../src/main.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/1360937237"
@${RM} ${OBJECTDIR}/_ext/1360937237/main.o.d
@${RM} ${OBJECTDIR}/_ext/1360937237/main.o
@${FIXDEPS} "${OBJECTDIR}/_ext/1360937237/main.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bk-audio-dk" -I"../../../include" -I"../../../src" -I"../../../ble" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1360937237/main.o.d" -o ${OBJECTDIR}/_ext/1360937237/main.o ../src/main.c
@${FIXDEPS} "${OBJECTDIR}/_ext/1360937237/main.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bt_audio_dk" -I"../../../src" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1360937237/main.o.d" -o ${OBJECTDIR}/_ext/1360937237/main.o ../src/main.c
${OBJECTDIR}/_ext/97075643/spp_and_le_counter.o: ../../../example/spp_and_le_counter.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/97075643"
@${RM} ${OBJECTDIR}/_ext/97075643/spp_and_le_counter.o.d
@${RM} ${OBJECTDIR}/_ext/97075643/spp_and_le_counter.o
@${FIXDEPS} "${OBJECTDIR}/_ext/97075643/spp_and_le_counter.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bk-audio-dk" -I"../../../include" -I"../../../src" -I"../../../ble" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/97075643/spp_and_le_counter.o.d" -o ${OBJECTDIR}/_ext/97075643/spp_and_le_counter.o ../../../example/spp_and_le_counter.c
@${FIXDEPS} "${OBJECTDIR}/_ext/97075643/spp_and_le_counter.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bt_audio_dk" -I"../../../src" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/97075643/spp_and_le_counter.o.d" -o ${OBJECTDIR}/_ext/97075643/spp_and_le_counter.o ../../../example/spp_and_le_counter.c
${OBJECTDIR}/_ext/534563071/ad_parser.o: ../../../src/ble/ad_parser.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/534563071"
@${RM} ${OBJECTDIR}/_ext/534563071/ad_parser.o.d
@${RM} ${OBJECTDIR}/_ext/534563071/ad_parser.o
@${FIXDEPS} "${OBJECTDIR}/_ext/534563071/ad_parser.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bk-audio-dk" -I"../../../include" -I"../../../src" -I"../../../ble" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/534563071/ad_parser.o.d" -o ${OBJECTDIR}/_ext/534563071/ad_parser.o ../../../src/ble/ad_parser.c
@${FIXDEPS} "${OBJECTDIR}/_ext/534563071/ad_parser.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bt_audio_dk" -I"../../../src" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/534563071/ad_parser.o.d" -o ${OBJECTDIR}/_ext/534563071/ad_parser.o ../../../src/ble/ad_parser.c
${OBJECTDIR}/_ext/534563071/att_db.o: ../../../src/ble/att_db.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/534563071"
@${RM} ${OBJECTDIR}/_ext/534563071/att_db.o.d
@${RM} ${OBJECTDIR}/_ext/534563071/att_db.o
@${FIXDEPS} "${OBJECTDIR}/_ext/534563071/att_db.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bk-audio-dk" -I"../../../include" -I"../../../src" -I"../../../ble" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/534563071/att_db.o.d" -o ${OBJECTDIR}/_ext/534563071/att_db.o ../../../src/ble/att_db.c
@${FIXDEPS} "${OBJECTDIR}/_ext/534563071/att_db.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bt_audio_dk" -I"../../../src" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/534563071/att_db.o.d" -o ${OBJECTDIR}/_ext/534563071/att_db.o ../../../src/ble/att_db.c
${OBJECTDIR}/_ext/534563071/att_dispatch.o: ../../../src/ble/att_dispatch.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/534563071"
@${RM} ${OBJECTDIR}/_ext/534563071/att_dispatch.o.d
@${RM} ${OBJECTDIR}/_ext/534563071/att_dispatch.o
@${FIXDEPS} "${OBJECTDIR}/_ext/534563071/att_dispatch.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bk-audio-dk" -I"../../../include" -I"../../../src" -I"../../../ble" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/534563071/att_dispatch.o.d" -o ${OBJECTDIR}/_ext/534563071/att_dispatch.o ../../../src/ble/att_dispatch.c
@${FIXDEPS} "${OBJECTDIR}/_ext/534563071/att_dispatch.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bt_audio_dk" -I"../../../src" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/534563071/att_dispatch.o.d" -o ${OBJECTDIR}/_ext/534563071/att_dispatch.o ../../../src/ble/att_dispatch.c
${OBJECTDIR}/_ext/534563071/att_server.o: ../../../src/ble/att_server.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/534563071"
@${RM} ${OBJECTDIR}/_ext/534563071/att_server.o.d
@${RM} ${OBJECTDIR}/_ext/534563071/att_server.o
@${FIXDEPS} "${OBJECTDIR}/_ext/534563071/att_server.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bk-audio-dk" -I"../../../include" -I"../../../src" -I"../../../ble" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/534563071/att_server.o.d" -o ${OBJECTDIR}/_ext/534563071/att_server.o ../../../src/ble/att_server.c
@${FIXDEPS} "${OBJECTDIR}/_ext/534563071/att_server.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bt_audio_dk" -I"../../../src" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/534563071/att_server.o.d" -o ${OBJECTDIR}/_ext/534563071/att_server.o ../../../src/ble/att_server.c
${OBJECTDIR}/_ext/534563071/le_device_db_memory.o: ../../../src/ble/le_device_db_memory.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/534563071"
@${RM} ${OBJECTDIR}/_ext/534563071/le_device_db_memory.o.d
@${RM} ${OBJECTDIR}/_ext/534563071/le_device_db_memory.o
@${FIXDEPS} "${OBJECTDIR}/_ext/534563071/le_device_db_memory.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bk-audio-dk" -I"../../../include" -I"../../../src" -I"../../../ble" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/534563071/le_device_db_memory.o.d" -o ${OBJECTDIR}/_ext/534563071/le_device_db_memory.o ../../../src/ble/le_device_db_memory.c
@${FIXDEPS} "${OBJECTDIR}/_ext/534563071/le_device_db_memory.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bt_audio_dk" -I"../../../src" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/534563071/le_device_db_memory.o.d" -o ${OBJECTDIR}/_ext/534563071/le_device_db_memory.o ../../../src/ble/le_device_db_memory.c
${OBJECTDIR}/_ext/534563071/sm.o: ../../../src/ble/sm.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/534563071"
@${RM} ${OBJECTDIR}/_ext/534563071/sm.o.d
@${RM} ${OBJECTDIR}/_ext/534563071/sm.o
@${FIXDEPS} "${OBJECTDIR}/_ext/534563071/sm.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bk-audio-dk" -I"../../../include" -I"../../../src" -I"../../../ble" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/534563071/sm.o.d" -o ${OBJECTDIR}/_ext/534563071/sm.o ../../../src/ble/sm.c
@${FIXDEPS} "${OBJECTDIR}/_ext/534563071/sm.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bt_audio_dk" -I"../../../src" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/534563071/sm.o.d" -o ${OBJECTDIR}/_ext/534563071/sm.o ../../../src/ble/sm.c
${OBJECTDIR}/_ext/1768064806/btstack_chipset_csr.o: ../../../chipset/csr/btstack_chipset_csr.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/1768064806"
@${RM} ${OBJECTDIR}/_ext/1768064806/btstack_chipset_csr.o.d
@${RM} ${OBJECTDIR}/_ext/1768064806/btstack_chipset_csr.o
@${FIXDEPS} "${OBJECTDIR}/_ext/1768064806/btstack_chipset_csr.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bk-audio-dk" -I"../../../include" -I"../../../src" -I"../../../ble" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1768064806/btstack_chipset_csr.o.d" -o ${OBJECTDIR}/_ext/1768064806/btstack_chipset_csr.o ../../../chipset/csr/btstack_chipset_csr.c
${OBJECTDIR}/_ext/1386528437/btstack_memory.o: ../../../src/btstack_memory.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/1386528437"
@${RM} ${OBJECTDIR}/_ext/1386528437/btstack_memory.o.d
@${RM} ${OBJECTDIR}/_ext/1386528437/btstack_memory.o
@${FIXDEPS} "${OBJECTDIR}/_ext/1386528437/btstack_memory.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bk-audio-dk" -I"../../../include" -I"../../../src" -I"../../../ble" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1386528437/btstack_memory.o.d" -o ${OBJECTDIR}/_ext/1386528437/btstack_memory.o ../../../src/btstack_memory.c
${OBJECTDIR}/_ext/1386528437/hci.o: ../../../src/hci.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/1386528437"
@${RM} ${OBJECTDIR}/_ext/1386528437/hci.o.d
@${RM} ${OBJECTDIR}/_ext/1386528437/hci.o
@${FIXDEPS} "${OBJECTDIR}/_ext/1386528437/hci.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bk-audio-dk" -I"../../../include" -I"../../../src" -I"../../../ble" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1386528437/hci.o.d" -o ${OBJECTDIR}/_ext/1386528437/hci.o ../../../src/hci.c
${OBJECTDIR}/_ext/1386528437/hci_cmd.o: ../../../src/hci_cmd.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/1386528437"
@${RM} ${OBJECTDIR}/_ext/1386528437/hci_cmd.o.d
@${RM} ${OBJECTDIR}/_ext/1386528437/hci_cmd.o
@${FIXDEPS} "${OBJECTDIR}/_ext/1386528437/hci_cmd.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bk-audio-dk" -I"../../../include" -I"../../../src" -I"../../../ble" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1386528437/hci_cmd.o.d" -o ${OBJECTDIR}/_ext/1386528437/hci_cmd.o ../../../src/hci_cmd.c
${OBJECTDIR}/_ext/1386528437/hci_dump.o: ../../../src/hci_dump.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/1386528437"
@${RM} ${OBJECTDIR}/_ext/1386528437/hci_dump.o.d
@${RM} ${OBJECTDIR}/_ext/1386528437/hci_dump.o
@${FIXDEPS} "${OBJECTDIR}/_ext/1386528437/hci_dump.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bk-audio-dk" -I"../../../include" -I"../../../src" -I"../../../ble" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1386528437/hci_dump.o.d" -o ${OBJECTDIR}/_ext/1386528437/hci_dump.o ../../../src/hci_dump.c
${OBJECTDIR}/_ext/1386528437/l2cap.o: ../../../src/l2cap.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/1386528437"
@${RM} ${OBJECTDIR}/_ext/1386528437/l2cap.o.d
@${RM} ${OBJECTDIR}/_ext/1386528437/l2cap.o
@${FIXDEPS} "${OBJECTDIR}/_ext/1386528437/l2cap.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bk-audio-dk" -I"../../../include" -I"../../../src" -I"../../../ble" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1386528437/l2cap.o.d" -o ${OBJECTDIR}/_ext/1386528437/l2cap.o ../../../src/l2cap.c
${OBJECTDIR}/_ext/1386528437/l2cap_signaling.o: ../../../src/l2cap_signaling.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/1386528437"
@${RM} ${OBJECTDIR}/_ext/1386528437/l2cap_signaling.o.d
@${RM} ${OBJECTDIR}/_ext/1386528437/l2cap_signaling.o
@${FIXDEPS} "${OBJECTDIR}/_ext/1386528437/l2cap_signaling.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bk-audio-dk" -I"../../../include" -I"../../../src" -I"../../../ble" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1386528437/l2cap_signaling.o.d" -o ${OBJECTDIR}/_ext/1386528437/l2cap_signaling.o ../../../src/l2cap_signaling.c
${OBJECTDIR}/_ext/1386528437/btstack_linked_list.o: ../../../src/btstack_linked_list.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/1386528437"
@${RM} ${OBJECTDIR}/_ext/1386528437/btstack_linked_list.o.d
@${RM} ${OBJECTDIR}/_ext/1386528437/btstack_linked_list.o
@${FIXDEPS} "${OBJECTDIR}/_ext/1386528437/btstack_linked_list.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bk-audio-dk" -I"../../../include" -I"../../../src" -I"../../../ble" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1386528437/btstack_linked_list.o.d" -o ${OBJECTDIR}/_ext/1386528437/btstack_linked_list.o ../../../src/btstack_linked_list.c
${OBJECTDIR}/_ext/1386528437/btstack_memory_pool.o: ../../../src/btstack_memory_pool.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/1386528437"
@${RM} ${OBJECTDIR}/_ext/1386528437/btstack_memory_pool.o.d
@${RM} ${OBJECTDIR}/_ext/1386528437/btstack_memory_pool.o
@${FIXDEPS} "${OBJECTDIR}/_ext/1386528437/btstack_memory_pool.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bk-audio-dk" -I"../../../include" -I"../../../src" -I"../../../ble" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1386528437/btstack_memory_pool.o.d" -o ${OBJECTDIR}/_ext/1386528437/btstack_memory_pool.o ../../../src/btstack_memory_pool.c
${OBJECTDIR}/_ext/1386327864/btstack_link_key_db_memory.o: ../../../src/classic/btstack_link_key_db_memory.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/1386327864"
@${RM} ${OBJECTDIR}/_ext/1386327864/btstack_link_key_db_memory.o.d
@${RM} ${OBJECTDIR}/_ext/1386327864/btstack_link_key_db_memory.o
@${FIXDEPS} "${OBJECTDIR}/_ext/1386327864/btstack_link_key_db_memory.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bk-audio-dk" -I"../../../include" -I"../../../src" -I"../../../ble" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1386327864/btstack_link_key_db_memory.o.d" -o ${OBJECTDIR}/_ext/1386327864/btstack_link_key_db_memory.o ../../../src/classic/btstack_link_key_db_memory.c
${OBJECTDIR}/_ext/1386327864/rfcomm.o: ../../../src/classic/rfcomm.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/1386327864"
@${RM} ${OBJECTDIR}/_ext/1386327864/rfcomm.o.d
@${RM} ${OBJECTDIR}/_ext/1386327864/rfcomm.o
@${FIXDEPS} "${OBJECTDIR}/_ext/1386327864/rfcomm.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bk-audio-dk" -I"../../../include" -I"../../../src" -I"../../../ble" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1386327864/rfcomm.o.d" -o ${OBJECTDIR}/_ext/1386327864/rfcomm.o ../../../src/classic/rfcomm.c
${OBJECTDIR}/_ext/1386528437/btstack_run_loop.o: ../../../src/btstack_run_loop.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/1386528437"
@${RM} ${OBJECTDIR}/_ext/1386528437/btstack_run_loop.o.d
@${RM} ${OBJECTDIR}/_ext/1386528437/btstack_run_loop.o
@${FIXDEPS} "${OBJECTDIR}/_ext/1386528437/btstack_run_loop.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bk-audio-dk" -I"../../../include" -I"../../../src" -I"../../../ble" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1386528437/btstack_run_loop.o.d" -o ${OBJECTDIR}/_ext/1386528437/btstack_run_loop.o ../../../src/btstack_run_loop.c
${OBJECTDIR}/_ext/1386327864/sdp_server.o: ../../../src/classic/sdp_server.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/1386327864"
@${RM} ${OBJECTDIR}/_ext/1386327864/sdp_server.o.d
@${RM} ${OBJECTDIR}/_ext/1386327864/sdp_server.o
@${FIXDEPS} "${OBJECTDIR}/_ext/1386327864/sdp_server.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bk-audio-dk" -I"../../../include" -I"../../../src" -I"../../../ble" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1386327864/sdp_server.o.d" -o ${OBJECTDIR}/_ext/1386327864/sdp_server.o ../../../src/classic/sdp_server.c
${OBJECTDIR}/_ext/1386327864/sdp_client.o: ../../../src/classic/sdp_client.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/1386327864"
@${RM} ${OBJECTDIR}/_ext/1386327864/sdp_client.o.d
@${RM} ${OBJECTDIR}/_ext/1386327864/sdp_client.o
@${FIXDEPS} "${OBJECTDIR}/_ext/1386327864/sdp_client.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bk-audio-dk" -I"../../../include" -I"../../../src" -I"../../../ble" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1386327864/sdp_client.o.d" -o ${OBJECTDIR}/_ext/1386327864/sdp_client.o ../../../src/classic/sdp_client.c
${OBJECTDIR}/_ext/1386327864/sdp_client_rfcomm.o: ../../../src/classic/sdp_client_rfcomm.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/1386327864"
@${RM} ${OBJECTDIR}/_ext/1386327864/sdp_client_rfcomm.o.d
@${RM} ${OBJECTDIR}/_ext/1386327864/sdp_client_rfcomm.o
@${FIXDEPS} "${OBJECTDIR}/_ext/1386327864/sdp_client_rfcomm.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bk-audio-dk" -I"../../../include" -I"../../../src" -I"../../../ble" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1386327864/sdp_client_rfcomm.o.d" -o ${OBJECTDIR}/_ext/1386327864/sdp_client_rfcomm.o ../../../src/classic/sdp_client_rfcomm.c
${OBJECTDIR}/_ext/1386327864/sdp_util.o: ../../../src/classic/sdp_util.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/1386327864"
@${RM} ${OBJECTDIR}/_ext/1386327864/sdp_util.o.d
@${RM} ${OBJECTDIR}/_ext/1386327864/sdp_util.o
@${FIXDEPS} "${OBJECTDIR}/_ext/1386327864/sdp_util.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bk-audio-dk" -I"../../../include" -I"../../../src" -I"../../../ble" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1386327864/sdp_util.o.d" -o ${OBJECTDIR}/_ext/1386327864/sdp_util.o ../../../src/classic/sdp_util.c
${OBJECTDIR}/_ext/1386528437/btstack_util.o: ../../../src/btstack_util.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/1386528437"
@${RM} ${OBJECTDIR}/_ext/1386528437/btstack_util.o.d
@${RM} ${OBJECTDIR}/_ext/1386528437/btstack_util.o
@${FIXDEPS} "${OBJECTDIR}/_ext/1386528437/btstack_util.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bk-audio-dk" -I"../../../include" -I"../../../src" -I"../../../ble" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1386528437/btstack_util.o.d" -o ${OBJECTDIR}/_ext/1386528437/btstack_util.o ../../../src/btstack_util.c
@${FIXDEPS} "${OBJECTDIR}/_ext/1768064806/btstack_chipset_csr.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bt_audio_dk" -I"../../../src" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1768064806/btstack_chipset_csr.o.d" -o ${OBJECTDIR}/_ext/1768064806/btstack_chipset_csr.o ../../../chipset/csr/btstack_chipset_csr.c
${OBJECTDIR}/_ext/993942601/btstack_run_loop_embedded.o: ../../../platform/embedded/btstack_run_loop_embedded.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/993942601"
@${RM} ${OBJECTDIR}/_ext/993942601/btstack_run_loop_embedded.o.d
@${RM} ${OBJECTDIR}/_ext/993942601/btstack_run_loop_embedded.o
@${FIXDEPS} "${OBJECTDIR}/_ext/993942601/btstack_run_loop_embedded.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bk-audio-dk" -I"../../../include" -I"../../../src" -I"../../../ble" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/993942601/btstack_run_loop_embedded.o.d" -o ${OBJECTDIR}/_ext/993942601/btstack_run_loop_embedded.o ../../../platform/embedded/btstack_run_loop_embedded.c
@${FIXDEPS} "${OBJECTDIR}/_ext/993942601/btstack_run_loop_embedded.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bt_audio_dk" -I"../../../src" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/993942601/btstack_run_loop_embedded.o.d" -o ${OBJECTDIR}/_ext/993942601/btstack_run_loop_embedded.o ../../../platform/embedded/btstack_run_loop_embedded.c
${OBJECTDIR}/_ext/993942601/hci_transport_h4_embedded.o: ../../../platform/embedded/hci_transport_h4_embedded.c nbproject/Makefile-${CND_CONF}.mk
${OBJECTDIR}/_ext/993942601/btstack_uart_block_embedded.o: ../../../platform/embedded/btstack_uart_block_embedded.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/993942601"
@${RM} ${OBJECTDIR}/_ext/993942601/hci_transport_h4_embedded.o.d
@${RM} ${OBJECTDIR}/_ext/993942601/hci_transport_h4_embedded.o
@${FIXDEPS} "${OBJECTDIR}/_ext/993942601/hci_transport_h4_embedded.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bk-audio-dk" -I"../../../include" -I"../../../src" -I"../../../ble" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/993942601/hci_transport_h4_embedded.o.d" -o ${OBJECTDIR}/_ext/993942601/hci_transport_h4_embedded.o ../../../platform/embedded/hci_transport_h4_embedded.c
@${RM} ${OBJECTDIR}/_ext/993942601/btstack_uart_block_embedded.o.d
@${RM} ${OBJECTDIR}/_ext/993942601/btstack_uart_block_embedded.o
@${FIXDEPS} "${OBJECTDIR}/_ext/993942601/btstack_uart_block_embedded.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bt_audio_dk" -I"../../../src" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/993942601/btstack_uart_block_embedded.o.d" -o ${OBJECTDIR}/_ext/993942601/btstack_uart_block_embedded.o ../../../platform/embedded/btstack_uart_block_embedded.c
${OBJECTDIR}/_ext/1386528437/btstack_memory.o: ../../../src/btstack_memory.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/1386528437"
@${RM} ${OBJECTDIR}/_ext/1386528437/btstack_memory.o.d
@${RM} ${OBJECTDIR}/_ext/1386528437/btstack_memory.o
@${FIXDEPS} "${OBJECTDIR}/_ext/1386528437/btstack_memory.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bt_audio_dk" -I"../../../src" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1386528437/btstack_memory.o.d" -o ${OBJECTDIR}/_ext/1386528437/btstack_memory.o ../../../src/btstack_memory.c
${OBJECTDIR}/_ext/1386528437/hci.o: ../../../src/hci.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/1386528437"
@${RM} ${OBJECTDIR}/_ext/1386528437/hci.o.d
@${RM} ${OBJECTDIR}/_ext/1386528437/hci.o
@${FIXDEPS} "${OBJECTDIR}/_ext/1386528437/hci.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bt_audio_dk" -I"../../../src" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1386528437/hci.o.d" -o ${OBJECTDIR}/_ext/1386528437/hci.o ../../../src/hci.c
${OBJECTDIR}/_ext/1386528437/hci_cmd.o: ../../../src/hci_cmd.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/1386528437"
@${RM} ${OBJECTDIR}/_ext/1386528437/hci_cmd.o.d
@${RM} ${OBJECTDIR}/_ext/1386528437/hci_cmd.o
@${FIXDEPS} "${OBJECTDIR}/_ext/1386528437/hci_cmd.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bt_audio_dk" -I"../../../src" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1386528437/hci_cmd.o.d" -o ${OBJECTDIR}/_ext/1386528437/hci_cmd.o ../../../src/hci_cmd.c
${OBJECTDIR}/_ext/1386528437/hci_dump.o: ../../../src/hci_dump.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/1386528437"
@${RM} ${OBJECTDIR}/_ext/1386528437/hci_dump.o.d
@${RM} ${OBJECTDIR}/_ext/1386528437/hci_dump.o
@${FIXDEPS} "${OBJECTDIR}/_ext/1386528437/hci_dump.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bt_audio_dk" -I"../../../src" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1386528437/hci_dump.o.d" -o ${OBJECTDIR}/_ext/1386528437/hci_dump.o ../../../src/hci_dump.c
${OBJECTDIR}/_ext/1386528437/l2cap.o: ../../../src/l2cap.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/1386528437"
@${RM} ${OBJECTDIR}/_ext/1386528437/l2cap.o.d
@${RM} ${OBJECTDIR}/_ext/1386528437/l2cap.o
@${FIXDEPS} "${OBJECTDIR}/_ext/1386528437/l2cap.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bt_audio_dk" -I"../../../src" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1386528437/l2cap.o.d" -o ${OBJECTDIR}/_ext/1386528437/l2cap.o ../../../src/l2cap.c
${OBJECTDIR}/_ext/1386528437/l2cap_signaling.o: ../../../src/l2cap_signaling.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/1386528437"
@${RM} ${OBJECTDIR}/_ext/1386528437/l2cap_signaling.o.d
@${RM} ${OBJECTDIR}/_ext/1386528437/l2cap_signaling.o
@${FIXDEPS} "${OBJECTDIR}/_ext/1386528437/l2cap_signaling.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bt_audio_dk" -I"../../../src" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1386528437/l2cap_signaling.o.d" -o ${OBJECTDIR}/_ext/1386528437/l2cap_signaling.o ../../../src/l2cap_signaling.c
${OBJECTDIR}/_ext/1386528437/btstack_linked_list.o: ../../../src/btstack_linked_list.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/1386528437"
@${RM} ${OBJECTDIR}/_ext/1386528437/btstack_linked_list.o.d
@${RM} ${OBJECTDIR}/_ext/1386528437/btstack_linked_list.o
@${FIXDEPS} "${OBJECTDIR}/_ext/1386528437/btstack_linked_list.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bt_audio_dk" -I"../../../src" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1386528437/btstack_linked_list.o.d" -o ${OBJECTDIR}/_ext/1386528437/btstack_linked_list.o ../../../src/btstack_linked_list.c
${OBJECTDIR}/_ext/1386528437/btstack_memory_pool.o: ../../../src/btstack_memory_pool.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/1386528437"
@${RM} ${OBJECTDIR}/_ext/1386528437/btstack_memory_pool.o.d
@${RM} ${OBJECTDIR}/_ext/1386528437/btstack_memory_pool.o
@${FIXDEPS} "${OBJECTDIR}/_ext/1386528437/btstack_memory_pool.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bt_audio_dk" -I"../../../src" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1386528437/btstack_memory_pool.o.d" -o ${OBJECTDIR}/_ext/1386528437/btstack_memory_pool.o ../../../src/btstack_memory_pool.c
${OBJECTDIR}/_ext/1386327864/btstack_link_key_db_memory.o: ../../../src/classic/btstack_link_key_db_memory.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/1386327864"
@${RM} ${OBJECTDIR}/_ext/1386327864/btstack_link_key_db_memory.o.d
@${RM} ${OBJECTDIR}/_ext/1386327864/btstack_link_key_db_memory.o
@${FIXDEPS} "${OBJECTDIR}/_ext/1386327864/btstack_link_key_db_memory.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bt_audio_dk" -I"../../../src" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1386327864/btstack_link_key_db_memory.o.d" -o ${OBJECTDIR}/_ext/1386327864/btstack_link_key_db_memory.o ../../../src/classic/btstack_link_key_db_memory.c
${OBJECTDIR}/_ext/1386327864/rfcomm.o: ../../../src/classic/rfcomm.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/1386327864"
@${RM} ${OBJECTDIR}/_ext/1386327864/rfcomm.o.d
@${RM} ${OBJECTDIR}/_ext/1386327864/rfcomm.o
@${FIXDEPS} "${OBJECTDIR}/_ext/1386327864/rfcomm.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bt_audio_dk" -I"../../../src" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1386327864/rfcomm.o.d" -o ${OBJECTDIR}/_ext/1386327864/rfcomm.o ../../../src/classic/rfcomm.c
${OBJECTDIR}/_ext/1386528437/btstack_run_loop.o: ../../../src/btstack_run_loop.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/1386528437"
@${RM} ${OBJECTDIR}/_ext/1386528437/btstack_run_loop.o.d
@${RM} ${OBJECTDIR}/_ext/1386528437/btstack_run_loop.o
@${FIXDEPS} "${OBJECTDIR}/_ext/1386528437/btstack_run_loop.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bt_audio_dk" -I"../../../src" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1386528437/btstack_run_loop.o.d" -o ${OBJECTDIR}/_ext/1386528437/btstack_run_loop.o ../../../src/btstack_run_loop.c
${OBJECTDIR}/_ext/1386327864/sdp_server.o: ../../../src/classic/sdp_server.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/1386327864"
@${RM} ${OBJECTDIR}/_ext/1386327864/sdp_server.o.d
@${RM} ${OBJECTDIR}/_ext/1386327864/sdp_server.o
@${FIXDEPS} "${OBJECTDIR}/_ext/1386327864/sdp_server.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bt_audio_dk" -I"../../../src" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1386327864/sdp_server.o.d" -o ${OBJECTDIR}/_ext/1386327864/sdp_server.o ../../../src/classic/sdp_server.c
${OBJECTDIR}/_ext/1386327864/sdp_client.o: ../../../src/classic/sdp_client.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/1386327864"
@${RM} ${OBJECTDIR}/_ext/1386327864/sdp_client.o.d
@${RM} ${OBJECTDIR}/_ext/1386327864/sdp_client.o
@${FIXDEPS} "${OBJECTDIR}/_ext/1386327864/sdp_client.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bt_audio_dk" -I"../../../src" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1386327864/sdp_client.o.d" -o ${OBJECTDIR}/_ext/1386327864/sdp_client.o ../../../src/classic/sdp_client.c
${OBJECTDIR}/_ext/1386327864/sdp_client_rfcomm.o: ../../../src/classic/sdp_client_rfcomm.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/1386327864"
@${RM} ${OBJECTDIR}/_ext/1386327864/sdp_client_rfcomm.o.d
@${RM} ${OBJECTDIR}/_ext/1386327864/sdp_client_rfcomm.o
@${FIXDEPS} "${OBJECTDIR}/_ext/1386327864/sdp_client_rfcomm.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bt_audio_dk" -I"../../../src" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1386327864/sdp_client_rfcomm.o.d" -o ${OBJECTDIR}/_ext/1386327864/sdp_client_rfcomm.o ../../../src/classic/sdp_client_rfcomm.c
${OBJECTDIR}/_ext/1386327864/sdp_util.o: ../../../src/classic/sdp_util.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/1386327864"
@${RM} ${OBJECTDIR}/_ext/1386327864/sdp_util.o.d
@${RM} ${OBJECTDIR}/_ext/1386327864/sdp_util.o
@${FIXDEPS} "${OBJECTDIR}/_ext/1386327864/sdp_util.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bt_audio_dk" -I"../../../src" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1386327864/sdp_util.o.d" -o ${OBJECTDIR}/_ext/1386327864/sdp_util.o ../../../src/classic/sdp_util.c
${OBJECTDIR}/_ext/1386528437/btstack_util.o: ../../../src/btstack_util.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/1386528437"
@${RM} ${OBJECTDIR}/_ext/1386528437/btstack_util.o.d
@${RM} ${OBJECTDIR}/_ext/1386528437/btstack_util.o
@${FIXDEPS} "${OBJECTDIR}/_ext/1386528437/btstack_util.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bt_audio_dk" -I"../../../src" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1386528437/btstack_util.o.d" -o ${OBJECTDIR}/_ext/1386528437/btstack_util.o ../../../src/btstack_util.c
${OBJECTDIR}/_ext/1386327864/spp_server.o: ../../../src/classic/spp_server.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/1386327864"
@${RM} ${OBJECTDIR}/_ext/1386327864/spp_server.o.d
@${RM} ${OBJECTDIR}/_ext/1386327864/spp_server.o
@${FIXDEPS} "${OBJECTDIR}/_ext/1386327864/spp_server.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bt_audio_dk" -I"../../../src" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1386327864/spp_server.o.d" -o ${OBJECTDIR}/_ext/1386327864/spp_server.o ../../../src/classic/spp_server.c
${OBJECTDIR}/_ext/1386528437/hci_transport_h4.o: ../../../src/hci_transport_h4.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/1386528437"
@${RM} ${OBJECTDIR}/_ext/1386528437/hci_transport_h4.o.d
@${RM} ${OBJECTDIR}/_ext/1386528437/hci_transport_h4.o
@${FIXDEPS} "${OBJECTDIR}/_ext/1386528437/hci_transport_h4.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bt_audio_dk" -I"../../../src" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1386528437/hci_transport_h4.o.d" -o ${OBJECTDIR}/_ext/1386528437/hci_transport_h4.o ../../../src/hci_transport_h4.c
${OBJECTDIR}/_ext/1386528437/hci_transport_h5.o: ../../../src/hci_transport_h5.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/1386528437"
@${RM} ${OBJECTDIR}/_ext/1386528437/hci_transport_h5.o.d
@${RM} ${OBJECTDIR}/_ext/1386528437/hci_transport_h5.o
@${FIXDEPS} "${OBJECTDIR}/_ext/1386528437/hci_transport_h5.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bt_audio_dk" -I"../../../src" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1386528437/hci_transport_h5.o.d" -o ${OBJECTDIR}/_ext/1386528437/hci_transport_h5.o ../../../src/hci_transport_h5.c
${OBJECTDIR}/_ext/1386528437/btstack_slip.o: ../../../src/btstack_slip.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/1386528437"
@${RM} ${OBJECTDIR}/_ext/1386528437/btstack_slip.o.d
@${RM} ${OBJECTDIR}/_ext/1386528437/btstack_slip.o
@${FIXDEPS} "${OBJECTDIR}/_ext/1386528437/btstack_slip.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bt_audio_dk" -I"../../../src" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1386528437/btstack_slip.o.d" -o ${OBJECTDIR}/_ext/1386528437/btstack_slip.o ../../../src/btstack_slip.c
${OBJECTDIR}/_ext/1880736137/drv_tmr.o: ../../../../driver/tmr/src/dynamic/drv_tmr.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/1880736137"
@${RM} ${OBJECTDIR}/_ext/1880736137/drv_tmr.o.d
@${RM} ${OBJECTDIR}/_ext/1880736137/drv_tmr.o
@${FIXDEPS} "${OBJECTDIR}/_ext/1880736137/drv_tmr.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bk-audio-dk" -I"../../../include" -I"../../../src" -I"../../../ble" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1880736137/drv_tmr.o.d" -o ${OBJECTDIR}/_ext/1880736137/drv_tmr.o ../../../../driver/tmr/src/dynamic/drv_tmr.c
@${FIXDEPS} "${OBJECTDIR}/_ext/1880736137/drv_tmr.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bt_audio_dk" -I"../../../src" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1880736137/drv_tmr.o.d" -o ${OBJECTDIR}/_ext/1880736137/drv_tmr.o ../../../../driver/tmr/src/dynamic/drv_tmr.c
${OBJECTDIR}/_ext/1112166103/sys_clk.o: ../../../../system/clk/src/sys_clk.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/1112166103"
@${RM} ${OBJECTDIR}/_ext/1112166103/sys_clk.o.d
@${RM} ${OBJECTDIR}/_ext/1112166103/sys_clk.o
@${FIXDEPS} "${OBJECTDIR}/_ext/1112166103/sys_clk.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bk-audio-dk" -I"../../../include" -I"../../../src" -I"../../../ble" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1112166103/sys_clk.o.d" -o ${OBJECTDIR}/_ext/1112166103/sys_clk.o ../../../../system/clk/src/sys_clk.c
@${FIXDEPS} "${OBJECTDIR}/_ext/1112166103/sys_clk.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bt_audio_dk" -I"../../../src" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1112166103/sys_clk.o.d" -o ${OBJECTDIR}/_ext/1112166103/sys_clk.o ../../../../system/clk/src/sys_clk.c
${OBJECTDIR}/_ext/1112166103/sys_clk_pic32mx.o: ../../../../system/clk/src/sys_clk_pic32mx.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/1112166103"
@${RM} ${OBJECTDIR}/_ext/1112166103/sys_clk_pic32mx.o.d
@${RM} ${OBJECTDIR}/_ext/1112166103/sys_clk_pic32mx.o
@${FIXDEPS} "${OBJECTDIR}/_ext/1112166103/sys_clk_pic32mx.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bk-audio-dk" -I"../../../include" -I"../../../src" -I"../../../ble" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1112166103/sys_clk_pic32mx.o.d" -o ${OBJECTDIR}/_ext/1112166103/sys_clk_pic32mx.o ../../../../system/clk/src/sys_clk_pic32mx.c
@${FIXDEPS} "${OBJECTDIR}/_ext/1112166103/sys_clk_pic32mx.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bt_audio_dk" -I"../../../src" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1112166103/sys_clk_pic32mx.o.d" -o ${OBJECTDIR}/_ext/1112166103/sys_clk_pic32mx.o ../../../../system/clk/src/sys_clk_pic32mx.c
${OBJECTDIR}/_ext/1510368962/sys_devcon.o: ../../../../system/devcon/src/sys_devcon.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/1510368962"
@${RM} ${OBJECTDIR}/_ext/1510368962/sys_devcon.o.d
@${RM} ${OBJECTDIR}/_ext/1510368962/sys_devcon.o
@${FIXDEPS} "${OBJECTDIR}/_ext/1510368962/sys_devcon.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bk-audio-dk" -I"../../../include" -I"../../../src" -I"../../../ble" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1510368962/sys_devcon.o.d" -o ${OBJECTDIR}/_ext/1510368962/sys_devcon.o ../../../../system/devcon/src/sys_devcon.c
@${FIXDEPS} "${OBJECTDIR}/_ext/1510368962/sys_devcon.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bt_audio_dk" -I"../../../src" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1510368962/sys_devcon.o.d" -o ${OBJECTDIR}/_ext/1510368962/sys_devcon.o ../../../../system/devcon/src/sys_devcon.c
${OBJECTDIR}/_ext/1510368962/sys_devcon_pic32mx.o: ../../../../system/devcon/src/sys_devcon_pic32mx.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/1510368962"
@${RM} ${OBJECTDIR}/_ext/1510368962/sys_devcon_pic32mx.o.d
@${RM} ${OBJECTDIR}/_ext/1510368962/sys_devcon_pic32mx.o
@${FIXDEPS} "${OBJECTDIR}/_ext/1510368962/sys_devcon_pic32mx.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bk-audio-dk" -I"../../../include" -I"../../../src" -I"../../../ble" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1510368962/sys_devcon_pic32mx.o.d" -o ${OBJECTDIR}/_ext/1510368962/sys_devcon_pic32mx.o ../../../../system/devcon/src/sys_devcon_pic32mx.c
@${FIXDEPS} "${OBJECTDIR}/_ext/1510368962/sys_devcon_pic32mx.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bt_audio_dk" -I"../../../src" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1510368962/sys_devcon_pic32mx.o.d" -o ${OBJECTDIR}/_ext/1510368962/sys_devcon_pic32mx.o ../../../../system/devcon/src/sys_devcon_pic32mx.c
${OBJECTDIR}/_ext/2087176412/sys_int_pic32.o: ../../../../system/int/src/sys_int_pic32.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/2087176412"
@${RM} ${OBJECTDIR}/_ext/2087176412/sys_int_pic32.o.d
@${RM} ${OBJECTDIR}/_ext/2087176412/sys_int_pic32.o
@${FIXDEPS} "${OBJECTDIR}/_ext/2087176412/sys_int_pic32.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bk-audio-dk" -I"../../../include" -I"../../../src" -I"../../../ble" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/2087176412/sys_int_pic32.o.d" -o ${OBJECTDIR}/_ext/2087176412/sys_int_pic32.o ../../../../system/int/src/sys_int_pic32.c
@${FIXDEPS} "${OBJECTDIR}/_ext/2087176412/sys_int_pic32.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bt_audio_dk" -I"../../../src" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/2087176412/sys_int_pic32.o.d" -o ${OBJECTDIR}/_ext/2087176412/sys_int_pic32.o ../../../../system/int/src/sys_int_pic32.c
${OBJECTDIR}/_ext/2147153351/sys_ports.o: ../../../../system/ports/src/sys_ports.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/2147153351"
@${RM} ${OBJECTDIR}/_ext/2147153351/sys_ports.o.d
@${RM} ${OBJECTDIR}/_ext/2147153351/sys_ports.o
@${FIXDEPS} "${OBJECTDIR}/_ext/2147153351/sys_ports.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bk-audio-dk" -I"../../../include" -I"../../../src" -I"../../../ble" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/2147153351/sys_ports.o.d" -o ${OBJECTDIR}/_ext/2147153351/sys_ports.o ../../../../system/ports/src/sys_ports.c
@${FIXDEPS} "${OBJECTDIR}/_ext/2147153351/sys_ports.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bt_audio_dk" -I"../../../src" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/2147153351/sys_ports.o.d" -o ${OBJECTDIR}/_ext/2147153351/sys_ports.o ../../../../system/ports/src/sys_ports.c
endif
@ -576,12 +624,12 @@ endif
ifeq ($(TYPE_IMAGE), DEBUG_RUN)
dist/${CND_CONF}/${IMAGE_TYPE}/app.X.${IMAGE_TYPE}.${OUTPUT_SUFFIX}: ${OBJECTFILES} nbproject/Makefile-${CND_CONF}.mk ../../../../../bin/framework/peripheral/PIC32MX450F256L_peripherals.a
@${MKDIR} dist/${CND_CONF}/${IMAGE_TYPE}
${MP_CC} $(MP_EXTRA_LD_PRE) -mdebugger -D__MPLAB_DEBUGGER_PK3=1 -mprocessor=$(MP_PROCESSOR_OPTION) -o dist/${CND_CONF}/${IMAGE_TYPE}/app.X.${IMAGE_TYPE}.${OUTPUT_SUFFIX} ${OBJECTFILES_QUOTED_IF_SPACED} ../../../../../bin/framework/peripheral/PIC32MX450F256L_peripherals.a -mreserve=boot@0x1FC02000:0x1FC02FEF -mreserve=boot@0x1FC02000:0x1FC0275F -Wl,--defsym=__MPLAB_BUILD=1$(MP_EXTRA_LD_POST)$(MP_LINKER_FILE_OPTION),--defsym=__MPLAB_DEBUG=1,--defsym=__DEBUG=1,--defsym=__MPLAB_DEBUGGER_PK3=1,-Map="${DISTDIR}/${PROJECTNAME}.${IMAGE_TYPE}.map",--memorysummary,dist/${CND_CONF}/${IMAGE_TYPE}/memoryfile.xml
${MP_CC} $(MP_EXTRA_LD_PRE) -mdebugger -D__MPLAB_DEBUGGER_PK3=1 -mprocessor=$(MP_PROCESSOR_OPTION) -o dist/${CND_CONF}/${IMAGE_TYPE}/app.X.${IMAGE_TYPE}.${OUTPUT_SUFFIX} ${OBJECTFILES_QUOTED_IF_SPACED} ../../../../../bin/framework/peripheral/PIC32MX450F256L_peripherals.a -mreserve=boot@0x1FC02000:0x1FC02FEF -mreserve=boot@0x1FC02000:0x1FC0275F -Wl,--defsym=__MPLAB_BUILD=1$(MP_EXTRA_LD_POST)$(MP_LINKER_FILE_OPTION),--defsym=__MPLAB_DEBUG=1,--defsym=__DEBUG=1,--defsym=__MPLAB_DEBUGGER_PK3=1,--defsym=_min_heap_size=16,-Map="${DISTDIR}/${PROJECTNAME}.${IMAGE_TYPE}.map",--memorysummary,dist/${CND_CONF}/${IMAGE_TYPE}/memoryfile.xml
else
dist/${CND_CONF}/${IMAGE_TYPE}/app.X.${IMAGE_TYPE}.${OUTPUT_SUFFIX}: ${OBJECTFILES} nbproject/Makefile-${CND_CONF}.mk ../../../../../bin/framework/peripheral/PIC32MX450F256L_peripherals.a
@${MKDIR} dist/${CND_CONF}/${IMAGE_TYPE}
${MP_CC} $(MP_EXTRA_LD_PRE) -mprocessor=$(MP_PROCESSOR_OPTION) -o dist/${CND_CONF}/${IMAGE_TYPE}/app.X.${IMAGE_TYPE}.${DEBUGGABLE_SUFFIX} ${OBJECTFILES_QUOTED_IF_SPACED} ../../../../../bin/framework/peripheral/PIC32MX450F256L_peripherals.a -Wl,--defsym=__MPLAB_BUILD=1$(MP_EXTRA_LD_POST)$(MP_LINKER_FILE_OPTION),-Map="${DISTDIR}/${PROJECTNAME}.${IMAGE_TYPE}.map",--memorysummary,dist/${CND_CONF}/${IMAGE_TYPE}/memoryfile.xml
${MP_CC} $(MP_EXTRA_LD_PRE) -mprocessor=$(MP_PROCESSOR_OPTION) -o dist/${CND_CONF}/${IMAGE_TYPE}/app.X.${IMAGE_TYPE}.${DEBUGGABLE_SUFFIX} ${OBJECTFILES_QUOTED_IF_SPACED} ../../../../../bin/framework/peripheral/PIC32MX450F256L_peripherals.a -Wl,--defsym=__MPLAB_BUILD=1$(MP_EXTRA_LD_POST)$(MP_LINKER_FILE_OPTION),--defsym=_min_heap_size=16,-Map="${DISTDIR}/${PROJECTNAME}.${IMAGE_TYPE}.map",--memorysummary,dist/${CND_CONF}/${IMAGE_TYPE}/memoryfile.xml
${MP_CC_DIR}/xc32-bin2hex dist/${CND_CONF}/${IMAGE_TYPE}/app.X.${IMAGE_TYPE}.${DEBUGGABLE_SUFFIX}
endif

View File

@ -1,8 +1,8 @@
#
#Mon Mar 07 22:03:33 CET 2016
#Mon May 02 17:06:20 CEST 2016
default.com-microchip-mplab-nbide-toolchainXC32-XC32LanguageToolchain.md5=53fb2ac0203ca7bc347fa1cfc029d2dd
default.languagetoolchain.dir=/Applications/microchip/xc32/v1.40/bin
configurations-xml=935f32d81efe418a2148905ef6c8a87c
configurations-xml=0df9182c13476f6c3a0ce9f91bd947c3
com-microchip-mplab-nbide-embedded-makeproject-MakeProject.md5=4b47e815d50912689a67d0b162f47a58
default.languagetoolchain.version=1.40
host.platform=mac

View File

@ -6,9 +6,9 @@
projectFiles="true">
<logicalFolder name="f1" displayName="app" projectFiles="true">
<logicalFolder name="f1" displayName="system_config" projectFiles="true">
<logicalFolder name="f1" displayName="bt-audio-dk" projectFiles="true">
<itemPath>../src/system_config/bk-audio-dk/system_definitions.h</itemPath>
<itemPath>../src/system_config/bk-audio-dk/system_config.h</itemPath>
<logicalFolder name="f1" displayName="bt_audio_dk" projectFiles="true">
<itemPath>../src/system_config/bt_audio_dk/system_definitions.h</itemPath>
<itemPath>../src/system_config/bt_audio_dk/system_config.h</itemPath>
</logicalFolder>
</logicalFolder>
<itemPath>../../../src/btstack_debug.h</itemPath>
@ -35,6 +35,7 @@
<itemPath>../../../src/classic/sdp_server.h</itemPath>
<itemPath>../../../src/classic/sdp_client.h</itemPath>
<itemPath>../../../src/classic/sdp_client_rfcomm.h</itemPath>
<itemPath>../../../src/classic/spp_server.h</itemPath>
</logicalFolder>
<logicalFolder name="embedded" displayName="embedded" projectFiles="true">
<itemPath>../../../platform/embedded/hal_cpu.h</itemPath>
@ -57,6 +58,7 @@
<itemPath>../../../src/hci_transport.h</itemPath>
<itemPath>../../../src/l2cap.h</itemPath>
<itemPath>../../../src/l2cap_signaling.h</itemPath>
<itemPath>../../../src/btstack_uart_block.h</itemPath>
</logicalFolder>
</logicalFolder>
<logicalFolder name="f2" displayName="framework" projectFiles="true">
@ -93,9 +95,9 @@
projectFiles="true">
<logicalFolder name="f1" displayName="app" projectFiles="true">
<logicalFolder name="f1" displayName="system_config" projectFiles="true">
<logicalFolder name="f1" displayName="bt-audio-dk" projectFiles="true">
<itemPath>../src/system_config/bk-audio-dk/system_init.c</itemPath>
<itemPath>../src/system_config/bk-audio-dk/system_tasks.c</itemPath>
<logicalFolder name="f1" displayName="bt_audio_dk" projectFiles="true">
<itemPath>../src/system_config/bt_audio_dk/system_init.c</itemPath>
<itemPath>../src/system_config/bt_audio_dk/system_tasks.c</itemPath>
</logicalFolder>
</logicalFolder>
<itemPath>../src/btstack_port.c</itemPath>
@ -116,6 +118,10 @@
<logicalFolder name="chipset-csr" displayName="chipset-csr" projectFiles="true">
<itemPath>../../../chipset/csr/btstack_chipset_csr.c</itemPath>
</logicalFolder>
<logicalFolder name="f1" displayName="platform-embedded" projectFiles="true">
<itemPath>../../../platform/embedded/btstack_run_loop_embedded.c</itemPath>
<itemPath>../../../platform/embedded/btstack_uart_block_embedded.c</itemPath>
</logicalFolder>
<logicalFolder name="src" displayName="src" projectFiles="true">
<itemPath>../../../src/btstack_memory.c</itemPath>
<itemPath>../../../src/hci.c</itemPath>
@ -133,8 +139,10 @@
<itemPath>../../../src/classic/sdp_client_rfcomm.c</itemPath>
<itemPath>../../../src/classic/sdp_util.c</itemPath>
<itemPath>../../../src/btstack_util.c</itemPath>
<itemPath>../../../platform/embedded/btstack_run_loop_embedded.c</itemPath>
<itemPath>../../../platform/embedded/hci_transport_h4_embedded.c</itemPath>
<itemPath>../../../src/classic/spp_server.c</itemPath>
<itemPath>../../../src/hci_transport_h4.c</itemPath>
<itemPath>../../../src/hci_transport_h5.c</itemPath>
<itemPath>../../../src/btstack_slip.c</itemPath>
</logicalFolder>
</logicalFolder>
<logicalFolder name="f2" displayName="framework" projectFiles="true">
@ -201,7 +209,7 @@
<targetPluginBoard></targetPluginBoard>
<platformTool>PICkit3PlatformTool</platformTool>
<languageToolchain>XC32</languageToolchain>
<languageToolchainVersion></languageToolchainVersion>
<languageToolchainVersion>1.40</languageToolchainVersion>
<platform>4</platform>
</toolsSet>
<compileType>
@ -235,7 +243,7 @@
<property key="enable-unroll-loops" value="false"/>
<property key="exclude-floating-point" value="false"/>
<property key="extra-include-directories"
value=".;../../../..;../src;../src/system_config/bk-audio-dk;../../../include;../../../src;../../../ble;../../../chipset/csr;../../../platform/embedded"/>
value=".;../../../..;../src;../src/system_config/bt_audio_dk;../../../src;../../../chipset/csr;../../../platform/embedded"/>
<property key="generate-16-bit-code" value="false"/>
<property key="generate-micro-compressed-code" value="false"/>
<property key="isolate-each-function" value="false"/>
@ -288,7 +296,7 @@
<property key="generate-16-bit-code" value="false"/>
<property key="generate-cross-reference-file" value="false"/>
<property key="generate-micro-compressed-code" value="false"/>
<property key="heap-size" value=""/>
<property key="heap-size" value="16"/>
<property key="input-libraries" value=""/>
<property key="linker-symbols" value=""/>
<property key="map-file" value="${DISTDIR}/${PROJECTNAME}.${IMAGE_TYPE}.map"/>

View File

@ -5,7 +5,7 @@
<confs>
<conf name="default" type="2">
<platformToolSN></platformToolSN>
<languageToolchainDir></languageToolchainDir>
<languageToolchainDir>/Applications/microchip/xc32/v1.40/bin</languageToolchainDir>
<mdbdebugger version="1">
<placeholder1>place holder 1</placeholder1>
<placeholder2>place holder 2</placeholder2>

View File

@ -1,6 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<project-private xmlns="http://www.netbeans.org/ns/project-private/1">
<editor-bookmarks xmlns="http://www.netbeans.org/ns/editor-bookmarks/1"/>
<editor-bookmarks xmlns="http://www.netbeans.org/ns/editor-bookmarks/2" lastBookmarkId="0"/>
<open-files xmlns="http://www.netbeans.org/ns/projectui-open-files/2">
<group/>
</open-files>

View File

@ -0,0 +1,113 @@
#!/usr/bin/env python
#
# Create project files for all BTstack embedded examples in harmony/apps/btstack
import os
import shutil
import sys
import time
import subprocess
import re
gatt_update_template = '''#!/bin/sh
DIR=`dirname $0`
BTSTACK_ROOT=$DIR/../../../framework/btstack
echo "Creating EXAMPLE.h from EXAMPLE.gatt"
$BTSTACK_ROOT/tool/compile_gatt.py $BTSTACK_ROOT/example/EXAMPLE.gatt $DIR/EXAMPLE.h
'''
# get script path
script_path = os.path.abspath(os.path.dirname(sys.argv[0]))
# validate Harmony root by reading version.txt
harmony_root = script_path + "/../../../../"
print harmony_root
harmony_version = ""
try:
with open(harmony_root + 'config/harmony.hconfig', 'r') as fin:
for line in fin:
m = re.search('default \"(.*)\"', line)
if m and len(m.groups()) == 1:
harmony_version = m.groups(1)
break
except:
pass
if len(harmony_version) == 0:
print("Cannot find Harmony root. Make sure BTstack is checked out as harmony/vx_xx/frameworks/btstack")
sys.exit(1)
# show Harmony version
print("Found Harmony version %s" % harmony_version)
# path to examples
examples_embedded = script_path + "/../../example/"
# path to WICED/apps/btstack
apps_btstack = harmony_root + "/apps/btstack/"
print("Creating examples in apps/btstack")
# iterate over btstack examples
for file in os.listdir(examples_embedded):
if not file.endswith(".c"):
continue
example = file[:-2]
# recreate folder
apps_folder = apps_btstack + example + "/"
shutil.rmtree(apps_folder)
os.makedirs(apps_folder)
# create update_gatt.sh if .gatt file is present
gatt_path = examples_embedded + example + ".gatt"
if os.path.exists(gatt_path):
update_gatt_script = apps_folder + "update_gatt_db.sh"
with open(update_gatt_script, "wt") as fout:
fout.write(gatt_update_template.replace("EXAMPLE", example))
os.chmod(update_gatt_script, 0o755)
subprocess.call(update_gatt_script + "> /dev/null", shell=True)
print("- %s including compiled GATT DB" % example)
else:
print("- %s" % example)
# create $example.X
appX_folder = apps_folder + example + ".X/"
os.makedirs(appX_folder)
# create makefife
shutil.copyfile(script_path + "/app.X/Makefile", appX_folder + "Makefile")
nbproject_folder = appX_folder = appX_folder + "nbproject/"
os.makedirs(nbproject_folder)
template_path = script_path + "/app.X/nbproject/"
for file in os.listdir(template_path):
src = template_path + file
dst = nbproject_folder + file
# copy private folder
if file == "private":
shutil.copytree(src, dst)
continue
# replace app.X and spp_and_le_counter.c
with open(src, 'r') as fin:
template = fin.read()
with open(dst, 'wt') as fout:
# template = template.replace('app', example)
template = template.replace("<itemPath>../../../example/spp_and_le_counter.c", "<itemPath>../../../../framework/btstack/example/" + example + ".c")
template = template.replace(">../../../../driver", ">../../../../framework/driver");
template = template.replace(">../../../../system", ">../../../../framework/system");
template = template.replace(">../../../chipset", ">../../../../framework/btstack/chipset");
template = template.replace(">../../../platform", ">../../../../framework/btstack/platform");
template = template.replace(">../../../src", ">../../../../framework/btstack/src");
template = template.replace(">../src", ">../../../../framework/btstack/port/pic32-harmony/src");
template = template.replace("app.X", example+".X")
template = template.replace(";../../../..", ";../../../../framework");
template = template.replace(";../../../chipset", ";../../../../framework/btstack/chipset")
template = template.replace(";../../../platform", ";../../../../framework/btstack/platform")
template = template.replace(";../../../src", ";../../../../framework/btstack/src")
template = template.replace(";../src", ";../../../../framework/btstack/port/pic32-harmony/src")
template = template.replace(">../../../../../bin/framework/peripheral", ">../../../../bin/framework/peripheral")
template = template.replace('value=".;', 'value="..;')
fout.write(template)

View File

@ -123,10 +123,10 @@ static uint8_t * tx_buffer_ptr = 0;
// reset Bluetooth using n_shutdown
static void bluetooth_power_cycle(void){
printf("Bluetooth power cycle Reset ON\n");
printf("Bluetooth power cycle: Reset ON\n");
SYS_PORTS_PinClear(PORTS_ID_0, BT_RESET_PORT, BT_RESET_BIT);
msleep(250);
printf("Bluetooth power cycle Reset OFF\n");
printf("Bluetooth power cycle: Reset OFF\n");
SYS_PORTS_PinSet(PORTS_ID_0, BT_RESET_PORT, BT_RESET_BIT);
}
@ -148,36 +148,30 @@ void hal_uart_dma_init(void){
PLIB_USART_HandshakeModeSelect(BT_USART_ID, USART_HANDSHAKE_MODE_FLOW_CONTROL);
PLIB_USART_OperationModeSelect(BT_USART_ID, USART_ENABLE_TX_RX_CTS_RTS_USED);
PLIB_USART_LineControlModeSelect(BT_USART_ID, USART_8N1);
PLIB_USART_TransmitterEnable(BT_USART_ID);
// PLIB_USART_TransmitterInterruptModeSelect(bluetooth_uart_id, USART_TRANSMIT_FIFO_IDLE);
PLIB_USART_ReceiverEnable(BT_USART_ID);
// PLIB_USART_ReceiverInterruptModeSelect(bluetooth_uart_id, USART_RECEIVE_FIFO_ONE_CHAR);
// BCSP on CSR requires even parity
// PLIB_USART_LineControlModeSelect(BT_USART_ID, USART_8E1);
PLIB_USART_TransmitterEnable(BT_USART_ID);
// PLIB_USART_TransmitterInterruptModeSelect(bluetooth_uart_id, USART_TRANSMIT_FIFO_IDLE);
// allow overrun mode: not needed for H4. CSR with BCSP/H5 does not enable RTS/CTS
PLIB_USART_RunInOverflowEnable(BT_USART_ID);
PLIB_USART_ReceiverEnable(BT_USART_ID);
// PLIB_USART_ReceiverInterruptModeSelect(bluetooth_uart_id, USART_RECEIVE_FIFO_ONE_CHAR);
PLIB_USART_Enable(BT_USART_ID);
// enable _RESET
SYS_PORTS_PinDirectionSelect(PORTS_ID_0, SYS_PORTS_DIRECTION_OUTPUT, BT_RESET_PORT, BT_RESET_BIT);
SYS_PORTS_PinDirectionSelect(PORTS_ID_0, SYS_PORTS_DIRECTION_OUTPUT, BT_RESET_PORT, BT_RESET_BIT);
bluetooth_power_cycle();
// After reset, CTS is high and we need to wait until CTS is low again
// HACK: CTS doesn't seem to work right now
msleep(250);
// HACK: CSR seems to do an auto-baud on the uart, which makes the first HCI RESET fail
// 2 options: a) check for CTS going high within 10 ms, b) just send HCI RESET twice
// const uint8_t hci_reset_cmd[] = {0x01, 0x03, 0x0c, 0x00};
// int pos = 0;
// while(pos < sizeof(hci_reset_cmd)){
// if (PLIB_USART_TransmitterIsEmpty(BT_USART_ID)){
// PLIB_USART_TransmitterByteSend(BT_USART_ID, hci_reset_cmd[pos]);
// pos++;
// }
// }
// msleep(250);
}
void hal_uart_dma_set_block_received( void (*the_block_handler)(void)){
@ -193,9 +187,9 @@ void hal_uart_dma_set_csr_irq_handler( void (*the_irq_handler)(void)){
}
int hal_uart_dma_set_baud(uint32_t baud){
PLIB_USART_Disable(BT_USART_ID);
PLIB_USART_BaudRateSet(BT_USART_ID, SYS_CLK_PeripheralFrequencyGet(CLK_BUS_PERIPHERAL_1), baud);
PLIB_USART_Enable(BT_USART_ID);
// PLIB_USART_Disable(BT_USART_ID);
// PLIB_USART_BaudRateSet(BT_USART_ID, SYS_CLK_PeripheralFrequencyGet(CLK_BUS_PERIPHERAL_1), baud);
// PLIB_USART_Enable(BT_USART_ID);
return 0;
}
@ -237,7 +231,7 @@ void BTSTACK_Initialize ( void )
hci_dump_open(NULL, HCI_DUMP_STDOUT);
const hci_transport_t * transport = hci_transport_h4_instance(btstack_uart_block_embedded_instance);
const hci_transport_t * transport = hci_transport_h5_instance(btstack_uart_block_embedded_instance());
hci_init(transport, &config);
hci_set_chipset(btstack_chipset_csr_instance());
@ -250,15 +244,22 @@ void BTSTACK_Initialize ( void )
void BTSTACK_Tasks(void){
if (bytes_to_read && PLIB_USART_ReceiverDataIsAvailable(BT_USART_ID)) {
while (bytes_to_read && PLIB_USART_ReceiverDataIsAvailable(BT_USART_ID)) {
*rx_buffer_ptr++ = PLIB_USART_ReceiverByteReceive(BT_USART_ID);
bytes_to_read--;
if (bytes_to_read == 0){
(*rx_done_handler)();
}
}
if (bytes_to_write && PLIB_USART_TransmitterIsEmpty(BT_USART_ID)){
if(PLIB_USART_ReceiverOverrunHasOccurred(BT_USART_ID))
{
// printf("RX Overrun!\n");
PLIB_USART_ReceiverOverrunErrorClear(BT_USART_ID);
}
while (bytes_to_write && !PLIB_USART_TransmitterBufferIsFull(BT_USART_ID)){
PLIB_USART_TransmitterByteSend(BT_USART_ID, *tx_buffer_ptr++);
bytes_to_write--;
if (bytes_to_write == 0){

View File

@ -2,7 +2,6 @@
BTSTACK_ROOT = ../..
CORE += \
bluetooth_init_cc2564B_1.2_BT_Spec_4.1.c \
btstack_chipset_cc256x.c \
btstack_chipset_csr.c \
btstack_chipset_em9301.c \
@ -14,6 +13,8 @@ CORE += \
hci_transport_h4.c \
main.c \
stdin_support.c \
bluetooth_init_cc2564B_1.4_BT_Spec_4.1.c \
# bluetooth_init_cc2564_2.14.c \
# btstack_chipset_bcm.c \
# TI-WL183x requires TIInit_11.8.32.c
@ -53,4 +54,11 @@ ifneq ($(OS),Windows_NT)
EXAMPLES += ${EXAMPLES_CLI}
endif
# use pkg-config for portaudio
# CFLAGS += $(shell pkg-config portaudio-2.0 --cflags) -DHAVE_PORTAUDIO
# LDFLAGS += $(shell pkg-config portaudio-2.0 --libs)
# hard coded flags for portaudio in /usr/local/lib
# CFLAGS += -I/usr/local/include -DHAVE_PORTAUDIO
# LDFLAGS += -L/sw/lib -lportaudio -Wl,-framework,CoreAudio -Wl,-framework,AudioToolbox -Wl,-framework,AudioUnit -Wl,-framework,Carbon
all: ${EXAMPLES}

View File

@ -19,6 +19,7 @@
#define ENABLE_LOG_INTO_HCI_DUMP
#define ENABLE_SCO_OVER_HCI
#define ENABLE_SDP_DES_DUMP
// #define ENABLE_EHCILL
// BTstack configuration. buffers, sizes, ...
#define HCI_INCOMING_PRE_BUFFER_SIZE 14 // sizeof benep heade, avoid memcpy

View File

@ -139,6 +139,9 @@ static void local_version_information_callback(uint8_t * packet){
printf("Texas Instruments - CC256x compatible chipset.\n");
use_fast_uart();
hci_set_chipset(btstack_chipset_cc256x_instance());
#ifdef ENABLE_EHCILL
printf("eHCILL enabled.\n");
#endif
break;
case COMPANY_ID_BROADCOM_CORPORATION:
printf("Broadcom chipset. Not supported yet\n");

View File

@ -2,7 +2,7 @@
BTSTACK_ROOT = ../..
CORE += \
bluetooth_init_cc2564B_1.2_BT_Spec_4.1.c \
bluetooth_init_cc2564B_1.4_BT_Spec_4.1.c \
btstack_chipset_cc256x.c \
btstack_chipset_csr.c \
btstack_chipset_em9301.c \
@ -54,4 +54,11 @@ ifneq ($(OS),Windows_NT)
EXAMPLES += ${EXAMPLES_CLI}
endif
# use pkg-config for portaudio
# CFLAGS += $(shell pkg-config portaudio-2.0 --cflags) -DHAVE_PORTAUDIO
# LDFLAGS += $(shell pkg-config portaudio-2.0 --libs)
# hard coded flags for portaudio in /usr/local/lib
# CFLAGS += -I/usr/local/include -DHAVE_PORTAUDIO
# LDFLAGS += -L/sw/lib -lportaudio -Wl,-framework,CoreAudio -Wl,-framework,AudioToolbox -Wl,-framework,AudioUnit -Wl,-framework,Carbon
all: ${EXAMPLES}

View File

@ -170,7 +170,10 @@ int main(int argc, const char * argv[]){
const btstack_link_key_db_t * link_key_db = btstack_link_key_db_fs_instance();
hci_init(transport, (void*) &config);
hci_set_link_key_db(link_key_db);
// enable auto-sleep mode
// hci_transport_h5_set_auto_sleep(300);
// setup dynamic chipset driver setup
hci_set_local_version_information_callback(&local_version_information_callback);

View File

@ -24,7 +24,7 @@ CORE = \
btstack_run_loop_embedded.c \
COMMON = \
bluetooth_init_cc2564B_1.2_BT_Spec_4.1.c \
bluetooth_init_cc2564B_1.4_BT_Spec_4.1.c \
btstack_chipset_cc256x.c \
btstack_link_key_db_memory.c \
rfcomm.c \

View File

@ -8,13 +8,13 @@
// Port related features
#define HAVE_INIT_SCRIPT
#define HAVE_EMBEDDED_TICK
#define HAVE_EHCILL
// BTstack features that can be enabled
#define ENABLE_BLE
#define ENABLE_CLASSIC
// #define ENABLE_LOG_INFO
// #define ENABLE_LOG_ERROR
// #define ENABLE_EHCILL
// BTstack configuration. buffers, sizes, ...
#define HCI_ACL_PAYLOAD_SIZE 52

View File

@ -442,9 +442,6 @@ int main(void)
hci_event_callback_registration.callback = &packet_handler;
hci_add_event_handler(&hci_event_callback_registration);
// enable eHCILL
btstack_chipset_cc256x_enable_ehcill(1);
// hand over to btstack embedded code
btstack_main();

View File

@ -6,7 +6,6 @@
#define __BTSTACK_CONFIG
// Port related features
#define HAVE_EHCILL
#define HAVE_EMBEDDED_TIME_MS
#define WICED_BT_UART_MANUAL_CTS_RTS

View File

@ -61,13 +61,13 @@ typedef enum {
CompleteList128 = 0x07
} UUID_TYPE;
void ad_iterator_init(ad_context_t *context, uint8_t ad_len, uint8_t * ad_data){
void ad_iterator_init(ad_context_t *context, uint8_t ad_len, const uint8_t * ad_data){
context->data = ad_data;
context->length = ad_len;
context->offset = 0;
}
int ad_iterator_has_more(ad_context_t * context){
int ad_iterator_has_more(const ad_context_t * context){
return context->offset < context->length;
}
@ -81,24 +81,24 @@ void ad_iterator_next(ad_context_t * context){
context->offset = new_offset;
}
uint8_t ad_iterator_get_data_len(ad_context_t * context){
uint8_t ad_iterator_get_data_len(const ad_context_t * context){
return context->data[context->offset] - 1;
}
uint8_t ad_iterator_get_data_type(ad_context_t * context){
uint8_t ad_iterator_get_data_type(const ad_context_t * context){
return context->data[context->offset + 1];
}
uint8_t * ad_iterator_get_data(ad_context_t * context){
const uint8_t * ad_iterator_get_data(const ad_context_t * context){
return &context->data[context->offset + 2];
}
int ad_data_contains_uuid16(uint8_t ad_len, uint8_t * ad_data, uint16_t uuid16){
int ad_data_contains_uuid16(uint8_t ad_len, const uint8_t * ad_data, uint16_t uuid16){
ad_context_t context;
for (ad_iterator_init(&context, ad_len, ad_data) ; ad_iterator_has_more(&context) ; ad_iterator_next(&context)){
uint8_t data_type = ad_iterator_get_data_type(&context);
uint8_t data_len = ad_iterator_get_data_len(&context);
uint8_t * data = ad_iterator_get_data(&context);
uint8_t data_type = ad_iterator_get_data_type(&context);
uint8_t data_len = ad_iterator_get_data_len(&context);
const uint8_t * data = ad_iterator_get_data(&context);
int i;
uint8_t ad_uuid128[16], uuid128_bt[16];
@ -127,7 +127,7 @@ int ad_data_contains_uuid16(uint8_t ad_len, uint8_t * ad_data, uint16_t uuid16){
return 0;
}
int ad_data_contains_uuid128(uint8_t ad_len, uint8_t * ad_data, uint8_t * uuid128){
int ad_data_contains_uuid128(uint8_t ad_len, const uint8_t * ad_data, const uint8_t * uuid128){
ad_context_t context;
// input in big endian/network order, bluetooth data in little endian
uint8_t uuid128_le[16];
@ -135,7 +135,7 @@ int ad_data_contains_uuid128(uint8_t ad_len, uint8_t * ad_data, uint8_t * uuid12
for (ad_iterator_init(&context, ad_len, ad_data) ; ad_iterator_has_more(&context) ; ad_iterator_next(&context)){
uint8_t data_type = ad_iterator_get_data_type(&context);
uint8_t data_len = ad_iterator_get_data_len(&context);
uint8_t * data = ad_iterator_get_data(&context);
const uint8_t * data = ad_iterator_get_data(&context);
int i;
uint8_t ad_uuid128[16];

View File

@ -53,24 +53,24 @@ extern "C" {
/* API_START */
typedef struct ad_context {
uint8_t * data;
const uint8_t * data;
uint8_t offset;
uint8_t length;
} ad_context_t;
// Advertising or Scan Response data iterator
void ad_iterator_init(ad_context_t *context, uint8_t ad_len, uint8_t * ad_data);
int ad_iterator_has_more(ad_context_t * context);
void ad_iterator_init(ad_context_t *context, uint8_t ad_len, const uint8_t * ad_data);
int ad_iterator_has_more(const ad_context_t * context);
void ad_iterator_next(ad_context_t * context);
// Access functions
uint8_t ad_iterator_get_data_type(ad_context_t * context);
uint8_t ad_iterator_get_data_len(ad_context_t * context);
uint8_t * ad_iterator_get_data(ad_context_t * context);
uint8_t ad_iterator_get_data_type(const ad_context_t * context);
uint8_t ad_iterator_get_data_len(const ad_context_t * context);
const uint8_t * ad_iterator_get_data(const ad_context_t * context);
// convenience function on complete advertisements
int ad_data_contains_uuid16(uint8_t ad_len, uint8_t * ad_data, uint16_t uuid);
int ad_data_contains_uuid128(uint8_t ad_len, uint8_t * ad_data, uint8_t * uuid128);
int ad_data_contains_uuid16(uint8_t ad_len, const uint8_t * ad_data, uint16_t uuid);
int ad_data_contains_uuid128(uint8_t ad_len, const uint8_t * ad_data, const uint8_t * uuid128);
/* API_END */

View File

@ -904,9 +904,10 @@ typedef uint8_t sm_key_t[16];
#define HFP_SUBEVENT_SERVICE_LEVEL_CONNECTION_RELEASED 0x02
/**
* @format 11
* @format 11H
* @param subevent_code
* @param status 0 == OK
* @param handle
*/
#define HFP_SUBEVENT_AUDIO_CONNECTION_ESTABLISHED 0x03

View File

@ -2660,6 +2660,15 @@ static inline hci_con_handle_t hfp_subevent_service_level_connection_established
static inline uint8_t hfp_subevent_audio_connection_established_get_status(const uint8_t * event){
return event[3];
}
/**
* @brief Get field handle from event HFP_SUBEVENT_AUDIO_CONNECTION_ESTABLISHED
* @param event packet
* @return handle
* @note: btstack_type H
*/
static inline hci_con_handle_t hfp_subevent_audio_connection_established_get_handle(const uint8_t * event){
return little_endian_read_16(event, 4);
}
/**

View File

@ -64,8 +64,8 @@ typedef enum {
} btstack_uart_sleep_mode_t;
typedef enum {
BTSTACK_UART_SLEEP_MASK_HIGH_WAKE_ON_CTS_PULSE = 1 << BTSTACK_UART_SLEEP_RTS_HIGH_WAKE_ON_CTS_PULSE,
BTSTACK_UART_SLEEP_MASK_RTS_LOW_WAKE_ON_RX_EDGE = 1 << BTSTACK_UART_SLEEP_RTS_LOW_WAKE_ON_RX_EDGE
BTSTACK_UART_SLEEP_MASK_RTS_HIGH_WAKE_ON_CTS_PULSE = 1 << BTSTACK_UART_SLEEP_RTS_HIGH_WAKE_ON_CTS_PULSE,
BTSTACK_UART_SLEEP_MASK_RTS_LOW_WAKE_ON_RX_EDGE = 1 << BTSTACK_UART_SLEEP_RTS_LOW_WAKE_ON_RX_EDGE
} btstack_uart_sleep_mode_mask_t;
typedef struct {
@ -121,7 +121,7 @@ typedef struct {
* query supported wakeup mechanisms
* @return supported_sleep_modes mask
*/
int (*get_supported_sleep_modes);
int (*get_supported_sleep_modes)(void);
/**
* set UART sleep mode - allows to turn off UART and it's clocks to save energy

View File

@ -54,7 +54,7 @@
* @brief Compare two Bluetooth addresses
* @param a
* @param b
* @return true if equal
* @return 0 if equal
*/
int bd_addr_cmp(bd_addr_t a, bd_addr_t b){
return memcmp(a,b, BD_ADDR_LEN);
@ -137,6 +137,14 @@ void reverse_bd_addr(const bd_addr_t src, bd_addr_t dest){
reverse_bytes(src, dest, 6);
}
uint32_t btstack_min(uint32_t a, uint32_t b){
return a < b ? a : b;
}
uint32_t btstack_max(uint32_t a, uint32_t b){
return a > b ? a : b;
}
char char_for_nibble(int nibble){
if (nibble < 10) return '0' + nibble;
nibble -= 10;
@ -146,8 +154,8 @@ char char_for_nibble(int nibble){
int nibble_for_char(char c){
if (c >= '0' && c <= '9') return c - '0';
if (c >= 'a' && c <= 'f') return c - 'a';
if (c >= 'A' && c <= 'F') return c - 'F';
if (c >= 'a' && c <= 'f') return c - 'a' + 10;
if (c >= 'A' && c <= 'F') return c - 'A' + 10;
return -1;
}
@ -253,7 +261,7 @@ int sscanf_bd_addr(const char * addr_string, bd_addr_t addr){
int single_byte = scan_hex_byte(addr_string);
if (single_byte < 0) break;
addr_string += 2;
addr[i] = single_byte;
buffer[i] = single_byte;
// don't check seperator after last byte
if (i == BD_ADDR_LEN - 1) {
result = 1;

View File

@ -72,6 +72,22 @@ extern "C" {
typedef uint8_t device_name_t[DEVICE_NAME_LEN+1];
/**
* @brief Minimum function for uint32_t
* @param a
* @param b
* @return value
*/
uint32_t btstack_min(uint32_t a, uint32_t b);
/**
* @brief Maximum function for uint32_t
* @param a
* @param b
* @return value
*/
uint32_t btstack_max(uint32_t a, uint32_t b);
/**
* @brief Read 16/24/32 bit little endian value from buffer

View File

@ -1090,7 +1090,7 @@ static int bnep_handle_ethernet_packet(bnep_channel_t *channel, bd_addr_t addr_d
#endif
/* Notify application layer and deliver the ethernet packet */
(*app_packet_handler)(BNEP_DATA_PACKET, channel->uuid_source,
(*app_packet_handler)(BNEP_DATA_PACKET, channel->l2cap_cid,
ethernet_packet, size + sizeof(uint16_t) + 2 * sizeof(bd_addr_t));
return size;

View File

@ -96,10 +96,12 @@ static const char * hfp_ag_features[] = {
static btstack_linked_list_t hfp_connections = NULL;
static void parse_sequence(hfp_connection_t * context);
static hfp_callback_t hfp_callback;
static btstack_packet_handler_t hfp_callback;
static btstack_packet_handler_t rfcomm_packet_handler;
void hfp_set_callback(hfp_callback_t callback){
static hfp_connection_t * sco_establishment_active;
void hfp_set_callback(btstack_packet_handler_t callback){
hfp_callback = callback;
}
@ -184,26 +186,26 @@ int join_bitmap(char * buffer, int buffer_size, uint32_t values, int values_nr){
return offset;
}
void hfp_emit_simple_event(hfp_callback_t callback, uint8_t event_subtype){
void hfp_emit_simple_event(btstack_packet_handler_t callback, uint8_t event_subtype){
if (!callback) return;
uint8_t event[3];
event[0] = HCI_EVENT_HFP_META;
event[1] = sizeof(event) - 2;
event[2] = event_subtype;
(*callback)(event, sizeof(event));
(*callback)(HCI_EVENT_PACKET, 0, event, sizeof(event));
}
void hfp_emit_event(hfp_callback_t callback, uint8_t event_subtype, uint8_t value){
void hfp_emit_event(btstack_packet_handler_t callback, uint8_t event_subtype, uint8_t value){
if (!callback) return;
uint8_t event[4];
event[0] = HCI_EVENT_HFP_META;
event[1] = sizeof(event) - 2;
event[2] = event_subtype;
event[3] = value; // status 0 == OK
(*callback)(event, sizeof(event));
(*callback)(HCI_EVENT_PACKET, 0, event, sizeof(event));
}
void hfp_emit_connection_event(hfp_callback_t callback, uint8_t event_subtype, uint8_t status, hci_con_handle_t con_handle){
void hfp_emit_connection_event(btstack_packet_handler_t callback, uint8_t event_subtype, uint8_t status, hci_con_handle_t con_handle){
if (!callback) return;
uint8_t event[6];
event[0] = HCI_EVENT_HFP_META;
@ -211,10 +213,10 @@ void hfp_emit_connection_event(hfp_callback_t callback, uint8_t event_subtype, u
event[2] = event_subtype;
event[3] = status; // status 0 == OK
little_endian_store_16(event, 4, con_handle);
(*callback)(event, sizeof(event));
(*callback)(HCI_EVENT_PACKET, 0, event, sizeof(event));
}
void hfp_emit_string_event(hfp_callback_t callback, uint8_t event_subtype, const char * value){
void hfp_emit_string_event(btstack_packet_handler_t callback, uint8_t event_subtype, const char * value){
if (!callback) return;
uint8_t event[40];
event[0] = HCI_EVENT_HFP_META;
@ -223,7 +225,7 @@ void hfp_emit_string_event(hfp_callback_t callback, uint8_t event_subtype, const
int size = (strlen(value) < sizeof(event) - 4) ? strlen(value) : sizeof(event) - 4;
strncpy((char*)&event[3], value, size);
event[3 + size] = 0;
(*callback)(event, sizeof(event));
(*callback)(HCI_EVENT_PACKET, 0, event, sizeof(event));
}
btstack_linked_list_t * hfp_get_connections(void){
@ -438,13 +440,48 @@ static void handle_query_rfcomm_event(uint8_t packet_type, uint16_t channel, uin
}
}
static void hfp_handle_failed_sco_connection(uint8_t status){
if (!sco_establishment_active){
log_error("(e)SCO Connection failed but not started by us");
return;
}
log_error("(e)SCO Connection failed status 0x%02x", status);
// invalid params / unspecified error
if (status != 0x11 && status != 0x1f) return;
switch (sco_establishment_active->link_setting){
case HFP_LINK_SETTINGS_D0:
return; // no other option left
case HFP_LINK_SETTINGS_D1:
sco_establishment_active->link_setting = HFP_LINK_SETTINGS_D0;
break;
case HFP_LINK_SETTINGS_S1:
sco_establishment_active->link_setting = HFP_LINK_SETTINGS_D1;
break;
case HFP_LINK_SETTINGS_S2:
case HFP_LINK_SETTINGS_S3:
case HFP_LINK_SETTINGS_S4:
sco_establishment_active->link_setting = HFP_LINK_SETTINGS_S1;
break;
case HFP_LINK_SETTINGS_T1:
case HFP_LINK_SETTINGS_T2:
sco_establishment_active->link_setting = HFP_LINK_SETTINGS_S3;
break;
}
sco_establishment_active->establish_audio_connection = 1;
sco_establishment_active = 0;
}
void hfp_handle_hci_event(uint8_t packet_type, uint16_t channel, uint8_t *packet, uint16_t size){
bd_addr_t event_addr;
uint16_t rfcomm_cid, handle;
hfp_connection_t * hfp_connection = NULL;
uint8_t status;
// printf("AG packet_handler type %u, event type %x, size %u\n", packet_type, hci_event_packet_get_type(packet), size);
log_info("AG packet_handler type %u, event type %x, size %u", packet_type, hci_event_packet_get_type(packet), size);
switch (hci_event_packet_get_type(packet)) {
@ -490,9 +527,19 @@ void hfp_handle_hci_event(uint8_t packet_type, uint16_t channel, uint8_t *packet
default:
break;
}
rfcomm_request_can_send_now_event(hfp_connection->rfcomm_cid);
}
break;
case HCI_EVENT_COMMAND_STATUS:
if (hci_event_command_status_get_command_opcode(packet) == hci_setup_synchronous_connection.opcode) {
status = hci_event_command_status_get_status(packet);
if (status) {
hfp_handle_failed_sco_connection(hci_event_command_status_get_status(packet));
}
}
break;
case HCI_EVENT_SYNCHRONOUS_CONNECTION_COMPLETE:{
reverse_bd_addr(&packet[5], event_addr);
@ -500,32 +547,7 @@ void hfp_handle_hci_event(uint8_t packet_type, uint16_t channel, uint8_t *packet
status = packet[index++];
if (status != 0){
log_error("(e)SCO Connection failed status %u", status);
// if outgoing && link_setting != d0 && appropriate error
if (status != 0x11 && status != 0x1f) break; // invalid params / unspecified error
hfp_connection = get_hfp_connection_context_for_bd_addr(event_addr);
if (!hfp_connection) break;
switch (hfp_connection->link_setting){
case HFP_LINK_SETTINGS_D0:
return; // no other option left
case HFP_LINK_SETTINGS_D1:
// hfp_connection->link_setting = HFP_LINK_SETTINGS_D0;
// break;
case HFP_LINK_SETTINGS_S1:
// hfp_connection->link_setting = HFP_LINK_SETTINGS_D1;
// break;
case HFP_LINK_SETTINGS_S2:
case HFP_LINK_SETTINGS_S3:
case HFP_LINK_SETTINGS_S4:
// hfp_connection->link_setting = HFP_LINK_SETTINGS_S1;
// break;
case HFP_LINK_SETTINGS_T1:
case HFP_LINK_SETTINGS_T2:
// hfp_connection->link_setting = HFP_LINK_SETTINGS_S3;
hfp_connection->link_setting = HFP_LINK_SETTINGS_D0;
break;
}
hfp_connection->establish_audio_connection = 1;
hfp_handle_failed_sco_connection(status);
break;
}
@ -1331,10 +1353,12 @@ static const struct link_settings {
{ 0x000d, 0x02, 0x0380 } // HFP_LINK_SETTINGS_T2, 2-EV3
};
void hfp_setup_synchronous_connection(hci_con_handle_t handle, hfp_link_setttings_t setting){
void hfp_setup_synchronous_connection(hfp_connection_t * hfp_connection){
// all packet types, fixed bandwidth
int setting = hfp_connection->link_setting;
log_info("hfp_setup_synchronous_connection using setting nr %u", setting);
hci_send_cmd(&hci_setup_synchronous_connection, handle, 8000, 8000, hfp_link_settings[setting].max_latency,
sco_establishment_active = hfp_connection;
hci_send_cmd(&hci_setup_synchronous_connection, hfp_connection->acl_handle, 8000, 8000, hfp_link_settings[setting].max_latency,
hci_get_sco_voice_setting(), hfp_link_settings[setting].retransmission_effort, hfp_link_settings[setting].packet_types); // all types 0x003f, only 2-ev3 0x380
}

View File

@ -432,8 +432,6 @@ typedef enum{
HFP_CALL_SM
} hfp_state_machine_t;
typedef void (*hfp_callback_t)(uint8_t * event, uint16_t event_size);
typedef struct{
uint16_t uuid;
uint8_t state; // enabled
@ -621,16 +619,16 @@ int get_bit(uint16_t bitmap, int position);
int store_bit(uint32_t bitmap, int position, uint8_t value);
// UTILS_END
void hfp_set_callback(hfp_callback_t callback);
void hfp_set_callback(btstack_packet_handler_t callback);
void hfp_set_packet_handler_for_rfcomm_connections(btstack_packet_handler_t handler);
void hfp_create_sdp_record(uint8_t * service, uint32_t service_record_handle, uint16_t service_uuid, int rfcomm_channel_nr, const char * name);
void hfp_handle_hci_event(uint8_t packet_type, uint16_t channel, uint8_t *packet, uint16_t size);
void hfp_emit_event(hfp_callback_t callback, uint8_t event_subtype, uint8_t value);
void hfp_emit_simple_event(hfp_callback_t callback, uint8_t event_subtype);
void hfp_emit_string_event(hfp_callback_t callback, uint8_t event_subtype, const char * value);
void hfp_emit_connection_event(hfp_callback_t callback, uint8_t event_subtype, uint8_t status, hci_con_handle_t con_handle);
void hfp_emit_event(btstack_packet_handler_t callback, uint8_t event_subtype, uint8_t value);
void hfp_emit_simple_event(btstack_packet_handler_t callback, uint8_t event_subtype);
void hfp_emit_string_event(btstack_packet_handler_t callback, uint8_t event_subtype, const char * value);
void hfp_emit_connection_event(btstack_packet_handler_t callback, uint8_t event_subtype, uint8_t status, hci_con_handle_t con_handle);
hfp_connection_t * get_hfp_connection_context_for_rfcomm_cid(uint16_t cid);
hfp_connection_t * get_hfp_connection_context_for_bd_addr(bd_addr_t bd_addr);
@ -645,7 +643,7 @@ void hfp_reset_context_flags(hfp_connection_t * connection);
void hfp_release_audio_connection(hfp_connection_t * connection);
void hfp_setup_synchronous_connection(hci_con_handle_t handle, hfp_link_setttings_t link_settings);
void hfp_setup_synchronous_connection(hfp_connection_t * connection);
const char * hfp_hf_feature(int index);
const char * hfp_ag_feature(int index);

View File

@ -95,7 +95,7 @@ static hfp_generic_status_indicator_t hfp_generic_status_indicators[HFP_MAX_NUM_
static int hfp_ag_call_hold_services_nr = 0;
static char *hfp_ag_call_hold_services[6];
static hfp_callback_t hfp_callback;
static btstack_packet_handler_t hfp_callback;
static hfp_response_and_hold_state_t hfp_ag_response_and_hold_state;
static int hfp_ag_response_and_hold_active = 0;
@ -149,7 +149,7 @@ static int get_ag_indicator_index_for_name(const char * name){
}
void hfp_ag_register_packet_handler(hfp_callback_t callback){
void hfp_ag_register_packet_handler(btstack_packet_handler_t callback){
if (callback == NULL){
log_error("hfp_ag_register_packet_handler called with NULL callback");
return;
@ -557,7 +557,6 @@ static int codecs_exchange_state_machine(hfp_connection_t * hfp_connection){
switch (hfp_connection->command){
case HFP_CMD_AVAILABLE_CODECS:
//printf("HFP_CODECS_RECEIVED_LIST \n");
if (hfp_connection->state < HFP_SERVICE_LEVEL_CONNECTION_ESTABLISHED){
hfp_connection->codecs_state = HFP_CODECS_RECEIVED_LIST;
hfp_ag_ok(hfp_connection->rfcomm_cid);
@ -576,20 +575,17 @@ static int codecs_exchange_state_machine(hfp_connection_t * hfp_connection){
return 1;
case HFP_CMD_TRIGGER_CODEC_CONNECTION_SETUP:
//printf(" HFP_CMD_TRIGGER_CODEC_CONNECTION_SETUP \n");
hfp_connection->codecs_state = HFP_CODECS_RECEIVED_TRIGGER_CODEC_EXCHANGE;
hfp_ag_ok(hfp_connection->rfcomm_cid);
return 1;
case HFP_CMD_AG_SEND_COMMON_CODEC:
//printf(" HFP_CMD_AG_SEND_COMMON_CODEC \n");
hfp_connection->codecs_state = HFP_CODECS_AG_SENT_COMMON_CODEC;
hfp_connection->suggested_codec = hfp_ag_suggest_codec(hfp_connection);
hfp_ag_cmd_suggest_codec(hfp_connection->rfcomm_cid, hfp_connection->suggested_codec);
return 1;
case HFP_CMD_HF_CONFIRMED_CODEC:
//printf("HFP_CMD_HF_CONFIRMED_CODEC \n");
if (hfp_connection->codec_confirmed != hfp_connection->suggested_codec){
hfp_connection->codecs_state = HFP_CODECS_ERROR;
hfp_ag_error(hfp_connection->rfcomm_cid);
@ -636,9 +632,9 @@ static void hfp_ag_slc_established(hfp_connection_t * hfp_connection){
}
static int hfp_ag_run_for_context_service_level_connection(hfp_connection_t * hfp_connection){
log_info("hfp_ag_run_for_context_service_level_connection state %u, command %u", hfp_connection->state, hfp_connection->command);
if (hfp_connection->state >= HFP_SERVICE_LEVEL_CONNECTION_ESTABLISHED) return 0;
int done = 0;
// printf(" -> State machine: SLC\n");
switch(hfp_connection->command){
case HFP_CMD_SUPPORTED_FEATURES:
switch(hfp_connection->state){
@ -665,18 +661,9 @@ static int hfp_ag_run_for_context_service_level_connection(hfp_connection_t * hf
case HFP_CMD_RETRIEVE_AG_INDICATORS:
if (hfp_connection->state == HFP_W4_RETRIEVE_INDICATORS) {
hfp_connection->command = HFP_CMD_NONE; // prevent reentrance
int next_segment = hfp_ag_retrieve_indicators_cmd_via_generator(hfp_connection->rfcomm_cid, hfp_connection, hfp_connection->send_ag_indicators_segment);
if (next_segment < hfp_ag_indicators_cmd_generator_num_segments(hfp_connection)){
// prepare sending of next segment
hfp_connection->send_ag_indicators_segment = next_segment;
hfp_connection->command = HFP_CMD_RETRIEVE_AG_INDICATORS;
} else {
// done, go to next state
hfp_connection->send_ag_indicators_segment = 0;
hfp_connection->state = HFP_W4_RETRIEVE_INDICATORS_STATUS;
}
return 1;
// HF requested AG Indicators and we did expect it
hfp_connection->state = HFP_RETRIEVE_INDICATORS;
// continue below in state switch
}
break;
@ -729,16 +716,35 @@ static int hfp_ag_run_for_context_service_level_connection(hfp_connection_t * hf
default:
break;
}
switch (hfp_connection->state){
case HFP_RETRIEVE_INDICATORS: {
int next_segment = hfp_ag_retrieve_indicators_cmd_via_generator(hfp_connection->rfcomm_cid, hfp_connection, hfp_connection->send_ag_indicators_segment);
int num_segments = hfp_ag_indicators_cmd_generator_num_segments(hfp_connection);
log_info("HFP_CMD_RETRIEVE_AG_INDICATORS next segment %u, num_segments %u", next_segment, num_segments);
if (next_segment < num_segments){
// prepare sending of next segment
hfp_connection->send_ag_indicators_segment = next_segment;
log_info("HFP_CMD_RETRIEVE_AG_INDICATORS more. command %u, next seg %u", hfp_connection->command, next_segment);
} else {
// done, go to next state
hfp_connection->send_ag_indicators_segment = 0;
hfp_connection->state = HFP_W4_RETRIEVE_INDICATORS_STATUS;
}
return 1;
}
default:
break;
}
return done;
}
static int hfp_ag_run_for_context_service_level_connection_queries(hfp_connection_t * hfp_connection){
// if (hfp_connection->state != HFP_SERVICE_LEVEL_CONNECTION_ESTABLISHED) return 0;
int done = codecs_exchange_state_machine(hfp_connection);
if (done) return done;
// printf(" -> State machine: SLC Queries\n");
switch(hfp_connection->command){
case HFP_CMD_AG_ACTIVATE_VOICE_RECOGNITION:
hfp_supported_features = store_bit(hfp_supported_features, HFP_AGSF_VOICE_RECOGNITION_FUNCTION, hfp_connection->ag_activate_voice_recognition);
@ -801,13 +807,12 @@ static int hfp_ag_run_for_audio_connection(hfp_connection_t * hfp_connection){
// run codecs exchange
int done = codecs_exchange_state_machine(hfp_connection);
if (done) return done;
// printf(" -> State machine: Audio hfp_connection\n");
if (hfp_connection->codecs_state != HFP_CODECS_EXCHANGED) return done;
if (hfp_connection->establish_audio_connection){
hfp_connection->state = HFP_W4_SCO_CONNECTED;
hfp_connection->establish_audio_connection = 0;
hfp_setup_synchronous_connection(hfp_connection->acl_handle, hfp_connection->link_setting);
hfp_setup_synchronous_connection(hfp_connection);
return 1;
}
return 0;
@ -1610,9 +1615,15 @@ static void hfp_ag_send_call_status(hfp_connection_t * hfp_connection, int call_
}
static void hfp_run_for_context(hfp_connection_t *hfp_connection){
log_info("hfp_run_for_context %p", hfp_connection);
if (!hfp_connection) return;
if (!hfp_connection->rfcomm_cid) return;
if (!rfcomm_can_send_packet_now(hfp_connection->rfcomm_cid)) {
log_info("hfp_run_for_context: request can send for 0x%02x", hfp_connection->rfcomm_cid);
rfcomm_request_can_send_now_event(hfp_connection->rfcomm_cid);
return;
}
@ -1763,6 +1774,10 @@ static void hfp_run_for_context(hfp_connection_t *hfp_connection){
if (done){
hfp_connection->command = HFP_CMD_NONE;
}
//
if (done) {
rfcomm_request_can_send_now_event(hfp_connection->rfcomm_cid);
}
}
static hfp_generic_status_indicator_t *get_hf_indicator_by_number(int number){
@ -2037,8 +2052,6 @@ void hfp_ag_init(uint16_t rfcomm_channel_nr){
hci_event_callback_registration.callback = &packet_handler;
hci_add_event_handler(&hci_event_callback_registration);
l2cap_init();
rfcomm_register_service(&packet_handler, rfcomm_channel_nr, 0xffff);
hfp_ag_response_and_hold_active = 0;

View File

@ -115,7 +115,7 @@ void hfp_ag_init_call_hold_services(int call_hold_services_nr, const char * call
* @brief Register callback for the HFP Audio Gateway (AG) client.
* @param callback
*/
void hfp_ag_register_packet_handler(hfp_callback_t callback);
void hfp_ag_register_packet_handler(btstack_packet_handler_t callback);
/**
* @brief Enable in-band ring tone.

View File

@ -74,7 +74,7 @@ static uint32_t hfp_indicators_value[HFP_MAX_NUM_HF_INDICATORS];
static uint8_t hfp_hf_speaker_gain = 9;
static uint8_t hfp_hf_microphone_gain = 9;
static hfp_callback_t hfp_callback;
static btstack_packet_handler_t hfp_callback;
static hfp_call_status_t hfp_call_status;
static hfp_callsetup_status_t hfp_callsetup_status;
@ -84,7 +84,7 @@ static char phone_number[25];
static btstack_packet_callback_registration_t hci_event_callback_registration;
void hfp_hf_register_packet_handler(hfp_callback_t callback){
void hfp_hf_register_packet_handler(btstack_packet_handler_t callback){
hfp_callback = callback;
if (callback == NULL){
log_error("hfp_hf_register_packet_handler called with NULL callback");
@ -94,7 +94,7 @@ void hfp_hf_register_packet_handler(hfp_callback_t callback){
hfp_set_callback(callback);
}
static void hfp_hf_emit_subscriber_information(hfp_callback_t callback, uint8_t event_subtype, uint8_t status, uint8_t bnip_type, const char * bnip_number){
static void hfp_hf_emit_subscriber_information(btstack_packet_handler_t callback, uint8_t event_subtype, uint8_t status, uint8_t bnip_type, const char * bnip_number){
if (!callback) return;
uint8_t event[31];
event[0] = HCI_EVENT_HFP_META;
@ -105,10 +105,10 @@ static void hfp_hf_emit_subscriber_information(hfp_callback_t callback, uint8_t
int size = (strlen(bnip_number) < sizeof(event) - 6) ? strlen(bnip_number) : sizeof(event) - 6;
strncpy((char*)&event[5], bnip_number, size);
event[5 + size] = 0;
(*callback)(event, sizeof(event));
(*callback)(HCI_EVENT_PACKET, 0, event, sizeof(event));
}
static void hfp_hf_emit_type_and_number(hfp_callback_t callback, uint8_t event_subtype, uint8_t bnip_type, const char * bnip_number){
static void hfp_hf_emit_type_and_number(btstack_packet_handler_t callback, uint8_t event_subtype, uint8_t bnip_type, const char * bnip_number){
if (!callback) return;
uint8_t event[30];
event[0] = HCI_EVENT_HFP_META;
@ -118,10 +118,10 @@ static void hfp_hf_emit_type_and_number(hfp_callback_t callback, uint8_t event_s
int size = (strlen(bnip_number) < sizeof(event) - 5) ? strlen(bnip_number) : sizeof(event) - 5;
strncpy((char*)&event[4], bnip_number, size);
event[4 + size] = 0;
(*callback)(event, sizeof(event));
(*callback)(HCI_EVENT_PACKET, 0, event, sizeof(event));
}
static void hfp_hf_emit_enhanced_call_status(hfp_callback_t callback, uint8_t clcc_idx, uint8_t clcc_dir,
static void hfp_hf_emit_enhanced_call_status(btstack_packet_handler_t callback, uint8_t clcc_idx, uint8_t clcc_dir,
uint8_t clcc_status, uint8_t clcc_mpty, uint8_t bnip_type, const char * bnip_number){
if (!callback) return;
uint8_t event[35];
@ -136,7 +136,7 @@ static void hfp_hf_emit_enhanced_call_status(hfp_callback_t callback, uint8_t cl
int size = (strlen(bnip_number) < sizeof(event) - 10) ? strlen(bnip_number) : sizeof(event) - 10;
strncpy((char*)&event[9], bnip_number, size);
event[9 + size] = 0;
(*callback)(event, sizeof(event));
(*callback)(HCI_EVENT_PACKET, 0, event, sizeof(event));
}
static int hfp_hf_supports_codec(uint8_t codec){
@ -373,7 +373,7 @@ static int hfp_hf_send_clcc(uint16_t cid){
return send_str_over_rfcomm(cid, buffer);
}
static void hfp_emit_ag_indicator_event(hfp_callback_t callback, hfp_ag_indicator_t indicator){
static void hfp_emit_ag_indicator_event(btstack_packet_handler_t callback, hfp_ag_indicator_t indicator){
if (!callback) return;
uint8_t event[5+HFP_MAX_INDICATOR_DESC_SIZE+1];
event[0] = HCI_EVENT_HFP_META;
@ -383,10 +383,10 @@ static void hfp_emit_ag_indicator_event(hfp_callback_t callback, hfp_ag_indicato
event[4] = indicator.status;
strncpy((char*)&event[5], indicator.name, HFP_MAX_INDICATOR_DESC_SIZE);
event[5+HFP_MAX_INDICATOR_DESC_SIZE] = 0;
(*callback)(event, sizeof(event));
(*callback)(HCI_EVENT_PACKET, 0, event, sizeof(event));
}
static void hfp_emit_network_operator_event(hfp_callback_t callback, hfp_network_opearator_t network_operator){
static void hfp_emit_network_operator_event(btstack_packet_handler_t callback, hfp_network_opearator_t network_operator){
if (!callback) return;
uint8_t event[24];
event[0] = HCI_EVENT_HFP_META;
@ -395,7 +395,7 @@ static void hfp_emit_network_operator_event(hfp_callback_t callback, hfp_network
event[3] = network_operator.mode;
event[4] = network_operator.format;
strcpy((char*)&event[5], network_operator.name);
(*callback)(event, sizeof(event));
(*callback)(HCI_EVENT_PACKET, 0, event, sizeof(event));
}
static int hfp_hf_run_for_context_service_level_connection(hfp_connection_t * hfp_connection){
@ -566,7 +566,7 @@ static int hfp_hf_run_for_audio_connection(hfp_connection_t * hfp_connection){
if (hfp_connection->establish_audio_connection){
hfp_connection->state = HFP_W4_SCO_CONNECTED;
hfp_connection->establish_audio_connection = 0;
hfp_setup_synchronous_connection(hfp_connection->acl_handle, hfp_connection->link_setting);
hfp_setup_synchronous_connection(hfp_connection);
return 1;
}
@ -1083,8 +1083,6 @@ void hfp_hf_init(uint16_t rfcomm_channel_nr){
hci_event_callback_registration.callback = &packet_handler;
hci_add_event_handler(&hci_event_callback_registration);
l2cap_init();
rfcomm_register_service(packet_handler, rfcomm_channel_nr, 0xffff);
hfp_set_packet_handler_for_rfcomm_connections(&packet_handler);

View File

@ -95,7 +95,7 @@ void hfp_hf_init_hf_indicators(int indicators_nr, uint16_t * indicators);
* @brief Register callback for the HFP Hands-Free (HF) client.
* @param callback
*/
void hfp_hf_register_packet_handler(hfp_callback_t callback);
void hfp_hf_register_packet_handler(btstack_packet_handler_t callback);
/**
* @brief Establish RFCOMM connection with the AG with given Bluetooth address,

View File

@ -124,15 +124,15 @@ typedef enum {
static hsp_state_t hsp_state = HSP_IDLE;
static hsp_ag_callback_t hsp_ag_callback;
static btstack_packet_handler_t hsp_ag_callback;
static void hsp_run(void);
static void packet_handler (uint8_t packet_type, uint16_t channel, uint8_t *packet, uint16_t size);
static void handle_query_rfcomm_event(uint8_t packet_type, uint16_t channel, uint8_t *packet, uint16_t size);
static void dummy_notify(uint8_t * event, uint16_t size){}
static void dummy_notify(uint8_t packet_type, uint16_t channel, uint8_t * event, uint16_t size){}
void hsp_ag_register_packet_handler(hsp_ag_callback_t callback){
void hsp_ag_register_packet_handler(btstack_packet_handler_t callback){
if (callback == NULL){
callback = &dummy_notify;
}
@ -146,7 +146,7 @@ static void emit_event(uint8_t event_subtype, uint8_t value){
event[1] = sizeof(event) - 2;
event[2] = event_subtype;
event[3] = value; // status 0 == OK
(*hsp_ag_callback)(event, sizeof(event));
(*hsp_ag_callback)(HCI_EVENT_PACKET, 0, event, sizeof(event));
}
static void emit_event_audio_connected(uint8_t status, uint16_t handle){
@ -157,7 +157,7 @@ static void emit_event_audio_connected(uint8_t status, uint16_t handle){
event[2] = HSP_SUBEVENT_AUDIO_CONNECTION_COMPLETE;
event[3] = status;
little_endian_store_16(event, 4, handle);
(*hsp_ag_callback)(event, sizeof(event));
(*hsp_ag_callback)(HCI_EVENT_PACKET, 0, event, sizeof(event));
}
void hsp_ag_create_sdp_record(uint8_t * service, uint32_t service_record_handle, int rfcomm_channel_nr, const char * name){
@ -349,6 +349,7 @@ static void hsp_ringing_timeout_handler(btstack_timer_source_t * timer){
ag_ring = 1;
btstack_run_loop_set_timer(&hs_timeout, 2000); // 2 seconds timeout
btstack_run_loop_add_timer(&hs_timeout);
hsp_run();
}
static void hsp_ringing_timer_start(void){
@ -363,23 +364,23 @@ static void hsp_ringing_timer_stop(void){
}
void hsp_ag_start_ringing(void){
if (hsp_state != HSP_W2_CONNECT_SCO) return;
ag_ring = 1;
hsp_state = HSP_W4_RING_ANSWER;
if (hsp_state == HSP_W2_CONNECT_SCO) {
hsp_state = HSP_W4_RING_ANSWER;
}
hsp_ringing_timer_start();
}
void hsp_ag_stop_ringing(void){
ag_ring = 0;
ag_num_button_press_received = 0;
hsp_state = HSP_W2_CONNECT_SCO;
if (hsp_state == HSP_W4_RING_ANSWER){
hsp_state = HSP_W2_CONNECT_SCO;
}
hsp_ringing_timer_stop();
}
static void hsp_run(void){
int err;
if (ag_send_ok){
if (!rfcomm_can_send_packet_now(rfcomm_cid)) {
rfcomm_request_can_send_now_event(rfcomm_cid);
@ -396,10 +397,17 @@ static void hsp_run(void){
return;
}
ag_send_error = 0;
err = hsp_ag_send_str_over_rfcomm(rfcomm_cid, HSP_AG_ERROR);
if (err) {
ag_send_error = 1;
hsp_ag_send_str_over_rfcomm(rfcomm_cid, HSP_AG_ERROR);
return;
}
if (ag_ring){
if (!rfcomm_can_send_packet_now(rfcomm_cid)) {
rfcomm_request_can_send_now_event(rfcomm_cid);
return;
}
ag_ring = 0;
hsp_ag_send_str_over_rfcomm(rfcomm_cid, HSP_AG_RING);
return;
}
@ -431,30 +439,18 @@ static void hsp_run(void){
break;
case HSP_W4_RING_ANSWER:
if (ag_ring){
if (!rfcomm_can_send_packet_now(rfcomm_cid)) {
rfcomm_request_can_send_now_event(rfcomm_cid);
return;
}
ag_ring = 0;
err = hsp_ag_send_str_over_rfcomm(rfcomm_cid, HSP_AG_RING);
if (err) {
ag_ring = 1;
}
break;
if (!ag_num_button_press_received) break;
if (!rfcomm_can_send_packet_now(rfcomm_cid)) {
rfcomm_request_can_send_now_event(rfcomm_cid);
return;
}
if (!ag_num_button_press_received) break;
ag_send_ok = 0;
ag_num_button_press_received = 0;
hsp_state = HSP_W2_CONNECT_SCO;
err = hsp_ag_send_str_over_rfcomm(rfcomm_cid, HSP_AG_OK);
if (err) {
hsp_state = HSP_W4_RING_ANSWER;
ag_num_button_press_received = 1;
}
hsp_ag_send_str_over_rfcomm(rfcomm_cid, HSP_AG_OK);
break;
case HSP_W2_CONNECT_SCO:
@ -486,10 +482,7 @@ static void hsp_run(void){
ag_microphone_gain = -1;
char buffer[10];
sprintf(buffer, "%s=%d\r\n", HSP_MICROPHONE_GAIN, gain);
err = hsp_ag_send_str_over_rfcomm(rfcomm_cid, buffer);
if (err) {
ag_microphone_gain = gain;
}
hsp_ag_send_str_over_rfcomm(rfcomm_cid, buffer);
break;
}
@ -502,10 +495,7 @@ static void hsp_run(void){
ag_speaker_gain = -1;
char buffer[10];
sprintf(buffer, "%s=%d\r\n", HSP_SPEAKER_GAIN, gain);
err = hsp_ag_send_str_over_rfcomm(rfcomm_cid, buffer);
if (err) {
ag_speaker_gain = gain;
}
hsp_ag_send_str_over_rfcomm(rfcomm_cid, buffer);
break;
}
break;
@ -554,7 +544,7 @@ static void packet_handler (uint8_t packet_type, uint16_t channel, uint8_t *pack
event[1] = size + 2;
event[2] = HSP_SUBEVENT_HS_COMMAND;
event[3] = size;
(*hsp_ag_callback)(event, size+4);
(*hsp_ag_callback)(HCI_EVENT_PACKET, 0, event, size+4);
}
hsp_run();

View File

@ -54,23 +54,6 @@ extern "C" {
/* API_START */
/**
* @brief Packet handler for HSP Audio Gateway (AG) events.
*
* The HSP AG event has type HCI_EVENT_HSP_META with following subtypes:
* - HSP_SUBEVENT_RFCOMM_CONNECTION_COMPLETE
* - HSP_SUBEVENT_RFCOMM_DISCONNECTION_COMPLETE
* - HSP_SUBEVENT_AUDIO_CONNECTION_COMPLETE
* - HSP_SUBEVENT_AUDIO_DISCONNECTION_COMPLETE
* - HSP_SUBEVENT_MICROPHONE_GAIN_CHANGED
* - HSP_SUBEVENT_SPEAKER_GAIN_CHANGED
* - HSP_SUBEVENT_HS_COMMAND
*
* @param event See include/btstack/hci_cmds.h
* @param event_size
*/
typedef void (*hsp_ag_callback_t)(uint8_t * event, uint16_t event_size);
/**
* @brief Set up HSP AG.
* @param rfcomm_channel_nr
@ -88,9 +71,19 @@ void hsp_ag_create_sdp_record(uint8_t * service, uint32_t service_record_handle,
/**
* @brief Register packet handler to receive HSP AG events.
* The HSP AG event has type HCI_EVENT_HSP_META with following subtypes:
* - HSP_SUBEVENT_RFCOMM_CONNECTION_COMPLETE
* - HSP_SUBEVENT_RFCOMM_DISCONNECTION_COMPLETE
* - HSP_SUBEVENT_AUDIO_CONNECTION_COMPLETE
* - HSP_SUBEVENT_AUDIO_DISCONNECTION_COMPLETE
* - HSP_SUBEVENT_MICROPHONE_GAIN_CHANGED
* - HSP_SUBEVENT_SPEAKER_GAIN_CHANGED
* - HSP_SUBEVENT_HS_COMMAND
*
* @param callback
*/
void hsp_ag_register_packet_handler(hsp_ag_callback_t callback);
void hsp_ag_register_packet_handler(btstack_packet_handler_t callback);
/**
* @brief Connect to HSP Headset.

View File

@ -123,10 +123,10 @@ static void hsp_run(void);
static void packet_handler (uint8_t packet_type, uint16_t channel, uint8_t *packet, uint16_t size);
static void handle_query_rfcomm_event(uint8_t packet_type, uint16_t channel, uint8_t *packet, uint16_t size);
static hsp_hs_callback_t hsp_hs_callback;
static void dummy_notify(uint8_t * event, uint16_t size){}
static btstack_packet_handler_t hsp_hs_callback;
static void dummy_notify(uint8_t packet_type, uint16_t channel, uint8_t * event, uint16_t size){}
void hsp_hs_register_packet_handler(hsp_hs_callback_t callback){
void hsp_hs_register_packet_handler(btstack_packet_handler_t callback){
if (callback == NULL){
callback = &dummy_notify;
}
@ -140,7 +140,7 @@ static void emit_event(uint8_t event_subtype, uint8_t value){
event[1] = sizeof(event) - 2;
event[2] = event_subtype;
event[3] = value; // status 0 == OK
(*hsp_hs_callback)(event, sizeof(event));
(*hsp_hs_callback)(HCI_EVENT_PACKET, 0, event, sizeof(event));
}
static void emit_ring_event(void){
@ -149,7 +149,7 @@ static void emit_ring_event(void){
event[0] = HCI_EVENT_HSP_META;
event[1] = sizeof(event) - 2;
event[2] = HSP_SUBEVENT_RING;
(*hsp_hs_callback)(event, sizeof(event));
(*hsp_hs_callback)(HCI_EVENT_PACKET, 0, event, sizeof(event));
}
static void emit_event_audio_connected(uint8_t status, uint16_t handle){
@ -160,7 +160,7 @@ static void emit_event_audio_connected(uint8_t status, uint16_t handle){
event[2] = HSP_SUBEVENT_AUDIO_CONNECTION_COMPLETE;
event[3] = status;
little_endian_store_16(event, 4, handle);
(*hsp_hs_callback)(event, sizeof(event));
(*hsp_hs_callback)(HCI_EVENT_PACKET, 0, event, sizeof(event));
}
// remote audio volume control
@ -276,9 +276,6 @@ void hsp_hs_init(uint8_t rfcomm_channel_nr){
hci_event_callback_registration.callback = &packet_handler;
hci_add_event_handler(&hci_event_callback_registration);
// init L2CAP
l2cap_init();
rfcomm_init();
rfcomm_register_service(packet_handler, rfcomm_channel_nr, 0xffff); // reserved channel, mtu limited by l2cap
@ -477,7 +474,7 @@ static void packet_handler (uint8_t packet_type, uint16_t channel, uint8_t *pack
event[1] = size + 2;
event[2] = HSP_SUBEVENT_AG_INDICATION;
event[3] = size;
(*hsp_hs_callback)(event, size+4);
(*hsp_hs_callback)(HCI_EVENT_PACKET, 0, event, size+4);
}
hsp_run();
return;
@ -590,7 +587,7 @@ static void packet_handler (uint8_t packet_type, uint16_t channel, uint8_t *pack
case RFCOMM_EVENT_CHANNEL_CLOSED:
hsp_hs_reset_state();
hsp_hs_callback(packet, size);
hsp_hs_callback(HCI_EVENT_PACKET, 0, packet, size);
break;
default:

View File

@ -54,24 +54,6 @@ extern "C" {
/* API_START */
/**
* @brief Packet handler for HSP Headset (HS) events.
*
* The HSP HS event has type HCI_EVENT_HSP_META with following subtypes:
* - HSP_SUBEVENT_RFCOMM_CONNECTION_COMPLETE
* - HSP_SUBEVENT_RFCOMM_DISCONNECTION_COMPLETE
* - HSP_SUBEVENT_AUDIO_CONNECTION_COMPLETE
* - HSP_SUBEVENT_AUDIO_DISCONNECTION_COMPLETE
* - HSP_SUBEVENT_RING
* - HSP_SUBEVENT_MICROPHONE_GAIN_CHANGED
* - HSP_SUBEVENT_SPEAKER_GAIN_CHANGED
* - HSP_SUBEVENT_AG_INDICATION
*
* @param event See include/btstack/hci_cmds.h
* @param event_size
*/
typedef void (*hsp_hs_callback_t)(uint8_t * event, uint16_t event_size);
/**
* @brief Set up HSP HS.
* @param rfcomm_channel_nr
@ -89,9 +71,20 @@ void hsp_hs_create_sdp_record(uint8_t * service, uint32_t service_record_handle,
/**
* @brief Register packet handler to receive HSP HS events.
*
* The HSP HS event has type HCI_EVENT_HSP_META with following subtypes:
* - HSP_SUBEVENT_RFCOMM_CONNECTION_COMPLETE
* - HSP_SUBEVENT_RFCOMM_DISCONNECTION_COMPLETE
* - HSP_SUBEVENT_AUDIO_CONNECTION_COMPLETE
* - HSP_SUBEVENT_AUDIO_DISCONNECTION_COMPLETE
* - HSP_SUBEVENT_RING
* - HSP_SUBEVENT_MICROPHONE_GAIN_CHANGED
* - HSP_SUBEVENT_SPEAKER_GAIN_CHANGED
* - HSP_SUBEVENT_AG_INDICATION
*
* @param callback
*/
void hsp_hs_register_packet_handler(hsp_hs_callback_t callback);
void hsp_hs_register_packet_handler(btstack_packet_handler_t callback);
/**
* @brief Connect to HSP Audio Gateway.

View File

@ -1027,20 +1027,10 @@ static int rfcomm_hci_event_handler(uint8_t *packet, uint16_t size){
log_info("L2CAP_EVENT_CHANNEL_CLOSED cid 0x%0x, mult %p", l2cap_cid, multiplexer);
if (!multiplexer) break;
log_info("L2CAP_EVENT_CHANNEL_CLOSED state %u", multiplexer->state);
switch (multiplexer->state) {
case RFCOMM_MULTIPLEXER_W4_CONNECT:
case RFCOMM_MULTIPLEXER_SEND_SABM_0:
case RFCOMM_MULTIPLEXER_W4_SABM_0:
case RFCOMM_MULTIPLEXER_SEND_UA_0:
case RFCOMM_MULTIPLEXER_W4_UA_0:
case RFCOMM_MULTIPLEXER_OPEN:
// don't call l2cap_disconnect as it's alreay closed
rfcomm_multiplexer_finalize(multiplexer);
return 1;
default:
break;
}
break;
// no need to call l2cap_disconnect here, as it's already closed
rfcomm_multiplexer_finalize(multiplexer);
return 1;
default:
break;
}

View File

@ -73,6 +73,7 @@
#define HCI_CONNECTION_TIMEOUT_MS 10000
#define HCI_RESET_RESEND_TIMEOUT_MS 200
// prototypes
static void hci_update_scan_enable(void);
@ -908,7 +909,7 @@ static void hci_initializing_run(void){
#ifndef HAVE_PLATFORM_IPHONE_OS
// prepare reset if command complete not received in 100ms
btstack_run_loop_set_timer(&hci_stack->timeout, 100);
btstack_run_loop_set_timer(&hci_stack->timeout, HCI_RESET_RESEND_TIMEOUT_MS);
btstack_run_loop_set_timer_handler(&hci_stack->timeout, hci_initialization_timeout_handler);
btstack_run_loop_add_timer(&hci_stack->timeout);
#endif
@ -923,7 +924,7 @@ static void hci_initializing_run(void){
case HCI_INIT_SEND_RESET_CSR_WARM_BOOT:
hci_state_reset();
// prepare reset if command complete not received in 100ms
btstack_run_loop_set_timer(&hci_stack->timeout, 100);
btstack_run_loop_set_timer(&hci_stack->timeout, HCI_RESET_RESEND_TIMEOUT_MS);
btstack_run_loop_set_timer_handler(&hci_stack->timeout, hci_initialization_timeout_handler);
btstack_run_loop_add_timer(&hci_stack->timeout);
// send command
@ -944,7 +945,7 @@ static void hci_initializing_run(void){
// STLC25000D: baudrate change happens within 0.5 s after command was send,
// use timer to update baud rate after 100 ms (knowing exactly, when command was sent is non-trivial)
if (hci_stack->manufacturer == COMPANY_ID_ST_MICROELECTRONICS){
btstack_run_loop_set_timer(&hci_stack->timeout, 100);
btstack_run_loop_set_timer(&hci_stack->timeout, HCI_RESET_RESEND_TIMEOUT_MS);
btstack_run_loop_add_timer(&hci_stack->timeout);
}
break;
@ -973,7 +974,7 @@ static void hci_initializing_run(void){
break;
case 2: // CSR Warm Boot: Wait a bit, then send HCI Reset until HCI Command Complete
log_info("CSR Warm Boot");
btstack_run_loop_set_timer(&hci_stack->timeout, 100);
btstack_run_loop_set_timer(&hci_stack->timeout, HCI_RESET_RESEND_TIMEOUT_MS);
btstack_run_loop_set_timer_handler(&hci_stack->timeout, hci_initialization_timeout_handler);
btstack_run_loop_add_timer(&hci_stack->timeout);
if (hci_stack->manufacturer == COMPANY_ID_CAMBRIDGE_SILICON_RADIO
@ -1073,10 +1074,15 @@ static void hci_initializing_run(void){
hci_send_cmd(&hci_write_scan_enable, (hci_stack->connectable << 1) | hci_stack->discoverable); // page scan
hci_stack->substate = HCI_INIT_W4_WRITE_SCAN_ENABLE;
break;
// only sent if ENABLE_SCO_OVER_HCI is defined
case HCI_INIT_WRITE_SYNCHRONOUS_FLOW_CONTROL_ENABLE:
hci_stack->substate = HCI_INIT_W4_WRITE_SYNCHRONOUS_FLOW_CONTROL_ENABLE;
hci_send_cmd(&hci_write_synchronous_flow_control_enable, 1); // SCO tracking enabled
break;
case HCI_INIT_WRITE_DEFAULT_ERRONEOUS_DATA_REPORTING:
hci_stack->substate = HCI_INIT_W4_WRITE_DEFAULT_ERRONEOUS_DATA_REPORTING;
hci_send_cmd(&hci_write_default_erroneous_data_reporting, 1);
break;
#ifdef ENABLE_BLE
// LE INIT
case HCI_INIT_LE_READ_BUFFER_SIZE:
@ -1322,9 +1328,9 @@ static void hci_initializing_event_handler(uint8_t * packet, uint16_t size){
#ifdef ENABLE_SCO_OVER_HCI
case HCI_INIT_W4_WRITE_SCAN_ENABLE:
// just go to next state
break;
case HCI_INIT_W4_WRITE_SYNCHRONOUS_FLOW_CONTROL_ENABLE:
break;
case HCI_INIT_WRITE_DEFAULT_ERRONEOUS_DATA_REPORTING:
if (!hci_le_supported()){
// SKIP LE init for Classic only configuration
hci_init_done();
@ -1860,7 +1866,7 @@ static void event_handler(uint8_t *packet, int size){
static void sco_handler(uint8_t * packet, uint16_t size){
if (!hci_stack->sco_packet_handler) return;
hci_stack->sco_packet_handler(HCI_SCO_DATA_PACKET, packet, size);
hci_stack->sco_packet_handler(HCI_SCO_DATA_PACKET, 0, packet, size);
}
static void packet_handler(uint8_t packet_type, uint8_t *packet, uint16_t size){
@ -1888,14 +1894,14 @@ void hci_add_event_handler(btstack_packet_callback_registration_t * callback_han
/** Register HCI packet handlers */
void hci_register_acl_packet_handler(void (*handler)(uint8_t packet_type, uint8_t *packet, uint16_t size)){
void hci_register_acl_packet_handler(btstack_packet_handler_t handler){
hci_stack->acl_packet_handler = handler;
}
/**
* @brief Registers a packet handler for SCO data. Used for HSP and HFP profiles.
*/
void hci_register_sco_packet_handler(void (*handler)(uint8_t packet_type, uint8_t *packet, uint16_t size)){
void hci_register_sco_packet_handler(btstack_packet_handler_t handler){
hci_stack->sco_packet_handler = handler;
}
@ -2974,7 +2980,7 @@ static void hci_emit_event(uint8_t * event, uint16_t size, int dump){
static void hci_emit_acl_packet(uint8_t * packet, uint16_t size){
if (!hci_stack->acl_packet_handler) return;
hci_stack->acl_packet_handler(HCI_ACL_DATA_PACKET, packet, size);
hci_stack->acl_packet_handler(HCI_ACL_DATA_PACKET, 0, packet, size);
}
static void hci_notify_if_sco_can_send_now(void){
@ -2984,7 +2990,7 @@ static void hci_notify_if_sco_can_send_now(void){
hci_stack->sco_waiting_for_can_send_now = 0;
uint8_t event[2] = { HCI_EVENT_SCO_CAN_SEND_NOW, 0 };
hci_dump_packet(HCI_EVENT_PACKET, 1, event, sizeof(event));
hci_stack->sco_packet_handler(HCI_EVENT_PACKET, event, sizeof(event));
hci_stack->sco_packet_handler(HCI_EVENT_PACKET, 0, event, sizeof(event));
}
}

View File

@ -457,6 +457,8 @@ typedef enum hci_init_state{
HCI_INIT_WRITE_SYNCHRONOUS_FLOW_CONTROL_ENABLE,
HCI_INIT_W4_WRITE_SYNCHRONOUS_FLOW_CONTROL_ENABLE,
HCI_INIT_WRITE_DEFAULT_ERRONEOUS_DATA_REPORTING,
HCI_INIT_W4_WRITE_DEFAULT_ERRONEOUS_DATA_REPORTING,
HCI_INIT_LE_READ_BUFFER_SIZE,
HCI_INIT_W4_LE_READ_BUFFER_SIZE,
@ -520,10 +522,10 @@ typedef struct {
btstack_linked_list_t connections;
/* callback to L2CAP layer */
void (*acl_packet_handler)(uint8_t packet_type, uint8_t *packet, uint16_t size);
btstack_packet_handler_t acl_packet_handler;
/* callback for SCO data */
void (*sco_packet_handler)(uint8_t packet_type, uint8_t *packet, uint16_t size);
btstack_packet_handler_t sco_packet_handler;
/* callbacks for events */
btstack_linked_list_t event_handlers;
@ -721,12 +723,12 @@ void hci_add_event_handler(btstack_packet_callback_registration_t * callback_han
/**
* @brief Registers a packet handler for ACL data. Used by L2CAP
*/
void hci_register_acl_packet_handler(void (*handler)(uint8_t packet_type, uint8_t *packet, uint16_t size));
void hci_register_acl_packet_handler(btstack_packet_handler_t handler);
/**
* @brief Registers a packet handler for SCO data. Used for HSP and HFP profiles.
*/
void hci_register_sco_packet_handler(void (*handler)(uint8_t packet_type, uint8_t *packet, uint16_t size));
void hci_register_sco_packet_handler(btstack_packet_handler_t handler);
// Sending HCI Commands

View File

@ -656,6 +656,14 @@ const hci_cmd_t hci_write_simple_pairing_mode = {
OPCODE(OGF_CONTROLLER_BASEBAND, 0x56), "1"
};
/**
* @param mode (0 = off, 1 = on)
*/
const hci_cmd_t hci_write_default_erroneous_data_reporting = {
OPCODE(OGF_CONTROLLER_BASEBAND, 0x5B), "1"
};
/**
*/
const hci_cmd_t hci_read_le_host_supported = {

View File

@ -134,6 +134,7 @@ extern const hci_cmd_t hci_user_passkey_request_negative_reply;
extern const hci_cmd_t hci_user_passkey_request_reply;
extern const hci_cmd_t hci_write_authentication_enable;
extern const hci_cmd_t hci_write_class_of_device;
extern const hci_cmd_t hci_write_default_erroneous_data_reporting;
extern const hci_cmd_t hci_write_extended_inquiry_response;
extern const hci_cmd_t hci_write_inquiry_mode;
extern const hci_cmd_t hci_write_le_host_supported;

View File

@ -130,18 +130,24 @@ typedef struct {
* @brief Setup H4 instance with uart_driver
* @param uart_driver to use
*/
extern const hci_transport_t * hci_transport_h4_instance(const btstack_uart_block_t * uart_driver);
const hci_transport_t * hci_transport_h4_instance(const btstack_uart_block_t * uart_driver);
/*
* @brief Setup H5 instance with uart_driver
* @param uart_driver to use
*/
extern const hci_transport_t * hci_transport_h5_instance(const btstack_uart_block_t * uart_driver);
const hci_transport_t * hci_transport_h5_instance(const btstack_uart_block_t * uart_driver);
/*
* @brief Enable H5 Low Power Mode: enter sleep mode after x ms of inactivity
* @param inactivity_timeout_ms or 0 for off
*/
void hci_transport_h5_set_auto_sleep(uint16_t inactivity_timeout_ms);
/*
* @brief
*/
extern const hci_transport_t * hci_transport_usb_instance(void);
const hci_transport_t * hci_transport_usb_instance(void);
/* API_END */

View File

@ -38,7 +38,7 @@
/*
* hci_h4_transport.c
*
* HCI Transport API implementation for basic H4 protocol over POSIX
* HCI Transport API implementation for H4 protocol over POSIX with optional support for eHCILL
*
* Created by Matthias Ringwald on 4/29/09.
*/
@ -50,9 +50,43 @@
#include "hci_transport.h"
#include "btstack_uart_block.h"
#ifdef HAVE_EHCILL
#error "HCI Transport H4 POSIX does not support eHCILL yet. Please remove HAVE_EHCILL from your btstack-config.h"
#endif
#ifdef ENABLE_EHCILL
// eHCILL commands
#define EHCILL_GO_TO_SLEEP_IND 0x030
#define EHCILL_GO_TO_SLEEP_ACK 0x031
#define EHCILL_WAKE_UP_IND 0x032
#define EHCILL_WAKE_UP_ACK 0x033
static int hci_transport_h4_ehcill_outgoing_packet_ready(void);
static int hci_transport_h4_ehcill_sleep_mode_active(void);
static void hci_transport_h4_echill_send_wakeup_ind(void);
static void hci_transport_h4_ehcill_handle_command(uint8_t action);
static void hci_transport_h4_ehcill_handle_ehcill_command_sent(void);
static void hci_transport_h4_ehcill_handle_packet_sent(void);
static void hci_transport_h4_ehcill_open(void);
static void hci_transport_h4_ehcill_reset_statemachine(void);
static void hci_transport_h4_ehcill_send_ehcill_command(void);
static void hci_transport_h4_ehcill_sleep_ack_timer_setup(void);
static void hci_transport_h4_ehcill_trigger_wakeup(void);
typedef enum {
EHCILL_STATE_SLEEP,
EHCILL_STATE_W4_ACK,
EHCILL_STATE_AWAKE
} EHCILL_STATE;
// eHCILL state machine
static EHCILL_STATE ehcill_state;
static uint8_t ehcill_command_to_send;
static btstack_uart_sleep_mode_t btstack_uart_sleep_mode;
// work around for eHCILL problem
static btstack_timer_source_t ehcill_sleep_ack_timer;
#endif
// assert pre-buffer for packet type is available
#if !defined(HCI_OUTGOING_PRE_BUFFER_SIZE) || (HCI_OUTGOING_PRE_BUFFER_SIZE == 0)
@ -69,12 +103,26 @@ typedef enum {
H4_W4_PAYLOAD,
} H4_STATE;
typedef enum {
TX_IDLE = 1,
TX_W4_PACKET_SENT,
#ifdef ENABLE_EHCILL
TX_W4_WAKEUP,
TX_W2_EHCILL_SEND,
TX_W4_EHCILL_SENT,
#endif
} TX_STATE;
// UART Driver + Config
static const btstack_uart_block_t * btstack_uart;
static btstack_uart_config_t uart_config;
// write mutex
static int uart_write_active;
// write state
static TX_STATE tx_state;
static uint8_t * tx_data;
static uint16_t tx_len; // 0 == no outgoing packet
static uint8_t packet_sent_event[] = { HCI_EVENT_TRANSPORT_PACKET_SENT, 0};
static void (*packet_handler)(uint8_t packet_type, uint8_t *packet, uint16_t size) = dummy_handler;
@ -99,19 +147,10 @@ static void hci_transport_h4_reset_statemachine(void){
}
static void hci_transport_h4_trigger_next_read(void){
// trigger next read
// log_info("hci_transport_h4_trigger_next_read: %u bytes", bytes_to_read);
btstack_uart->receive_block(&hci_packet[read_pos], bytes_to_read);
}
static void hci_transport_h4_block_sent(void){
// free mutex
uart_write_active = 0;
// notify upper stack that it can send again
uint8_t event[] = { HCI_EVENT_TRANSPORT_PACKET_SENT, 0};
packet_handler(HCI_EVENT_PACKET, &event[0], sizeof(event));
}
static void hci_transport_h4_block_read(void){
read_pos += bytes_to_read;
@ -131,8 +170,17 @@ static void hci_transport_h4_block_read(void){
bytes_to_read = HCI_SCO_HEADER_SIZE;
h4_state = H4_W4_SCO_HEADER;
break;
#ifdef ENABLE_EHCILL
case EHCILL_GO_TO_SLEEP_IND:
case EHCILL_GO_TO_SLEEP_ACK:
case EHCILL_WAKE_UP_IND:
case EHCILL_WAKE_UP_ACK:
hci_transport_h4_ehcill_handle_command(hci_packet[0]);
hci_transport_h4_reset_statemachine();
break;
#endif
default:
log_error("h4_process: invalid packet type 0x%02x", hci_packet[0]);
log_error("hci_transport_h4: invalid packet type 0x%02x", hci_packet[0]);
hci_transport_h4_reset_statemachine();
break;
}
@ -147,7 +195,7 @@ static void hci_transport_h4_block_read(void){
bytes_to_read = little_endian_read_16( hci_packet, 3);
// check ACL length
if (HCI_ACL_HEADER_SIZE + bytes_to_read > HCI_PACKET_BUFFER_SIZE){
log_error("h4_process: invalid ACL payload len %u - only space for %u", bytes_to_read, HCI_PACKET_BUFFER_SIZE - HCI_ACL_HEADER_SIZE);
log_error("hci_transport_h4: invalid ACL payload len %u - only space for %u", bytes_to_read, HCI_PACKET_BUFFER_SIZE - HCI_ACL_HEADER_SIZE);
hci_transport_h4_reset_statemachine();
break;
}
@ -169,6 +217,59 @@ static void hci_transport_h4_block_read(void){
hci_transport_h4_trigger_next_read();
}
static void hci_transport_h4_block_sent(void){
switch (tx_state){
case TX_W4_PACKET_SENT:
// packet fully sent, reset state
tx_len = 0;
tx_state = TX_IDLE;
#ifdef ENABLE_EHCILL
// notify eHCILL engine
hci_transport_h4_ehcill_handle_packet_sent();
#endif
// notify upper stack that it can send again
packet_handler(HCI_EVENT_PACKET, &packet_sent_event[0], sizeof(packet_sent_event));
break;
#ifdef ENABLE_EHCILL
case TX_W4_EHCILL_SENT:
hci_transport_h4_ehcill_handle_ehcill_command_sent();
break;
#endif
default:
break;
}
}
static int hci_transport_h4_can_send_now(uint8_t packet_type){
return tx_state == TX_IDLE;
}
static int hci_transport_h4_send_packet(uint8_t packet_type, uint8_t * packet, int size){
// store packet type before actual data and increase size
size++;
packet--;
*packet = packet_type;
// store request
tx_len = size;
tx_data = packet;
#ifdef ENABLE_EHCILL
if (hci_transport_h4_ehcill_sleep_mode_active()){
hci_transport_h4_ehcill_trigger_wakeup();
return 0;
}
#endif
// start sending
tx_state = TX_W4_PACKET_SENT;
btstack_uart->send_block(packet, size);
return 0;
}
static void hci_transport_h4_init(const void * transport_config){
// check for hci_transport_config_uart_t
if (!transport_config) {
@ -199,6 +300,12 @@ static int hci_transport_h4_open(void){
}
hci_transport_h4_reset_statemachine();
hci_transport_h4_trigger_next_read();
tx_state = TX_IDLE;
#ifdef ENABLE_EHCILL
hci_transport_h4_ehcill_open();
#endif
return 0;
}
@ -210,27 +317,191 @@ static void hci_transport_h4_register_packet_handler(void (*handler)(uint8_t pac
packet_handler = handler;
}
static int hci_transport_h4_can_send_now(uint8_t packet_type){
return uart_write_active == 0;
}
static int hci_transport_h4_send_packet(uint8_t packet_type, uint8_t * packet, int size){
// store packet type before actual data and increase size
size++;
packet--;
*packet = packet_type;
// lock mutex
uart_write_active = 1;
//
btstack_uart->send_block(packet, size);
return 0;
}
static void dummy_handler(uint8_t packet_type, uint8_t *packet, uint16_t size){
}
//
// --- main part of eHCILL implementation ---
//
#ifdef ENABLE_EHCILL
static void hci_transport_h4_ehcill_open(void){
hci_transport_h4_ehcill_reset_statemachine();
// find best sleep mode to use: wake on CTS, wake on RX, none
btstack_uart_sleep_mode = BTSTACK_UART_SLEEP_OFF;
int supported_sleep_modes = 0;
if (btstack_uart->get_supported_sleep_modes){
supported_sleep_modes = btstack_uart->get_supported_sleep_modes();
}
if (supported_sleep_modes & BTSTACK_UART_SLEEP_MASK_RTS_HIGH_WAKE_ON_CTS_PULSE){
log_info("eHCILL: using wake on CTS");
btstack_uart_sleep_mode = BTSTACK_UART_SLEEP_RTS_HIGH_WAKE_ON_CTS_PULSE;
} else if (supported_sleep_modes & BTSTACK_UART_SLEEP_MASK_RTS_LOW_WAKE_ON_RX_EDGE){
log_info("eHCILL: using wake on RX");
btstack_uart_sleep_mode = BTSTACK_UART_SLEEP_RTS_LOW_WAKE_ON_RX_EDGE;
} else {
log_info("eHCILL: UART driver does not provide compatible sleep mode");
}
}
static void hci_transport_h4_echill_send_wakeup_ind(void){
// update state
tx_state = TX_W4_WAKEUP;
ehcill_state = EHCILL_STATE_W4_ACK;
ehcill_command_to_send = EHCILL_WAKE_UP_IND;
btstack_uart->send_block(&ehcill_command_to_send, 1);
}
static int hci_transport_h4_ehcill_outgoing_packet_ready(void){
return tx_len != 0;
}
static int hci_transport_h4_ehcill_sleep_mode_active(void){
return ehcill_state == EHCILL_STATE_SLEEP;
}
static void hci_transport_h4_ehcill_reset_statemachine(void){
ehcill_state = EHCILL_STATE_AWAKE;
}
static void hci_transport_h4_ehcill_send_ehcill_command(void){
log_debug("eHCILL: send command %02x", ehcill_command_to_send);
tx_state = TX_W4_EHCILL_SENT;
btstack_uart->send_block(&ehcill_command_to_send, 1);
}
static void hci_transport_h4_ehcill_sleep_ack_timer_handler(btstack_timer_source_t * timer){
log_debug("eHCILL: timer triggered");
hci_transport_h4_ehcill_send_ehcill_command();
}
static void hci_transport_h4_ehcill_sleep_ack_timer_setup(void){
// setup timer
log_debug("eHCILL: set timer for sending command");
btstack_run_loop_set_timer_handler(&ehcill_sleep_ack_timer, &hci_transport_h4_ehcill_sleep_ack_timer_handler);
btstack_run_loop_set_timer(&ehcill_sleep_ack_timer, 50);
btstack_run_loop_add_timer(&ehcill_sleep_ack_timer);
}
static void hci_transport_h4_ehcill_trigger_wakeup(void){
switch (tx_state){
case TX_W2_EHCILL_SEND:
case TX_W4_EHCILL_SENT:
// wake up / sleep ack in progress, nothing to do now
return;
case TX_IDLE:
default:
// all clear, prepare for wakeup
break;
}
// UART needed again
if (btstack_uart_sleep_mode){
btstack_uart->set_sleep(BTSTACK_UART_SLEEP_OFF);
}
hci_transport_h4_echill_send_wakeup_ind();
}
static void hci_transport_h4_ehcill_schedule_ecill_command(uint8_t command){
ehcill_command_to_send = command;
switch (tx_state){
case TX_IDLE:
if (ehcill_command_to_send == EHCILL_WAKE_UP_ACK){
// send right away
hci_transport_h4_ehcill_send_ehcill_command();
} else {
// change state so BTstack cannot send and setup timer
tx_state = TX_W2_EHCILL_SEND;
hci_transport_h4_ehcill_sleep_ack_timer_setup();
}
break;
default:
break;
}
}
static void hci_transport_h4_ehcill_handle_command(uint8_t action){
// log_info("hci_transport_h4_ehcill_handle: %x, state %u, defer_rx %u", action, ehcill_state, ehcill_defer_rx_size);
switch(ehcill_state){
case EHCILL_STATE_AWAKE:
switch(action){
case EHCILL_GO_TO_SLEEP_IND:
ehcill_state = EHCILL_STATE_SLEEP;
log_info("eHCILL: GO_TO_SLEEP_IND RX");
hci_transport_h4_ehcill_schedule_ecill_command(EHCILL_GO_TO_SLEEP_ACK);
break;
default:
break;
}
break;
case EHCILL_STATE_SLEEP:
switch(action){
case EHCILL_WAKE_UP_IND:
ehcill_state = EHCILL_STATE_AWAKE;
log_info("eHCILL: WAKE_UP_IND RX");
hci_transport_h4_ehcill_schedule_ecill_command(EHCILL_WAKE_UP_ACK);
break;
default:
break;
}
break;
case EHCILL_STATE_W4_ACK:
switch(action){
case EHCILL_WAKE_UP_IND:
case EHCILL_WAKE_UP_ACK:
log_info("eHCILL: WAKE_UP_IND or ACK");
tx_state = TX_W4_PACKET_SENT;
ehcill_state = EHCILL_STATE_AWAKE;
btstack_uart->send_block(tx_data, tx_len);
break;
default:
break;
}
break;
}
}
static void hci_transport_h4_ehcill_handle_packet_sent(void){
// now, send pending ehcill command if neccessary
switch (ehcill_command_to_send){
case EHCILL_GO_TO_SLEEP_ACK:
hci_transport_h4_ehcill_sleep_ack_timer_setup();
break;
case EHCILL_WAKE_UP_IND:
hci_transport_h4_ehcill_send_ehcill_command();
break;
default:
break;
}
}
static void hci_transport_h4_ehcill_handle_ehcill_command_sent(void){
tx_state = TX_IDLE;
int command = ehcill_command_to_send;
ehcill_command_to_send = 0;
if (command == EHCILL_GO_TO_SLEEP_ACK) {
log_info("eHCILL: GO_TO_SLEEP_ACK sent, enter sleep mode");
// UART not needed after EHCILL_GO_TO_SLEEP_ACK was sent
if (btstack_uart_sleep_mode != BTSTACK_UART_SLEEP_OFF){
btstack_uart->set_sleep(btstack_uart_sleep_mode);
}
}
// already packet ready? then start wakeup
if (hci_transport_h4_ehcill_outgoing_packet_ready()){
if (btstack_uart_sleep_mode){
btstack_uart->set_sleep(BTSTACK_UART_SLEEP_OFF);
}
hci_transport_h4_echill_send_wakeup_ind();
}
}
#endif
// --- end of eHCILL implementation ---------
static const hci_transport_t hci_transport_h4 = {
/* const char * name; */ "H4",
/* void (*init) (const void *transport_config); */ &hci_transport_h4_init,

View File

@ -49,12 +49,6 @@
#include "hci_transport.h"
#include "btstack_uart_block.h"
#ifdef HAVE_EHCILL
#error "HCI Transport H5 does not support eHCILL. Please either use (H4 + HAVE_EHCILL) or H5 Transport"
#endif
/// newer
typedef enum {
LINK_UNINITIALIZED,
LINK_INITIALIZED,
@ -66,10 +60,13 @@ typedef enum {
HCI_TRANSPORT_LINK_SEND_SYNC_RESPONSE = 1 << 1,
HCI_TRANSPORT_LINK_SEND_CONFIG = 1 << 2,
HCI_TRANSPORT_LINK_SEND_CONFIG_RESPONSE = 1 << 3,
HCI_TRANSPORT_LINK_SEND_WOKEN = 1 << 4,
HCI_TRANSPORT_LINK_SEND_WAKEUP = 1 << 5,
HCI_TRANSPORT_LINK_SEND_QUEUED_PACKET = 1 << 6,
HCI_TRANSPORT_LINK_SEND_ACK_PACKET = 1 << 7,
HCI_TRANSPORT_LINK_SEND_SLEEP = 1 << 4,
HCI_TRANSPORT_LINK_SEND_WOKEN = 1 << 5,
HCI_TRANSPORT_LINK_SEND_WAKEUP = 1 << 6,
HCI_TRANSPORT_LINK_SEND_QUEUED_PACKET = 1 << 7,
HCI_TRANSPORT_LINK_SEND_ACK_PACKET = 1 << 8,
HCI_TRANSPORT_LINK_ENTER_SLEEP = 1 << 9,
} hci_transport_link_actions_t;
// Configuration Field. No packet buffers -> sliding window = 1, no OOF flow control, no data integrity check
@ -89,10 +86,14 @@ typedef enum {
#define LINK_ACKNOWLEDGEMENT_TYPE 0x00
#define LINK_CONTROL_PACKET_TYPE 0x0f
// max size of write requests
#define LINK_SLIP_TX_CHUNK_LEN 64
// ---
static const uint8_t link_control_sync[] = { 0x01, 0x7e};
static const uint8_t link_control_sync_response[] = { 0x02, 0x7d};
static const uint8_t link_control_config[] = { 0x03, 0xfc, LINK_CONFIG_FIELD};
static const uint8_t link_control_config_prefix_len = 2;
static const uint8_t link_control_config_response[] = { 0x04, 0x7b, LINK_CONFIG_FIELD};
static const uint8_t link_control_config_response_prefix_len = 2;
static const uint8_t link_control_wakeup[] = { 0x05, 0xfa};
@ -102,8 +103,9 @@ static const uint8_t link_control_sleep[] = { 0x07, 0x78};
// incoming pre-bufffer + 4 bytes H5 header + max(acl header + acl payload, event header + event data) + 2 bytes opt CRC
static uint8_t hci_packet_with_pre_buffer[HCI_INCOMING_PRE_BUFFER_SIZE + 6 + HCI_PACKET_BUFFER_SIZE];
// Non-optimized outgoing buffer (EOF, 4 bytes header, payload, EOF)
static uint8_t slip_outgoing_buffer[2 + 2 * (HCI_PACKET_BUFFER_SIZE + 4)];
// outgoing slip encoded buffer. +1 to assert that last SOF fits in buffer
static uint8_t slip_outgoing_buffer[LINK_SLIP_TX_CHUNK_LEN+1];
static int slip_write_active;
// H5 Link State
static hci_transport_link_state_t link_state;
@ -113,6 +115,10 @@ static uint8_t link_ack_nr;
static uint16_t link_resend_timeout_ms;
static uint8_t link_peer_asleep;
// auto sleep-mode
static btstack_timer_source_t inactivity_timer;
static uint16_t link_inactivity_timeout_ms; // auto-sleep if set
// Outgoing packet
static uint8_t hci_packet_type;
static uint16_t hci_packet_size;
@ -126,8 +132,7 @@ static int hci_transport_link_actions;
// UART Driver + Config
static const btstack_uart_block_t * btstack_uart;
static btstack_uart_config_t uart_config;
static int uart_write_active;
static btstack_uart_sleep_mode_t btstack_uart_sleep_mode;
// Prototypes
static void hci_transport_h5_process_frame(uint16_t frame_size);
@ -139,10 +144,46 @@ static void hci_transport_link_run(void);
static void hci_transport_slip_init(void);
// -----------------------------
static void hci_transport_inactivity_timeout_handler(btstack_timer_source_t * ts){
log_info("h5: inactivity timeout. link state %u, peer asleep %u, actions 0x%02x, outgoing packet %u",
link_state, link_peer_asleep, hci_transport_link_actions, hci_transport_link_have_outgoing_packet());
if (hci_transport_link_have_outgoing_packet()) return;
if (link_state != LINK_ACTIVE) return;
if (hci_transport_link_actions) return;
if (link_peer_asleep) return;
hci_transport_link_actions |= HCI_TRANSPORT_LINK_SEND_SLEEP;
hci_transport_link_run();
}
static void hci_transport_inactivity_timer_set(void){
if (!link_inactivity_timeout_ms) return;
btstack_run_loop_set_timer_handler(&inactivity_timer, &hci_transport_inactivity_timeout_handler);
btstack_run_loop_set_timer(&inactivity_timer, link_inactivity_timeout_ms);
btstack_run_loop_remove_timer(&inactivity_timer);
btstack_run_loop_add_timer(&inactivity_timer);
}
// -----------------------------
// SLIP Outgoing
// Fill chunk and write
static void hci_transport_slip_encode_chunk_and_send(int pos){
while (btstack_slip_encoder_has_data() & (pos < LINK_SLIP_TX_CHUNK_LEN)) {
slip_outgoing_buffer[pos++] = btstack_slip_encoder_get_byte();
}
if (!btstack_slip_encoder_has_data()){
// Start of Frame
slip_outgoing_buffer[pos++] = BTSTACK_SLIP_SOF;
}
slip_write_active = 1;
log_info("hci_transport_slip: send %u bytes", pos);
btstack_uart->send_block(slip_outgoing_buffer, pos);
}
static inline void hci_transport_slip_send_next_chunk(void){
hci_transport_slip_encode_chunk_and_send(0);
}
// format: 0xc0 HEADER PACKER 0xc0
// @param uint8_t header[4]
static void hci_transport_slip_send_frame(const uint8_t * header, const uint8_t * packet, uint16_t packet_size){
@ -160,15 +201,9 @@ static void hci_transport_slip_send_frame(const uint8_t * header, const uint8_t
// Packet
btstack_slip_encoder_start(packet, packet_size);
while (btstack_slip_encoder_has_data()){
slip_outgoing_buffer[pos++] = btstack_slip_encoder_get_byte();
}
// Start of Frame
slip_outgoing_buffer[pos++] = BTSTACK_SLIP_SOF;
uart_write_active = 1;
btstack_uart->send_block(slip_outgoing_buffer, pos);
// Fill rest of chunk from packet and send
hci_transport_slip_encode_chunk_and_send(pos);
}
// SLIP Incoming
@ -235,6 +270,11 @@ static void hci_transport_link_send_wakeup(void){
hci_transport_link_send_control(link_control_wakeup, sizeof(link_control_wakeup));
}
static void hci_transport_link_send_sleep(void){
log_info("link: send sleep");
hci_transport_link_send_control(link_control_sleep, sizeof(link_control_sleep));
}
static void hci_transport_link_send_queued_packet(void){
log_info("hci_transport_link_send_queued_packet: seq %u, ack %u, size %u", link_seq_nr, link_ack_nr, hci_packet_size);
log_info_hexdump(hci_packet, hci_packet_size);
@ -242,6 +282,9 @@ static void hci_transport_link_send_queued_packet(void){
uint8_t header[4];
hci_transport_link_calc_header(header, link_seq_nr, link_ack_nr, 0, 1, hci_packet_type, hci_packet_size);
hci_transport_slip_send_frame(header, hci_packet, hci_packet_size);
// reset inactvitiy timer
hci_transport_inactivity_timer_set();
}
static void hci_transport_link_send_ack_packet(void){
@ -253,7 +296,7 @@ static void hci_transport_link_send_ack_packet(void){
static void hci_transport_link_run(void){
// exit if outgoing active
if (uart_write_active) return;
if (slip_write_active) return;
// process queued requests
if (hci_transport_link_actions & HCI_TRANSPORT_LINK_SEND_SYNC){
@ -298,6 +341,13 @@ static void hci_transport_link_run(void){
hci_transport_link_send_ack_packet();
return;
}
if (hci_transport_link_actions & HCI_TRANSPORT_LINK_SEND_SLEEP){
hci_transport_link_actions &= ~HCI_TRANSPORT_LINK_SEND_SLEEP;
hci_transport_link_actions |= HCI_TRANSPORT_LINK_ENTER_SLEEP;
link_peer_asleep = 1;
hci_transport_link_send_sleep();
return;
}
}
static void hci_transport_link_set_timer(uint16_t timeout_ms){
@ -434,7 +484,7 @@ static void hci_transport_h5_process_frame(uint16_t frame_size){
log_info("link: received sync");
hci_transport_link_actions |= HCI_TRANSPORT_LINK_SEND_SYNC_RESPONSE;
}
if (memcmp(slip_payload, link_control_config, sizeof(link_control_config)) == 0){
if (memcmp(slip_payload, link_control_config, link_control_config_prefix_len) == 0){
log_info("link: received config");
hci_transport_link_actions |= HCI_TRANSPORT_LINK_SEND_CONFIG_RESPONSE;
}
@ -493,7 +543,12 @@ static void hci_transport_h5_process_frame(uint16_t frame_size){
break;
}
if (memcmp(slip_payload, link_control_sleep, sizeof(link_control_sleep)) == 0){
log_info("link: received sleep message");
if (btstack_uart_sleep_mode){
log_info("link: received sleep message. Enabling UART Sleep.");
btstack_uart->set_sleep(btstack_uart_sleep_mode);
} else {
log_info("link: received sleep message. UART Sleep not supported");
}
link_peer_asleep = 1;
break;
}
@ -506,14 +561,19 @@ static void hci_transport_h5_process_frame(uint16_t frame_size){
if (memcmp(slip_payload, link_control_woken, sizeof(link_control_woken)) == 0){
log_info("link: received woken message");
link_peer_asleep = 0;
// TODO: send packet if queued....
// queued packet will be sent in hci_transport_link_run if needed
break;
}
break;
case HCI_EVENT_PACKET:
case HCI_ACL_DATA_PACKET:
case HCI_SCO_DATA_PACKET:
// seems like peer is awake
link_peer_asleep = 0;
// forward packet to stack
packet_handler(link_packet_type, slip_payload, link_payload_len);
// reset inactvitiy timer
hci_transport_inactivity_timer_set();
break;
}
@ -542,12 +602,12 @@ static void hci_transport_link_update_resend_timeout(uint32_t baudrate){
static uint8_t hci_transport_link_read_byte;
static void hci_transport_h5_read_next_byte(void){
log_info("hci_transport_h5_read_next_byte");
log_debug("h5: rx nxt");
btstack_uart->receive_block(&hci_transport_link_read_byte, 1);
}
static void hci_transport_h5_block_received(){
// log_info("slip: process 0x%02x", hci_transport_link_read_byte);
log_debug("slip: process 0x%02x", hci_transport_link_read_byte);
btstack_slip_decoder_process(hci_transport_link_read_byte);
uint16_t frame_size = btstack_slip_decoder_frame_size();
if (frame_size) {
@ -558,7 +618,27 @@ static void hci_transport_h5_block_received(){
}
static void hci_transport_h5_block_sent(void){
uart_write_active = 0;
// check if more data to send
if (btstack_slip_encoder_has_data()){
hci_transport_slip_send_next_chunk();
return;
}
// done
slip_write_active = 0;
// enter sleep mode after sending sleep message
if (hci_transport_link_actions & HCI_TRANSPORT_LINK_ENTER_SLEEP){
hci_transport_link_actions &= ~HCI_TRANSPORT_LINK_ENTER_SLEEP;
if (btstack_uart_sleep_mode){
log_info("link: sent sleep message. Enabling UART Sleep.");
btstack_uart->set_sleep(btstack_uart_sleep_mode);
} else {
log_info("link: sent sleep message. UART Sleep not supported");
}
}
hci_transport_link_run();
}
@ -591,6 +671,19 @@ static int hci_transport_h5_open(void){
return res;
}
// check if wake on RX can be used
btstack_uart_sleep_mode = BTSTACK_UART_SLEEP_OFF;
int supported_sleep_modes = 0;
if (btstack_uart->get_supported_sleep_modes){
supported_sleep_modes = btstack_uart->get_supported_sleep_modes();
}
if (supported_sleep_modes & BTSTACK_UART_SLEEP_MASK_RTS_LOW_WAKE_ON_RX_EDGE){
log_info("H5: using wake on RX");
btstack_uart_sleep_mode = BTSTACK_UART_SLEEP_RTS_LOW_WAKE_ON_RX_EDGE;
} else {
log_info("H5: UART driver does not provide compatible sleep mode");
}
// setup resend timeout
hci_transport_link_update_resend_timeout(uart_config.baudrate);
@ -616,8 +709,9 @@ static void hci_transport_h5_register_packet_handler(void (*handler)(uint8_t pac
}
static int hci_transport_h5_can_send_packet_now(uint8_t packet_type){
if (hci_transport_link_have_outgoing_packet()) return 0;
return link_state == LINK_ACTIVE;
int res = !hci_transport_link_have_outgoing_packet() && link_state == LINK_ACTIVE;
// log_info("hci_transport_h5_can_send_packet_now: %u", res);
return res;
}
static int hci_transport_h5_send_packet(uint8_t packet_type, uint8_t *packet, int size){
@ -631,6 +725,10 @@ static int hci_transport_h5_send_packet(uint8_t packet_type, uint8_t *packet, in
// send wakeup first
if (link_peer_asleep){
if (btstack_uart_sleep_mode){
log_info("h5: disable UART sleep");
btstack_uart->set_sleep(BTSTACK_UART_SLEEP_OFF);
}
hci_transport_link_actions |= HCI_TRANSPORT_LINK_SEND_WAKEUP;
hci_transport_link_set_timer(LINK_WAKEUP_MS);
} else {
@ -682,3 +780,7 @@ const hci_transport_t * hci_transport_h5_instance(const btstack_uart_block_t * u
btstack_uart = uart_driver;
return &hci_transport_h5;
}
void hci_transport_h5_set_auto_sleep(uint16_t inactivity_timeout_ms){
link_inactivity_timeout_ms = inactivity_timeout_ms;
}

View File

@ -82,7 +82,7 @@ static void l2cap_emit_channel_closed(l2cap_channel_t *channel);
static void l2cap_emit_connection_request(l2cap_channel_t *channel);
static int l2cap_channel_ready_for_open(l2cap_channel_t *channel);
static void l2cap_hci_event_handler(uint8_t packet_type, uint16_t channel, uint8_t *packet, uint16_t size);
static void l2cap_acl_handler(uint8_t packet_type, uint8_t *packet, uint16_t size );
static void l2cap_acl_handler(uint8_t packet_type, uint16_t channel, uint8_t *packet, uint16_t size );
static void l2cap_notify_channel_can_send(void);
typedef struct l2cap_fixed_channel {
@ -576,7 +576,7 @@ static void l2cap_run(void){
case 3: { // Fixed Channels Supported
uint8_t map[8];
memset(map, 0, 8);
map[0] = 0x01; // L2CAP Signaling Channel (0x01) + Connectionless reception (0x02)
map[0] = 0x06; // L2CAP Signaling Channel (0x02) + Connectionless reception (0x04)
l2cap_send_signaling_packet(handle, INFORMATION_RESPONSE, sig_id, infoType, 0, sizeof(map), &map);
break;
}
@ -1381,7 +1381,7 @@ static void l2cap_signaling_handler_dispatch( hci_con_handle_t handle, uint8_t *
}
}
static void l2cap_acl_handler(uint8_t packet_type, uint8_t *packet, uint16_t size ){
static void l2cap_acl_handler(uint8_t packet_type, uint16_t channel, uint8_t *packet, uint16_t size ){
// Get Channel ID
uint16_t channel_id = READ_L2CAP_CHANNEL_ID(packet);
@ -1487,9 +1487,9 @@ static void l2cap_acl_handler(uint8_t packet_type, uint8_t *packet, uint16_t siz
default: {
// Find channel for this channel_id and connection handle
l2cap_channel_t * channel = l2cap_get_channel_for_local_cid(channel_id);
if (channel) {
l2cap_dispatch_to_channel(channel, L2CAP_DATA_PACKET, &packet[COMPLETE_L2CAP_HEADER], size-COMPLETE_L2CAP_HEADER);
l2cap_channel_t * l2cap_channel = l2cap_get_channel_for_local_cid(channel_id);
if (l2cap_channel) {
l2cap_dispatch_to_channel(l2cap_channel, L2CAP_DATA_PACKET, &packet[COMPLETE_L2CAP_HEADER], size-COMPLETE_L2CAP_HEADER);
}
break;
}
@ -1499,7 +1499,7 @@ static void l2cap_acl_handler(uint8_t packet_type, uint8_t *packet, uint16_t siz
}
// finalize closed channel - l2cap_handle_disconnect_request & DISCONNECTION_RESPONSE
void l2cap_finialize_channel_close(l2cap_channel_t *channel){
void l2cap_finialize_channel_close(l2cap_channel_t * channel){
channel->state = L2CAP_STATE_CLOSED;
l2cap_emit_channel_closed(channel);
// discard channel

View File

@ -132,7 +132,7 @@ bool nameHasPrefix(const char * name_prefix, uint16_t data_length, uint8_t * dat
for (ad_iterator_init(&context, data_length, data) ; ad_iterator_has_more(&context) ; ad_iterator_next(&context)){
uint8_t data_type = ad_iterator_get_data_type(&context);
uint8_t data_len = ad_iterator_get_data_len(&context);
uint8_t * data = ad_iterator_get_data(&context);
const uint8_t * data = ad_iterator_get_data(&context);
int compare_len = name_prefix_len;
switch(data_type){
case 8: // shortented local name
@ -172,7 +172,7 @@ TEST(ADParser, TestDataParsing){
for (ad_iterator_init(&context, ad_len, ad_data) ; ad_iterator_has_more(&context) ; ad_iterator_next(&context)){
uint8_t data_type = ad_iterator_get_data_type(&context);
uint8_t data_len = ad_iterator_get_data_len(&context);
uint8_t * data = ad_iterator_get_data(&context);
const uint8_t * data = ad_iterator_get_data(&context);
CHECK_EQUAL(expected_len[i], data_len);
CHECK_EQUAL(expected_type[i], data_type);

View File

@ -346,7 +346,8 @@ static void simulate_test_sequence(hfp_test_item_t * test_item){
}
}
void packet_handler(uint8_t * event, uint16_t event_size){
void packet_handler(uint8_t packet_type, uint16_t channel, uint8_t * event, uint16_t event_size){
if (event[0] != HCI_EVENT_HFP_META) return;
if (event[3]

View File

@ -391,7 +391,7 @@ void simulate_test_sequence(hfp_test_item_t * test_item){
}
}
void packet_handler(uint8_t * event, uint16_t event_size){
void packet_handler(uint8_t packet_type, uint16_t channel, uint8_t * event, uint16_t event_size){
if (event[0] != HCI_EVENT_HFP_META) return;
switch (event[2]) {

View File

@ -570,7 +570,7 @@ static void stdin_process(btstack_data_source_t *ds, btstack_data_source_callbac
}
static void packet_handler(uint8_t * event, uint16_t event_size){
static void packet_handler(uint8_t packet_type, uint16_t channel, uint8_t * event, uint16_t event_size){
switch (event[0]){
case HCI_EVENT_INQUIRY_RESULT:
case HCI_EVENT_INQUIRY_RESULT_WITH_RSSI:

View File

@ -462,7 +462,7 @@ static void stdin_process(btstack_data_source_t *ds, btstack_data_source_callbac
}
static void packet_handler(uint8_t * event, uint16_t event_size){
static void packet_handler(uint8_t packet_type, uint16_t channel, uint8_t * event, uint16_t event_size){
if (event[0] != HCI_EVENT_HFP_META) return;
switch (event[2]) {

View File

@ -154,7 +154,7 @@ static void stdin_process(btstack_data_source_t *ds, btstack_data_source_callbac
}
// Audio Gateway routines
static void packet_handler(uint8_t * event, uint16_t event_size){
static void packet_handler(uint8_t packet_type, uint16_t channel, uint8_t * event, uint16_t event_size){
switch (event[2]) {
case HSP_SUBEVENT_AUDIO_CONNECTION_COMPLETE:
if (event[3] == 0){

View File

@ -159,7 +159,7 @@ static void stdin_process(btstack_data_source_t *ds, btstack_data_source_callbac
}
}
static void packet_handler(uint8_t * event, uint16_t event_size){
static void packet_handler(uint8_t packet_type, uint16_t channel, uint8_t * event, uint16_t event_size){
// printf("Packet handler event 0x%02x\n", event[0]);
switch (event[0]) {
case BTSTACK_EVENT_STATE: