mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-02-21 21:41:13 +00:00
example: avoid HCI_EVENT_IS_COMMAND_COMPLETE macro
This commit is contained in:
parent
c70df5f87e
commit
98318a9712
@ -463,13 +463,14 @@ static void packet_handler(uint8_t packet_type, uint16_t channel, uint8_t * even
|
||||
switch (packet_type){
|
||||
case HCI_EVENT_PACKET:
|
||||
switch(hci_event_packet_get_type(event)){
|
||||
#ifndef HAVE_BTSTACK_STDIN
|
||||
case BTSTACK_EVENT_STATE:
|
||||
if (btstack_event_state_get_state(event) != HCI_STATE_WORKING) break;
|
||||
dump_supported_codecs();
|
||||
#ifndef HAVE_BTSTACK_STDIN
|
||||
printf("Establish HFP AG service level connection to %s...\n", bd_addr_to_str(device_addr));
|
||||
hfp_ag_establish_service_level_connection(device_addr);
|
||||
break;
|
||||
#endif
|
||||
break;
|
||||
case GAP_EVENT_INQUIRY_RESULT:
|
||||
gap_event_inquiry_result_get_bd_addr(event, addr);
|
||||
// print info
|
||||
@ -493,11 +494,6 @@ static void packet_handler(uint8_t packet_type, uint16_t channel, uint8_t * even
|
||||
case HCI_EVENT_SCO_CAN_SEND_NOW:
|
||||
sco_demo_send(sco_handle);
|
||||
break;
|
||||
case HCI_EVENT_COMMAND_COMPLETE:
|
||||
if (HCI_EVENT_IS_COMMAND_COMPLETE(event, hci_read_local_supported_features)){
|
||||
dump_supported_codecs();
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
@ -462,16 +462,15 @@ static void packet_handler(uint8_t packet_type, uint16_t channel, uint8_t * even
|
||||
|
||||
case HCI_EVENT_PACKET:
|
||||
switch (hci_event_packet_get_type(event)){
|
||||
case BTSTACK_EVENT_STATE:
|
||||
if (btstack_event_state_get_state(event) != HCI_STATE_WORKING) break;
|
||||
dump_supported_codecs();
|
||||
break;
|
||||
|
||||
case HCI_EVENT_SCO_CAN_SEND_NOW:
|
||||
sco_demo_send(sco_handle);
|
||||
break;
|
||||
|
||||
case HCI_EVENT_COMMAND_COMPLETE:
|
||||
if (HCI_EVENT_IS_COMMAND_COMPLETE(event, hci_read_local_supported_features)){
|
||||
dump_supported_codecs();
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
case HCI_EVENT_HFP_META:
|
||||
switch (hci_event_hfp_meta_get_subevent_code(event)) {
|
||||
case HFP_SUBEVENT_SERVICE_LEVEL_CONNECTION_ESTABLISHED:
|
||||
|
Loading…
x
Reference in New Issue
Block a user