mirror of
https://github.com/bluekitchen/btstack.git
synced 2024-12-27 12:22:38 +00:00
platform/daemon: avoid HCI_EVENT_IS_COMMAND_COMPLETE macro
This commit is contained in:
parent
ae46c388c2
commit
db09c08d74
@ -135,13 +135,13 @@ static void packet_handler(uint8_t packet_type, uint16_t channel, uint8_t *packe
|
||||
case W4_INQUIRY_MODE_COMPLETE:
|
||||
switch(event){
|
||||
case HCI_EVENT_COMMAND_COMPLETE:
|
||||
if (HCI_EVENT_IS_COMMAND_COMPLETE(packet, hci_write_inquiry_mode)) {
|
||||
if (hci_event_command_complete_get_command_opcode(packet) == HCI_OPCODE_HCI_WRITE_INQUIRY_MODE){
|
||||
start_scan();
|
||||
state = ACTIVE;
|
||||
}
|
||||
break;
|
||||
case HCI_EVENT_COMMAND_STATUS:
|
||||
if (HCI_EVENT_IS_COMMAND_STATUS(packet, hci_write_inquiry_mode)) {
|
||||
if (hci_event_command_complete_get_command_opcode(packet) == HCI_OPCODE_HCI_WRITE_INQUIRY_MODE){
|
||||
printf("Ignoring error (0x%x) from hci_write_inquiry_mode.\n", packet[2]);
|
||||
start_scan();
|
||||
state = ACTIVE;
|
||||
|
@ -191,7 +191,7 @@ void packet_handler(uint8_t packet_type, uint16_t channel, uint8_t *packet, uint
|
||||
break;
|
||||
|
||||
case HCI_EVENT_COMMAND_COMPLETE:
|
||||
if (HCI_EVENT_IS_COMMAND_COMPLETE(packet, hci_write_class_of_device)) {
|
||||
if (hci_event_command_complete_get_command_opcode(packet) == HCI_OPCODE_HCI_WRITE_CLASS_OF_DEVICE){
|
||||
printf("Ready\n");
|
||||
}
|
||||
default:
|
||||
|
@ -124,7 +124,7 @@ void packet_handler(uint8_t packet_type, uint16_t channel, uint8_t *packet, uint
|
||||
|
||||
case HCI_EVENT_COMMAND_COMPLETE:
|
||||
// use pairing yes/no
|
||||
if (HCI_EVENT_IS_COMMAND_COMPLETE(packet, hci_write_class_of_device)) {
|
||||
if (hci_event_command_complete_get_command_opcode(packet) == HCI_OPCODE_HCI_WRITE_CLASS_OF_DEVICE){
|
||||
bt_send_cmd(&l2cap_create_channel_mtu_cmd, addr, PSM_TEST, PACKET_SIZE);
|
||||
}
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user