diff --git a/port/archive/ez430-rf2560/example/spp_accel.c b/port/archive/ez430-rf2560/example/spp_accel.c index ad8879a75..a8b45d0d1 100644 --- a/port/archive/ez430-rf2560/example/spp_accel.c +++ b/port/archive/ez430-rf2560/example/spp_accel.c @@ -139,7 +139,7 @@ static void packet_handler (uint8_t packet_type, uint16_t channel, uint8_t *pack break; case HCI_EVENT_COMMAND_COMPLETE: - if (HCI_EVENT_IS_COMMAND_COMPLETE(packet, hci_read_bd_addr)){ + if (hci_event_command_complete_get_command_opcode(packet) == HCI_OPCODE_HCI_READ_BD_ADDR) { reverse_bd_addr(&packet[6], event_addr); printf("BD-ADDR: %s\n\r", bd_addr_to_str(event_addr)); break; diff --git a/port/archive/ez430-rf2560/src/main.c b/port/archive/ez430-rf2560/src/main.c index e6373d392..00755873d 100644 --- a/port/archive/ez430-rf2560/src/main.c +++ b/port/archive/ez430-rf2560/src/main.c @@ -84,7 +84,7 @@ static void packet_handler (uint8_t packet_type, uint16_t channel, uint8_t *pack printf("BTstack up and running.\n"); break; case HCI_EVENT_COMMAND_COMPLETE: - if (HCI_EVENT_IS_COMMAND_COMPLETE(packet, hci_read_local_version_information)){ + if (hci_event_command_complete_get_command_opcode(packet) == HCI_OPCODE_HCI_READ_LOCAL_VERSION_INFORMATION){ uint16_t manufacturer = little_endian_read_16(packet, 10); uint16_t lmp_subversion = little_endian_read_16(packet, 12); // assert manufacturer is TI diff --git a/port/archive/msp-exp430f5438-cc2564b/example/ble_server.c b/port/archive/msp-exp430f5438-cc2564b/example/ble_server.c index cc88256d0..3fe48023e 100644 --- a/port/archive/msp-exp430f5438-cc2564b/example/ble_server.c +++ b/port/archive/msp-exp430f5438-cc2564b/example/ble_server.c @@ -127,16 +127,16 @@ static void app_packet_handler (uint8_t packet_type, uint16_t channel, uint8_t * break; case HCI_EVENT_COMMAND_COMPLETE: - if (HCI_EVENT_IS_COMMAND_COMPLETE(packet, hci_read_bd_addr)){ + if (hci_event_command_complete_get_command_opcode(packet) == HCI_OPCODE_HCI_READ_BD_ADDR) { reverse_bd_addr(&packet[6], addr); printf("BD ADDR: %s\n", bd_addr_to_str(addr)); break; } - if (HCI_EVENT_IS_COMMAND_COMPLETE(packet, hci_le_set_advertising_data)){ + if (hci_event_command_complete_get_command_opcode(packet) == HCI_OPCODE_HCI_LE_SET_ADVERTISING_DATA) { hci_send_cmd(&hci_le_set_scan_response_data, 10, adv_data); break; } - if (HCI_EVENT_IS_COMMAND_COMPLETE(packet, hci_le_set_scan_response_data)){ + if (hci_event_command_complete_get_command_opcode(packet) == HCI_OPCODE_HCI_LE_SET_SCAN_RESPONSE_DATA) { hci_send_cmd(&hci_le_set_advertise_enable, 1); break; } diff --git a/port/archive/msp-exp430f5438-cc2564b/example/hid_demo.c b/port/archive/msp-exp430f5438-cc2564b/example/hid_demo.c index 5e826db0b..d06df82e9 100644 --- a/port/archive/msp-exp430f5438-cc2564b/example/hid_demo.c +++ b/port/archive/msp-exp430f5438-cc2564b/example/hid_demo.c @@ -335,7 +335,7 @@ static void packet_handler (uint8_t packet_type, uint16_t channel, uint8_t *pack break; case HCI_EVENT_COMMAND_COMPLETE: - if (HCI_EVENT_IS_COMMAND_COMPLETE(packet, hci_inquiry_cancel)) { + if (hci_event_command_complete_get_command_opcode(packet) == HCI_OPCODE_HCI_INQUIRY_CANCEL){ // inq successfully cancelled // printLine("Connecting"); l2cap_create_channel(l2cap_packet_handler, keyboard, PSM_HID_INTERRUPT, 150); diff --git a/port/archive/msp-exp430f5438-cc2564b/example/spp_accel.c b/port/archive/msp-exp430f5438-cc2564b/example/spp_accel.c index b28bc79df..de4aba5be 100644 --- a/port/archive/msp-exp430f5438-cc2564b/example/spp_accel.c +++ b/port/archive/msp-exp430f5438-cc2564b/example/spp_accel.c @@ -140,7 +140,7 @@ static void packet_handler (uint8_t packet_type, uint16_t channel, uint8_t *pack break; case HCI_EVENT_COMMAND_COMPLETE: - if (HCI_EVENT_IS_COMMAND_COMPLETE(packet, hci_read_bd_addr)){ + if (hci_event_command_complete_get_command_opcode(packet) == HCI_OPCODE_HCI_READ_BD_ADDR) { reverse_bd_addr(&packet[6], event_addr); printf("BD-ADDR: %s\n\r", bd_addr_to_str(event_addr)); break; diff --git a/port/archive/msp-exp430f5438-cc2564b/src/main.c b/port/archive/msp-exp430f5438-cc2564b/src/main.c index ce1c374be..2102b8c57 100644 --- a/port/archive/msp-exp430f5438-cc2564b/src/main.c +++ b/port/archive/msp-exp430f5438-cc2564b/src/main.c @@ -103,7 +103,7 @@ static void packet_handler (uint8_t packet_type, uint16_t channel, uint8_t *pack printf("BTstack up and running.\n"); break; case HCI_EVENT_COMMAND_COMPLETE: - if (HCI_EVENT_IS_COMMAND_COMPLETE(packet, hci_read_local_version_information)){ + if (hci_event_command_complete_get_command_opcode(packet) == HCI_OPCODE_HCI_READ_LOCAL_VERSION_INFORMATION){ uint16_t manufacturer = little_endian_read_16(packet, 10); uint16_t lmp_subversion = little_endian_read_16(packet, 12); // assert manufacturer is TI diff --git a/port/archive/msp430f5229lp-cc2564b/example/ble_server.c b/port/archive/msp430f5229lp-cc2564b/example/ble_server.c index 197bb5388..8b40dfa94 100644 --- a/port/archive/msp430f5229lp-cc2564b/example/ble_server.c +++ b/port/archive/msp430f5229lp-cc2564b/example/ble_server.c @@ -103,16 +103,16 @@ static void app_packet_handler (uint8_t packet_type, uint16_t channel, uint8_t * break; case HCI_EVENT_COMMAND_COMPLETE: - if (HCI_EVENT_IS_COMMAND_COMPLETE(packet, hci_read_bd_addr)){ + if (hci_event_command_complete_get_command_opcode(packet) == HCI_OPCODE_HCI_READ_BD_ADDR) { reverse_bd_addr(&packet[6], addr); printf("BD ADDR: %s\n", bd_addr_to_str(addr)); break; } - if (HCI_EVENT_IS_COMMAND_COMPLETE(packet, hci_le_set_advertising_data)){ + if (hci_event_command_complete_get_command_opcode(packet) == HCI_HCI_OPCODE_HCI_LE_SET_ADVERTISING_DATA) { hci_send_cmd(&hci_le_set_scan_response_data, 10, adv_data); break; } - if (HCI_EVENT_IS_COMMAND_COMPLETE(packet, hci_le_set_scan_response_data)){ + if (hci_event_command_complete_get_command_opcode(packet) == HCI_HCI_OPCODE_HCI_LE_SET_SCAN_RESPONSE_DATA) { hci_send_cmd(&hci_le_set_advertise_enable, 1); break; } diff --git a/port/archive/msp430f5229lp-cc2564b/src/main.c b/port/archive/msp430f5229lp-cc2564b/src/main.c index 3a6c211ab..25cd01512 100644 --- a/port/archive/msp430f5229lp-cc2564b/src/main.c +++ b/port/archive/msp430f5229lp-cc2564b/src/main.c @@ -107,7 +107,7 @@ static void packet_handler (uint8_t packet_type, uint16_t channel, uint8_t *pack printf("BTstack up and running.\n"); break; case HCI_EVENT_COMMAND_COMPLETE: - if (HCI_EVENT_IS_COMMAND_COMPLETE(packet, hci_read_local_version_information)){ + if (hci_event_command_complete_get_command_opcode(packet) == HCI_OPCODE_HCI_READ_LOCAL_VERSION_INFORMATION){ uint16_t manufacturer = little_endian_read_16(packet, 10); uint16_t lmp_subversion = little_endian_read_16(packet, 12); // assert manufacturer is TI diff --git a/port/esp32/components/btstack/btstack_port_esp32.c b/port/esp32/components/btstack/btstack_port_esp32.c index 0cb02bbda..0e85f563b 100644 --- a/port/esp32/components/btstack/btstack_port_esp32.c +++ b/port/esp32/components/btstack/btstack_port_esp32.c @@ -361,7 +361,7 @@ static void packet_handler (uint8_t packet_type, uint16_t channel, uint8_t *pack } break; case HCI_EVENT_COMMAND_COMPLETE: - if (HCI_EVENT_IS_COMMAND_COMPLETE(packet, hci_read_local_version_information)){ + if (hci_event_command_complete_get_command_opcode(packet) == HCI_OPCODE_HCI_READ_LOCAL_VERSION_INFORMATION){ // @TODO } break; diff --git a/port/libusb/main.c b/port/libusb/main.c index 434a0a49d..278403e44 100644 --- a/port/libusb/main.c +++ b/port/libusb/main.c @@ -180,7 +180,7 @@ static void packet_handler (uint8_t packet_type, uint16_t channel, uint8_t *pack } break; case HCI_EVENT_COMMAND_COMPLETE: - if (HCI_EVENT_IS_COMMAND_COMPLETE(packet, hci_read_local_version_information)){ + if (hci_event_command_complete_get_command_opcode(packet) == HCI_OPCODE_HCI_READ_LOCAL_VERSION_INFORMATION){ local_version_information_handler(packet); } if (memcmp(packet, read_static_address_command_complete_prefix, sizeof(read_static_address_command_complete_prefix)) == 0){ diff --git a/port/msp432p401lp-cc256x/main.c b/port/msp432p401lp-cc256x/main.c index b5cc36457..1825b07ec 100755 --- a/port/msp432p401lp-cc256x/main.c +++ b/port/msp432p401lp-cc256x/main.c @@ -600,7 +600,7 @@ static void packet_handler (uint8_t packet_type, uint16_t channel, uint8_t *pack printf("BTstack up and running on %s.\n", bd_addr_to_str(local_addr)); break; case HCI_EVENT_COMMAND_COMPLETE: - if (HCI_EVENT_IS_COMMAND_COMPLETE(packet, hci_read_local_version_information)){ + if (hci_event_command_complete_get_command_opcode(packet) == HCI_OPCODE_HCI_READ_LOCAL_VERSION_INFORMATION){ uint16_t manufacturer = little_endian_read_16(packet, 10); uint16_t lmp_subversion = little_endian_read_16(packet, 12); // assert manufacturer is TI diff --git a/port/posix-h4/main.c b/port/posix-h4/main.c index afecd67df..445eebe40 100644 --- a/port/posix-h4/main.c +++ b/port/posix-h4/main.c @@ -134,7 +134,7 @@ static void packet_handler (uint8_t packet_type, uint16_t channel, uint8_t *pack } break; case HCI_EVENT_COMMAND_COMPLETE: - if (HCI_EVENT_IS_COMMAND_COMPLETE(packet, hci_read_local_name)){ + if (hci_event_command_complete_get_command_opcode(packet) == HCI_OPCODE_HCI_READ_LOCAL_NAME){ if (hci_event_command_complete_get_return_parameters(packet)[0]) break; // terminate, name 248 chars packet[6+248] = 0; @@ -143,7 +143,7 @@ static void packet_handler (uint8_t packet_type, uint16_t channel, uint8_t *pack btstack_chipset_bcm_set_device_name((const char *)&packet[6]); } } - if (HCI_EVENT_IS_COMMAND_COMPLETE(packet, hci_read_local_version_information)){ + if (hci_event_command_complete_get_command_opcode(packet) == HCI_OPCODE_HCI_READ_LOCAL_VERSION_INFORMATION){ local_version_information_handler(packet); } break; diff --git a/port/posix-h5/main.c b/port/posix-h5/main.c index 039f954b7..9bfe63f63 100644 --- a/port/posix-h5/main.c +++ b/port/posix-h5/main.c @@ -182,13 +182,13 @@ static void packet_handler (uint8_t packet_type, uint16_t channel, uint8_t *pack } break; case HCI_EVENT_COMMAND_COMPLETE: - if (HCI_EVENT_IS_COMMAND_COMPLETE(packet, hci_read_local_name)){ + if (hci_event_command_complete_get_command_opcode(packet) == HCI_OPCODE_HCI_READ_LOCAL_NAME){ if (hci_event_command_complete_get_return_parameters(packet)[0]) break; // terminate, name 248 chars packet[6+248] = 0; printf("Local name: %s\n", &packet[6]); } - if (HCI_EVENT_IS_COMMAND_COMPLETE(packet, hci_read_local_version_information)){ + if (hci_event_command_complete_get_command_opcode(packet) == HCI_OPCODE_HCI_READ_LOCAL_VERSION_INFORMATION){ local_version_information_handler(packet); } break; diff --git a/port/qt-h4/main.cpp b/port/qt-h4/main.cpp index acd791217..aa1b5dd04 100644 --- a/port/qt-h4/main.cpp +++ b/port/qt-h4/main.cpp @@ -210,7 +210,7 @@ static void packet_handler (uint8_t packet_type, uint16_t channel, uint8_t *pack } break; case HCI_EVENT_COMMAND_COMPLETE: - if (HCI_EVENT_IS_COMMAND_COMPLETE(packet, hci_read_local_name)){ + if (hci_event_command_complete_get_command_opcode(packet) == HCI_OPCODE_HCI_READ_LOCAL_NAME){ if (hci_event_command_complete_get_return_parameters(packet)[0]) break; // terminate, name 248 chars packet[6+248] = 0; @@ -219,7 +219,7 @@ static void packet_handler (uint8_t packet_type, uint16_t channel, uint8_t *pack btstack_chipset_bcm_set_device_name((const char *)&packet[6]); } } - if (HCI_EVENT_IS_COMMAND_COMPLETE(packet, hci_read_local_version_information)){ + if (hci_event_command_complete_get_command_opcode(packet) == HCI_OPCODE_HCI_READ_LOCAL_VERSION_INFORMATION){ local_version_information_handler(packet); } break; diff --git a/port/qt-usb/main.cpp b/port/qt-usb/main.cpp index 99c3a0b06..8a2696dcb 100644 --- a/port/qt-usb/main.cpp +++ b/port/qt-usb/main.cpp @@ -154,7 +154,7 @@ static void packet_handler (uint8_t packet_type, uint16_t channel, uint8_t *pack } break; case HCI_EVENT_COMMAND_COMPLETE: - if (HCI_EVENT_IS_COMMAND_COMPLETE(packet, hci_read_local_version_information)){ + if (hci_event_command_complete_get_command_opcode(packet) == HCI_OPCODE_HCI_READ_LOCAL_VERSION_INFORMATION){ local_version_information_handler(packet); } if (memcmp(packet, read_static_address_command_complete_prefix, sizeof(read_static_address_command_complete_prefix)) == 0){ diff --git a/port/raspi/main.c b/port/raspi/main.c index 21090b909..a8eac092d 100644 --- a/port/raspi/main.c +++ b/port/raspi/main.c @@ -233,7 +233,7 @@ static void packet_handler (uint8_t packet_type, uint16_t channel, uint8_t *pack } break; case HCI_EVENT_COMMAND_COMPLETE: - if (HCI_EVENT_IS_COMMAND_COMPLETE(packet, hci_read_local_name)){ + if (hci_event_command_complete_get_command_opcode(packet) == HCI_OPCODE_HCI_READ_LOCAL_NAME){ if (hci_event_command_complete_get_return_parameters(packet)[0]) break; // terminate, name 248 chars packet[6+248] = 0; diff --git a/port/renesas-tb-s1ja-cc256x/template/btstack_example/src/hal_entry.c b/port/renesas-tb-s1ja-cc256x/template/btstack_example/src/hal_entry.c index 3091b080c..fb52b1bda 100644 --- a/port/renesas-tb-s1ja-cc256x/template/btstack_example/src/hal_entry.c +++ b/port/renesas-tb-s1ja-cc256x/template/btstack_example/src/hal_entry.c @@ -218,7 +218,7 @@ static void packet_handler (uint8_t packet_type, uint16_t channel, uint8_t *pack printf("BTstack up and running on %s.\n", bd_addr_to_str(local_addr)); break; case HCI_EVENT_COMMAND_COMPLETE: - if (HCI_EVENT_IS_COMMAND_COMPLETE(packet, hci_read_local_version_information)){ + if (hci_event_command_complete_get_command_opcode(packet) == HCI_OPCODE_HCI_READ_LOCAL_VERSION_INFORMATION){ uint16_t manufacturer = little_endian_read_16(packet, 10); uint16_t lmp_subversion = little_endian_read_16(packet, 12); // assert manufacturer is TI diff --git a/port/stm32-f4discovery-cc256x/port/port.c b/port/stm32-f4discovery-cc256x/port/port.c index 5183e0752..d5b1b764b 100644 --- a/port/stm32-f4discovery-cc256x/port/port.c +++ b/port/stm32-f4discovery-cc256x/port/port.c @@ -281,7 +281,7 @@ static void packet_handler (uint8_t packet_type, uint16_t channel, uint8_t *pack printf("BTstack up and running on %s.\n", bd_addr_to_str(local_addr)); break; case HCI_EVENT_COMMAND_COMPLETE: - if (HCI_EVENT_IS_COMMAND_COMPLETE(packet, hci_read_local_version_information)){ + if (hci_event_command_complete_get_command_opcode(packet) == HCI_OPCODE_HCI_READ_LOCAL_VERSION_INFORMATION){ uint16_t manufacturer = little_endian_read_16(packet, 10); uint16_t lmp_subversion = little_endian_read_16(packet, 12); // assert manufacturer is TI diff --git a/port/windows-h4/main.c b/port/windows-h4/main.c index ca0d3bfc2..ac1dddab2 100644 --- a/port/windows-h4/main.c +++ b/port/windows-h4/main.c @@ -138,7 +138,7 @@ static void packet_handler (uint8_t packet_type, uint16_t channel, uint8_t *pack } break; case HCI_EVENT_COMMAND_COMPLETE: - if (HCI_EVENT_IS_COMMAND_COMPLETE(packet, hci_read_local_name)){ + if (hci_event_command_complete_get_command_opcode(packet) == HCI_OPCODE_HCI_READ_LOCAL_NAME){ if (hci_event_command_complete_get_return_parameters(packet)[0]) break; // terminate, name 248 chars packet[6+248] = 0; @@ -147,7 +147,7 @@ static void packet_handler (uint8_t packet_type, uint16_t channel, uint8_t *pack btstack_chipset_bcm_set_device_name((const char *)&packet[6]); } } - if (HCI_EVENT_IS_COMMAND_COMPLETE(packet, hci_read_local_version_information)){ + if (hci_event_command_complete_get_command_opcode(packet) == HCI_OPCODE_HCI_READ_LOCAL_VERSION_INFORMATION){ local_version_information_handler(packet); } break;