mirror of
https://github.com/espressif/esp-idf.git
synced 2025-07-30 18:57:19 +02:00
feat(bt): added definitions for BR/EDR hci vendor commands and events
This commit is contained in:
@ -884,7 +884,7 @@ void btm_vendor_specific_evt (UINT8 *p, UINT8 evt_len)
|
|||||||
|
|
||||||
STREAM_TO_UINT8(sub_event, p_evt);
|
STREAM_TO_UINT8(sub_event, p_evt);
|
||||||
/* Check in subevent if authentication is through Legacy Authentication. */
|
/* Check in subevent if authentication is through Legacy Authentication. */
|
||||||
if (sub_event == ESP_VS_REM_LEGACY_AUTH_CMP) {
|
if (sub_event == HCI_VENDOR_LEGACY_REM_AUTH_EVT_SUBCODE) {
|
||||||
UINT16 hci_handle;
|
UINT16 hci_handle;
|
||||||
STREAM_TO_UINT16(hci_handle, p_evt);
|
STREAM_TO_UINT16(hci_handle, p_evt);
|
||||||
btm_sec_handle_remote_legacy_auth_cmp(hci_handle);
|
btm_sec_handle_remote_legacy_auth_cmp(hci_handle);
|
||||||
|
@ -43,8 +43,6 @@ typedef struct tBTM_SEC_DEV_REC tBTM_SEC_DEV_REC;
|
|||||||
#include "stack/smp_api.h"
|
#include "stack/smp_api.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define ESP_VS_REM_LEGACY_AUTH_CMP 0x03
|
|
||||||
|
|
||||||
#if BTM_MAX_LOC_BD_NAME_LEN > 0
|
#if BTM_MAX_LOC_BD_NAME_LEN > 0
|
||||||
typedef char tBTM_LOC_BD_NAME[BTM_MAX_LOC_BD_NAME_LEN + 1];
|
typedef char tBTM_LOC_BD_NAME[BTM_MAX_LOC_BD_NAME_LEN + 1];
|
||||||
#endif
|
#endif
|
||||||
|
@ -432,7 +432,14 @@
|
|||||||
|
|
||||||
//ESP BT subcode define
|
//ESP BT subcode define
|
||||||
#define HCI_SUBCODE_BT_INIT 0x00
|
#define HCI_SUBCODE_BT_INIT 0x00
|
||||||
|
#define HCI_SUBCODE_BT_WRITE_DM1_ENABLE 0x01
|
||||||
#define HCI_SUBCODE_BT_SET_MIN_ENC_KEY_SIZE 0x02
|
#define HCI_SUBCODE_BT_SET_MIN_ENC_KEY_SIZE 0x02
|
||||||
|
#define HCI_SUBCODE_BT_CLK_UPD 0x03
|
||||||
|
#define HCI_SUBCODE_BT_SET_AFH 0x07
|
||||||
|
#define HCI_SUBCODE_BT_SET_EVT_MASK 0x08
|
||||||
|
#define HCI_SUBCODE_BT_SET_AFH_REPORTING_MODE 0x09
|
||||||
|
#define HCI_SUBCODE_BT_MASK_RMT_AFH_CH_CLASS 0x0A
|
||||||
|
#define HCI_SUBCODE_BT_WR_AUTO_RATE_INIT_ENABLE 0x0B
|
||||||
#define HCI_SUBCODE_BT_MAX 0x7F
|
#define HCI_SUBCODE_BT_MAX 0x7F
|
||||||
|
|
||||||
#define HCI_ESP_VENDOR_OPCODE_BUILD(ogf, group, subcode) ((ogf << 10) | (group <<7) | (subcode << 0))
|
#define HCI_ESP_VENDOR_OPCODE_BUILD(ogf, group, subcode) ((ogf << 10) | (group <<7) | (subcode << 0))
|
||||||
@ -477,7 +484,14 @@
|
|||||||
/* BLE set vendor event mask */
|
/* BLE set vendor event mask */
|
||||||
#define HCI_VENDOR_BLE_SET_EVT_MASK HCI_ESP_VENDOR_OPCODE_BUILD(HCI_VENDOR_OGF, HCI_ESP_GROUP_BLE, HCI_SUBCODE_BLE_SET_VENDOR_EVT_MASK)
|
#define HCI_VENDOR_BLE_SET_EVT_MASK HCI_ESP_VENDOR_OPCODE_BUILD(HCI_VENDOR_OGF, HCI_ESP_GROUP_BLE, HCI_SUBCODE_BLE_SET_VENDOR_EVT_MASK)
|
||||||
//ESP BT HCI CMD
|
//ESP BT HCI CMD
|
||||||
#define HCI_VENDOR_BT_SET_MIN_ENC_KEY_SIZE HCI_ESP_VENDOR_OPCODE_BUILD(HCI_VENDOR_OGF, HCI_ESP_GROUP_BT, HCI_SUBCODE_BT_SET_MIN_ENC_KEY_SIZE)
|
#define HCI_VENDOR_BT_WRITE_DM1_ENABLE HCI_ESP_VENDOR_OPCODE_BUILD(HCI_VENDOR_OGF, HCI_ESP_GROUP_BT, HCI_SUBCODE_BT_WRITE_DM1_ENABLE)
|
||||||
|
#define HCI_VENDOR_BT_SET_MIN_ENC_KEY_SIZE HCI_ESP_VENDOR_OPCODE_BUILD(HCI_VENDOR_OGF, HCI_ESP_GROUP_BT, HCI_SUBCODE_BT_SET_MIN_ENC_KEY_SIZE)
|
||||||
|
#define HCI_VENDOR_BT_CLK_UPD HCI_ESP_VENDOR_OPCODE_BUILD(HCI_VENDOR_OGF, HCI_ESP_GROUP_BT, HCI_SUBCODE_BT_CLK_UPD)
|
||||||
|
#define HCI_VENDOR_BT_SET_AFH HCI_ESP_VENDOR_OPCODE_BUILD(HCI_VENDOR_OGF, HCI_ESP_GROUP_BT, HCI_SUBCODE_BT_SET_AFH)
|
||||||
|
#define HCI_VENDOR_BT_SET_EVT_MASK HCI_ESP_VENDOR_OPCODE_BUILD(HCI_VENDOR_OGF, HCI_ESP_GROUP_BT, HCI_SUBCODE_BT_SET_EVT_MASK)
|
||||||
|
#define HCI_VENDOR_BT_SET_AFH_REPORTING_MODE HCI_ESP_VENDOR_OPCODE_BUILD(HCI_VENDOR_OGF, HCI_ESP_GROUP_BT, HCI_SUBCODE_BT_SET_AFH_REPORTING_MODE)
|
||||||
|
#define HCI_VENDOR_BT_MASK_RMT_AFH_CH_CLASS HCI_ESP_VENDOR_OPCODE_BUILD(HCI_VENDOR_OGF, HCI_ESP_GROUP_BT, HCI_SUBCODE_BT_MASK_RMT_AFH_CH_CLASS)
|
||||||
|
#define HCI_VENDOR_BT_WR_AUTO_RATE_INIT_ENABLE HCI_ESP_VENDOR_OPCODE_BUILD(HCI_VENDOR_OGF, HCI_ESP_GROUP_BT, HCI_SUBCODE_BT_WR_AUTO_RATE_INIT_ENABLE)
|
||||||
|
|
||||||
/* subcode for multi adv feature */
|
/* subcode for multi adv feature */
|
||||||
#define BTM_BLE_MULTI_ADV_SET_PARAM 0x01
|
#define BTM_BLE_MULTI_ADV_SET_PARAM 0x01
|
||||||
@ -831,7 +845,12 @@
|
|||||||
/* Definitions for LE Channel Map */
|
/* Definitions for LE Channel Map */
|
||||||
#define HCI_BLE_CHNL_MAP_SIZE 5
|
#define HCI_BLE_CHNL_MAP_SIZE 5
|
||||||
|
|
||||||
#define HCI_VENDOR_SPECIFIC_EVT 0xFF /* Vendor specific events */
|
#define HCI_VENDOR_SPECIFIC_EVT 0xFF /* Vendor specific events */
|
||||||
|
#define HCI_VENDOR_LEGACY_REM_AUTH_EVT_SUBCODE 0x03
|
||||||
|
#define HCI_VENDOR_AFH_CHG_EVT_SUBCODE 0x05
|
||||||
|
#define HCI_VENDOR_CH_CLASSIFICATION_EVT_SUBCODE 0x06
|
||||||
|
#define HCI_VENDOR_CH_CLASSIFICATION_REPORTING_MODE_EVT_SUBCODE 0x07
|
||||||
|
|
||||||
#define HCI_VSE_LE_LEGACY_SCAN_REQ_RECEIVED_EVT 0xC0
|
#define HCI_VSE_LE_LEGACY_SCAN_REQ_RECEIVED_EVT 0xC0
|
||||||
#define HCI_VSE_LE_CHAN_MAP_UPDATE_CMPL_EVT 0xC1
|
#define HCI_VSE_LE_CHAN_MAP_UPDATE_CMPL_EVT 0xC1
|
||||||
#define HCI_VSE_LE_EVT_MAX 0xFF
|
#define HCI_VSE_LE_EVT_MAX 0xFF
|
||||||
|
Reference in New Issue
Block a user