platform/daemon: avoid HCI_EVENT_IS_COMMAND_COMPLETE macro

This commit is contained in:
Matthias Ringwald 2022-05-09 21:47:14 +02:00
parent ae46c388c2
commit db09c08d74
3 changed files with 4 additions and 4 deletions

View File

@ -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;

View File

@ -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:

View File

@ -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;