1 /******************************************************************************* 2 * @file rsi_bt_common.h 3 ******************************************************************************* 4 * # License 5 * <b>Copyright 2024 Silicon Laboratories Inc. www.silabs.com</b> 6 ******************************************************************************* 7 * 8 * SPDX-License-Identifier: Zlib 9 * 10 * The licensor of this software is Silicon Laboratories Inc. 11 * 12 * This software is provided 'as-is', without any express or implied 13 * warranty. In no event will the authors be held liable for any damages 14 * arising from the use of this software. 15 * 16 * Permission is granted to anyone to use this software for any purpose, 17 * including commercial applications, and to alter it and redistribute it 18 * freely, subject to the following restrictions: 19 * 20 * 1. The origin of this software must not be misrepresented; you must not 21 * claim that you wrote the original software. If you use this software 22 * in a product, an acknowledgment in the product documentation would be 23 * appreciated but is not required. 24 * 2. Altered source versions must be plainly marked as such, and must not be 25 * misrepresented as being the original software. 26 * 3. This notice may not be removed or altered from any source distribution. 27 * 28 ******************************************************************************/ 29 30 #ifndef RSI_BT_COMMON_H 31 #define RSI_BT_COMMON_H 32 33 #include "sl_si91x_types.h" 34 35 #include "cmsis_os2.h" 36 37 /****************************************************** 38 * * Macros 39 * ******************************************************/ 40 /** @addtogroup BT_BLE_CONSTANTS 41 * @{ 42 */ 43 44 /// Specifies that packet type is Bluetooth HCI command packet. 45 #define RSI_BT_HCI_CMD_PKT 0x1 46 /// Represents the HCI ACL packet type. 47 #define RSI_BT_HCI_ACL_PKT 0x2 48 /// Specifies the number of packets that can be sent per HCI command. 49 #define RSI_BT_HCI_PER_CMD_PKT 0x3 50 /// Indicates dual mode operation in Bluetooth. 51 #define RSI_BT_DUAL_MODE 0x8 52 /// This macro is used to enable the Bluetooth Low Energy (BLE) protocol. 53 #define BLE_PROTO_ENABLE BIT(2) 54 /// This macro is used to enable the Bluetooth Classic protocol. 55 #define BT_CLASSIC_PROTO_ENABLE BIT(3) 56 /// This macro is used to enable the proprietary protocol. It sets the 8th bit of the property. 57 #define PROP_PROTO_ENABLE (BIT(8)) 58 /// Enable both BLE and Classic Bluetooth protocols. 59 #define BT_DUAL_MODE_PROTO_ENABLE (BLE_PROTO_ENABLE | BT_CLASSIC_PROTO_ENABLE) 60 /// Define the bits for Bluetooth Low Energy (BLE) mode. 61 #define RSI_BT_BLE_MODE_BITS (BIT(2) | BIT(3)) 62 /// Offset of the BT status in the Bluetooth module. 63 #define RSI_BT_STATUS_OFFSET 0x0C 64 /// Offset value for the response type in the Bluetooth module. 65 #define RSI_BT_RSP_TYPE_OFFSET 0x02 66 ///Offset value for the length field in the Bluetooth response. 67 #define RSI_BT_RSP_LEN_OFFSET 0x00 68 ///Mask used to extract the response length from a Bluetooth response. 69 #define RSI_BT_RSP_LEN_MASK 0x0FFF 70 ///Protocol identifier for Bluetooth Common. 71 #define RSI_PROTO_BT_COMMON 0x01 72 ///Bluetooth protocol type for classic Bluetooth. 73 #define RSI_PROTO_BT_CLASSIC 0x02 74 ///Defines the protocol value for Bluetooth Low Energy (BLE). 75 #define RSI_PROTO_BLE 0x03 76 ///Definition of the Bluetooth Low Energy (BLE) stack protocol. 77 #define RSI_PROTO_BT_BLE_STACK 0x05 78 ///The maximum length of the device name. 79 #define RSI_DEV_NAME_LEN 50 80 ///Length of the device address in bytes. 81 #define RSI_DEV_ADDR_LEN 6 82 ///Length of the Attribute Protocol (ATT) buffer for the device. 83 #define RSI_DEV_ATT_LEN 240 84 ///Defines the Bluetooth classic device type. 85 #define RSI_BT_CLASSIC_DEVICE 0x00 86 ///Defines the Bluetooth Low Energy (LE) device type. 87 #define RSI_BT_LE_DEVICE 0x01 88 ///Macro definition for an unknown Bluetooth device. The value of this macro is 0xFF. 89 #define RSI_BT_UNKWON_DEVICE 0xFF 90 ///Defines the stack mode for Bluetooth. 91 #define STACK_BT_MODE 0x01 92 ///Defines the stack mode for Bluetooth Low Energy (BLE). 93 #define STACK_BTLE_MODE 0x02 94 //RF types 95 /// Specify the external RF mode. 96 #define RSI_EXTERNAL_RF 0x00 97 /// Specify the internal RF mode. 98 #define RSI_INTERNAL_RF 0x01 99 /** 100 * @brief Defines the RF type for the Bluetooth module. 101 * 102 * This macro is used to specify the RF type for the Bluetooth module. 103 * The value `RSI_INTERNAL_RF` indicates that the module uses an internal RF. 104 * 105 * @note This macro should be defined before including this header file. 106 */ 107 #define RSI_RF_TYPE RSI_INTERNAL_RF 108 ///Maximum number of attributes supported by the Bluetooth module. 109 #define RSI_MAX_ATT 5 110 /** 111 * @brief Defines the operating mode for WLAN and Bluetooth dual mode. 112 * 113 * This macro is used to specify the operating mode for WLAN and Bluetooth dual mode. 114 * The value 9 represents the dual mode operation. 115 */ 116 #define RSI_OPERMODE_WLAN_BT_DUAL_MODE 9 117 /// Bluetooth state indicating none. 118 #define RSI_BT_STATE_NONE 0 119 ///Defines the state value indicating that the Bluetooth operation mode is done. 120 #define RSI_BT_STATE_OPERMODE_DONE 1 121 ///Mask to extract the lower nibble of a byte. 122 #define LOWERNIBBLE 0x0F 123 /** @} */ 124 /****************************************************** 125 * * Constants 126 * ******************************************************/ 127 128 /****************************************************** 129 * * Type Definitions 130 * ******************************************************/ 131 /** @addtogroup BT_BLE_TYPES 132 * @{ */ 133 typedef struct rsi_ble_cb_s 134 rsi_ble_cb_t; ///< Typedef for the BLE control block structure refer \ref rsi_ble_cb_s_group for complete information of Driver BLE control block. 135 typedef struct rsi_bt_classic_cb_s rsi_bt_classic_cb_t; ///< Typedef for the Bluetooth Classic control block structure. 136 typedef struct rsi_bt_common_specific_cb_s 137 rsi_bt_common_specific_cb_t; ///< Typedef for the Bluetooth common specific control block structure. 138 typedef int32_t (*rsi_bt_get_ber_pkt_t)(uint8_t *pkt, 139 uint16_t pkt_len); ///< Typedef for a function pointer to get BER packet. 140 /** @} */ 141 /****************************************************** 142 * * Enumerations 143 * ******************************************************/ 144 145 /****************************************************** 146 * * Enumerations 147 * ******************************************************/ 148 /** @addtogroup BT_BLE_CONSTANTS 149 * @{ 150 */ 151 152 /** 153 * 154 * @brief Enumeration of Bluetooth common command requests. 155 * 156 * Defines various command requests for Bluetooth operations, including setting 157 * and getting local device information, initializing and deinitializing the 158 * device, and configuring antenna and power settings. 159 */ 160 typedef enum rsi_bt_common_cmd_request_e { 161 RSI_BT_SET_LOCAL_NAME = 0x0001, ///< Set the local device name. 162 RSI_BT_GET_LOCAL_NAME = 0x0002, ///< Get the local device name. 163 RSI_BT_GET_RSSI = 0x0005, ///< Get the Received Signal Strength Indicator (RSSI). 164 RSI_BT_GET_LOCAL_DEV_ADDR = 0x0007, ///< Get the local device address. 165 RSI_BT_REQ_INIT = 0x008D, ///< Initialize the BT classic protocol. 166 RSI_BT_REQ_DEINIT = 0x008E, ///< De-Initialize the BT classic protocol. 167 RSI_BT_SET_ANTENNA_SELECT = 0x008F, ///< Select the antenna. 168 RSI_BT_REQ_PER_CMD = 0x009A, ///< Request Packet Error Rate (PER) command. 169 RSI_BT_SET_FEATURES_BITMAP = 0x00A6, ///< Set the features bitmap. 170 RSI_BT_VENDOR_SPECIFIC = 0x00BE, ///< Vendor-specific command. 171 RSI_BT_SET_ANTENNA_TX_POWER_LEVEL = 0x00A7, ///< Set the antenna transmission power level. 172 RSI_BT_SET_GAIN_TABLE_OFFSET_OR_MAX_POWER_UPDATE = 0x012C, ///< Set gain table offset or update maximum power. 173 RSI_BT_SET_BD_ADDR_REQ = 0x012E, ///< Set the Bluetooth device address. 174 RSI_BT_GET_BT_STACK_VERSION = 0x012F, ///< Get the Bluetooth stack version. 175 176 RSI_BLE_ONLY_OPER_MODE = 0x8010, ///< Set BLE-only operation mode. 177 RSI_BLE_REQ_PWRMODE = 0x8015, ///< Request BLE power mode. 178 RSI_BLE_REQ_SOFTRESET = 0x801C ///< Request BLE soft reset. 179 } rsi_bt_common_cmd_request_t; 180 181 /** 182 * 183 * @brief Enumeration of Bluetooth common events. 184 * 185 * Defines various events for Bluetooth operations, including the event 186 * indicating that the Bluetooth card is ready. 187 */ 188 typedef enum rsi_bt_common_event_e { 189 RSI_BT_EVENT_CARD_READY = 0x0505, ///< Event indicating that the Bluetooth card is ready. 190 } rsi_bt_common_event_t; 191 192 /** 193 * 194 * @brief Enumeration of Bluetooth common command responses. 195 * 196 * Defines various command responses for Bluetooth operations, including responses 197 * for setting and querying local device information, initializing and deinitializing 198 * the device, and configuring antenna and power settings. 199 */ 200 typedef enum rsi_bt_common_cmd_resp_e { 201 RSI_BT_RSP_SET_LOCAL_NAME = 0x0001, ///< Response for setting the local device name. 202 RSI_BT_RSP_QUERY_LOCAL_NAME = 0x0002, ///< Response for querying the local device name. 203 RSI_BT_RSP_QUERY_RSSI = 0x0005, ///< Response for querying the Received Signal Strength Indicator (RSSI). 204 RSI_BT_RSP_QUERY_LOCAL_BD_ADDRESS = 0x0007, ///< Response for querying the local device address. 205 RSI_BT_RSP_INIT = 0x008D, ///< Response for initializing the BT classic protocol. 206 RSI_BT_RSP_DEINIT = 0x008E, ///< Response for deinitializing the BT classic protocol. 207 RSI_BT_RSP_ANTENNA_SELECT = 0x008F, ///< Response for selecting the antenna. 208 RSI_BT_RSP_SET_FEATURES_BITMAP = 0x00A6, ///< Response for setting the features bitmap. 209 RSI_BT_RSP_ANTENNA_TX_POWER_LEVEL = 0x00A7, ///< Response for setting the antenna transmission power level. 210 RSI_BT_RSP_SET_GAIN_TABLE_OFFSET_OR_MAX_POWER_UPDATE = 211 0x012C, ///< Response for setting gain table offset or updating maximum power. 212 RSI_BT_RSP_SET_BD_ADDR = 0x012E, ///< Response for setting the Bluetooth device address. 213 214 RSI_BLE_RSP_ONLY_OPER_MODE = 0x8010, ///< Response for setting BLE-only operation mode. 215 RSI_BLE_RSP_PWRMODE = 0x8015, ///< Response for requesting BLE power mode. 216 RSI_BLE_RSP_SOFTRESET = 0x801C ///< Response for requesting BLE soft reset. 217 } rsi_bt_common_cmd_resp_t; 218 /** @} */ 219 /****************************************************** 220 * * Structures 221 * ******************************************************/ 222 /** @addtogroup BT_BLE_TYPES 223 * @{ */ 224 /// Driver control block 225 struct rsi_driver_cb_s; 226 // Driver BT Common control block 227 /** 228 * @brief Structure representing the Bluetooth common specific callback. 229 * 230 * This structure is used to define the parameters for Bluetooth common specific callbacks, 231 * including the PER Bit Error Rate (BER) callback. 232 */ 233 struct rsi_bt_common_specific_cb_s { 234 /** PER BER Callbacks */ 235 rsi_bt_get_ber_pkt_t rsi_bt_get_ber_pkt; 236 }; 237 // Specific BT, BLE blocks 238 /** 239 * @brief Structure representing the Bluetooth global callback. 240 * 241 * This structure is used to define the parameters for Bluetooth global callbacks, 242 * including common specific callbacks, BLE specific callbacks, and BT Classic specific callbacks. 243 */ 244 typedef struct rsi_bt_global_cb_s { 245 /** BT Common specific callback */ 246 rsi_bt_common_specific_cb_t *bt_common_specific_cb; 247 /** BLE specific callback */ 248 rsi_ble_cb_t *ble_specific_cb; 249 /** BT Classic specific callback */ 250 rsi_bt_classic_cb_t *bt_specific_cb; 251 } rsi_bt_global_cb_t; 252 253 // Remote LE Device info structure 254 255 /** 256 * @brief Structure representing the remote BLE device information. 257 * 258 * This structure is used to define the parameters for storing information about a remote BLE device, 259 * including its address, buffer counts, and synchronization mechanisms. 260 */ 261 typedef struct rsi_remote_ble_info_s { 262 /** BD Address of the remote LE device */ 263 uint8_t remote_dev_bd_addr[RSI_DEV_ADDR_LEN]; 264 /** Address type of the remote LE device */ 265 uint8_t remote_dev_addr_type; 266 /** Available Buffer Count */ 267 uint8_t avail_buf_cnt; 268 /** Max Buffer Count */ 269 uint8_t max_buf_cnt; 270 /** Max Buffer Length */ 271 uint16_t max_buf_len; 272 /** Flag for dev info used or not */ 273 uint8_t used; 274 /** Flag for checking command in use */ 275 uint8_t cmd_in_use; 276 /** Flag for checking expected remote response for each procedure */ 277 uint16_t expected_resp; 278 /** Buffer config mode */ 279 uint8_t mode; 280 /** Mutex handle for avail_buf_info update */ 281 osMutexId_t ble_buff_mutex; 282 } rsi_remote_ble_info_t; 283 // Driver BT/BLE/PROP_PROTOCOL control block 284 /** 285 * @brief Structure representing the Bluetooth control block. 286 * 287 * This structure is used to define the parameters for the Bluetooth control block, 288 * including status, state, synchronization mechanisms, and remote BLE device information. 289 */ 290 typedef struct rsi_bt_cb_s { 291 /** Driver BT control block status */ 292 volatile int32_t status; 293 /** Driver BT control block state */ 294 uint16_t state; 295 /** Driver BT control block mutex */ 296 osMutexId_t bt_mutex; 297 /** Driver BT control block expected command response */ 298 void *expected_response_buffer; 299 /** Expected command response type */ 300 uint16_t expected_response_type; 301 /** Sync command flag to identify that the command is blocking / sync type */ 302 uint8_t sync_rsp; 303 /** BT device type at disconnect */ 304 uint8_t dev_type; 305 /** Driver BT control block semaphore for commands */ 306 osSemaphoreId_t bt_cmd_sem; 307 /** Driver BT control block semaphore */ 308 osSemaphoreId_t bt_sem; 309 /** Buffer pointer given by application to driver */ 310 uint8_t *app_buffer; 311 /** Buffer length given by application to driver */ 312 uint32_t app_buffer_length; 313 /** Pointer to global Bluetooth callback structure */ 314 rsi_bt_global_cb_t *bt_global_cb; 315 /** Address of the device to which directed advertising has to be done in ll privacy mode */ 316 uint8_t directed_addr[RSI_DEV_ADDR_LEN]; 317 /** @addtogroup BT_BLE_CONSTANTS 318 * @{ 319 */ 320 321 /** Maximum number of remote BLE devices */ 322 #define MAX_REMOTE_BLE_DEVICES 10 323 /** @} */ 324 /** Structure holding remote LE device info (BD address and controller buffer availability) */ 325 rsi_remote_ble_info_t remote_ble_info[MAX_REMOTE_BLE_DEVICES]; 326 /** Variable indicating buffer full/empty status --> 0 -> Empty, 1 -> Full */ 327 uint8_t buf_status; 328 /** Variable indicating command in use status --> 0 -> Not In Use, 1 -> In Use */ 329 uint8_t cmd_status; 330 /** Variable to save remote info index */ 331 uint8_t remote_ble_index; 332 /** Driver BT control block asynchronous status */ 333 volatile int32_t async_status; 334 } rsi_bt_cb_t; 335 336 // Set local name command structure 337 338 /** 339 * @brief Structure representing the Bluetooth request to set the local device name. 340 * 341 * This structure is used to define the parameters for setting the local Bluetooth device name, 342 * including the name length and the name itself. 343 */ 344 typedef struct rsi_bt_req_set_local_name_s { 345 /** Length of the required name to be set */ 346 uint8_t name_len; 347 /** Required name */ 348 int8_t name[RSI_DEV_NAME_LEN]; 349 } rsi_bt_req_set_local_name_t; 350 351 // Get RSSI command structure 352 353 /** 354 * @brief Structure representing the Bluetooth request to get the Received Signal Strength Indicator (RSSI). 355 * 356 * This structure is used to define the parameters for requesting the RSSI of a remote Bluetooth device, 357 * including the device address. 358 */ 359 typedef struct rsi_bt_get_rssi_s { 360 /** Device address (6 bytes) */ 361 uint8_t dev_addr[RSI_DEV_ADDR_LEN]; 362 } rsi_bt_get_rssi_t; 363 364 // Response structures 365 366 // Get local name response structures 367 368 /** 369 * @brief Structure representing the Bluetooth response to get the local device name. 370 * 371 * This structure is used to define the parameters for the response that includes the local Bluetooth device name, 372 * including the name length, the name itself, and a reserved variable. 373 */ 374 typedef struct rsi_bt_resp_get_local_name_s { 375 /** Name length */ 376 uint8_t name_len; 377 /** Array which consists name of the local device. The maximum size of this array is 50 */ 378 int8_t name[RSI_DEV_NAME_LEN]; 379 /** Reserved variable */ 380 uint8_t _reserved; 381 } rsi_bt_resp_get_local_name_t; 382 /** @} */ 383 384 /** @addtogroup BT-BLE Common 385 * @{ */ 386 // Get Stack Version 387 /** 388 * @brief Structure representing the Bluetooth response to get the BT stack version. 389 * 390 * This structure is used to define the parameters for the response that includes the Bluetooth stack version. 391 */ 392 typedef struct rsi_bt_resp_get_bt_stack_version_s { 393 /** Bluetooth stack version */ 394 int8_t stack_version[10]; 395 } rsi_bt_resp_get_bt_stack_version_t; 396 397 // Set antenna structure 398 /** 399 * @brief Structure representing the BLE set antenna request. 400 * 401 * This structure is used to define the parameters for setting the BLE antenna, 402 * including the antenna value which can be internal or external. 403 */ 404 typedef struct rsi_ble_set_antenna_s { 405 /** Antenna value - internal/external */ 406 uint8_t value; 407 } rsi_ble_set_antenna_t; 408 409 /** 410 * @brief Structure representing the Bluetooth set feature bitmap. 411 * 412 * This structure is used to define the parameters for setting the Bluetooth feature bitmap, 413 * which includes feature bits in a bit map format. 414 */ 415 typedef struct rsi_bt_set_feature_bitmap_s { 416 /** Features bits (bit map) */ 417 uint32_t bit_map; 418 } rsi_bt_set_feature_bitmap_t; 419 420 /** 421 * @brief Structure representing the BLE operation mode. 422 * 423 * This structure is used to define the parameters for the BLE operation mode, 424 * including Bluetooth features and the module type. 425 */ 426 typedef struct rsi_ble_oper_mode_s { 427 /** Bluetooth features */ 428 uint32_t bt_features; 429 /** Module type */ 430 uint8_t module_type; 431 } rsi_ble_oper_mode_t; 432 433 /** 434 * @brief Structure representing the BLE power mode. 435 * 436 * This structure is used to define the parameters for setting the BLE power mode, 437 * including the power mode and Ultra-Low-Power (ULP) mode enable settings. 438 */ 439 typedef struct rsi_ble_power_mode_s { 440 /** Power mode to set */ 441 uint8_t power_mode; 442 /** Set LP/ULP/ULP-without RAM retention */ 443 uint8_t ulp_mode_enable; 444 } rsi_ble_power_mode_t; 445 446 // Set antenna tx power level structure 447 448 /** 449 * @brief Structure representing the Bluetooth set antenna transmit power level. 450 * 451 * This structure is used to define the parameters for setting the antenna transmit power level, 452 * including the protocol mode and transmit power. 453 */ 454 typedef struct rsi_bt_set_antenna_tx_power_level_s { 455 /** Protocol mode: 1-BT, 2-LE */ 456 uint8_t protocol_mode; 457 /** Transmit power */ 458 int8_t tx_power; 459 } rsi_bt_set_antenna_tx_power_level_t; 460 461 // BT PER Stats 462 /** 463 * @brief Structure representing the Bluetooth Packet Error Rate (PER) statistics. 464 * 465 * This structure is used to define the parameters for collecting Bluetooth PER statistics, 466 * including counts of CRC fails, successful transmissions, and other relevant metrics. 467 */ 468 typedef struct rsi_bt_per_stats_s { 469 /** Packet count of CRC fails (Cyclic Redundancy Check (CRC)) */ 470 uint16_t crc_fail_cnt; 471 /** Packet count of CRC passes */ 472 uint16_t crc_pass_cnt; 473 /** Packet count of aborted transmissions */ 474 uint16_t tx_abort_cnt; 475 /** Packet count of dropped receptions */ 476 uint16_t rx_drop_cnt; 477 /** Packet count of CCA Idle (Clear Channel Assessment (CCA)) */ 478 uint16_t rx_cca_idle_cnt; 479 /** Packet count of Rx start */ 480 uint16_t rx_start_idle_cnt; 481 /** Packet count of aborted receptions */ 482 uint16_t rx_abrt_cnt; 483 /** Packet count of successful transmissions */ 484 uint16_t tx_dones; 485 /** Received Signal Strength Indicator of the packet */ 486 int8_t rssi; 487 /** Packet count of ID packets received */ 488 uint16_t id_pkts_rcvd; 489 /** Dummy array of length 5 */ 490 uint16_t dummy[5]; 491 } rsi_bt_per_stats_t; 492 493 /** 494 * @brief Structure representing the Bluetooth set local Bluetooth Device (BD) address. 495 * 496 * This structure is used to define the parameters for setting the local Bluetooth device address. 497 */ 498 typedef struct rsi_bt_set_local_bd_addr_s { 499 /** Device address (6 bytes) */ 500 uint8_t dev_addr[RSI_DEV_ADDR_LEN]; 501 } rsi_bt_set_local_bd_addr_t; 502 503 /** 504 * @brief Structure for updating gain table offset or max power in Bluetooth commands. 505 */ 506 typedef struct rsi_bt_cmd_update_gain_table_offset_or_maxpower_s { 507 /** node id (0 - BLE, 1 - BT) */ 508 uint8_t node_id; 509 /** gain table request type (0 - max power update, 1 - offset update) */ 510 uint8_t update_gain_table_type; 511 /** gain table payload length */ 512 uint8_t payload_len; 513 /** gain table payload data */ 514 uint8_t payload[128]; 515 } rsi_bt_cmd_update_gain_table_offset_or_maxpower_t; 516 /** @} */ 517 /****************************************************** 518 * * BT/BLE common function declarations 519 * ******************************************************/ 520 void rsi_bt_set_status(rsi_bt_cb_t *bt_cb, int32_t status); 521 void rsi_bt_common_tx_done(sl_si91x_packet_t *pkt); 522 int8_t rsi_bt_cb_init(rsi_bt_cb_t *bt_cb, uint16_t protocol_type); 523 int32_t rsi_bt_driver_send_cmd(uint16_t cmd, void *cmd_struct, void *resp); 524 uint16_t rsi_bt_global_cb_init(struct rsi_driver_cb_s *driver_cb, uint8_t *buffer); 525 uint16_t rsi_driver_process_bt_resp_handler(void *rx_pkt); 526 uint16_t rsi_bt_get_proto_type(uint16_t rsp_type, rsi_bt_cb_t **bt_cb); 527 528 /** @addtogroup BT_BLE_CONSTANTS 529 * @{ 530 */ 531 #define HCI_BT_PER_STATS_CMD_ID 0x08 ///< HCI command ID for Bluetooth Packet Error Rate (PER) statistics. 532 #define HCI_BLE_TRANSMIT_CMD_ID 0x13 ///< HCI command ID for BLE transmit command. 533 #define HCI_BLE_RECEIVE_CMD_ID 0x14 ///< HCI command ID for BLE receive command. 534 #define HCI_BT_TRANSMIT_CMD_ID 0x15 ///< HCI command ID for Bluetooth transmit command. 535 #define HCI_BT_RECEIVE_CMD_ID 0x16 ///< HCI command ID for Bluetooth receive command. 536 /** @} */ 537 #endif 538