components/bt: Add API and EVT for BLE set channels(BLE)

This commit is contained in:
baohongde
2019-09-30 09:50:28 +08:00
parent eaf5f6a319
commit ed984cc9b5
17 changed files with 305 additions and 37 deletions

View File

@@ -356,6 +356,8 @@ typedef UINT8 COF[COF_LEN]; /* ciphering offset number */
#define AFH_CHANNELS_LEN 10
typedef UINT8 AFH_CHANNELS[AFH_CHANNELS_LEN];
#define BLE_CHANNELS_LEN 5
typedef UINT8 BLE_CHANNELS[BLE_CHANNELS_LEN];
typedef struct {
UINT8 qos_flags; /* TBD */
@@ -690,8 +692,6 @@ typedef void (BT_LOG_FUNC) (int trace_type, const char *fmt_str, ...);
typedef uint8_t BD_ADDR[BD_ADDR_LEN];
#endif
/* */
// From bd.c
/*****************************************************************************

View File

@@ -806,6 +806,14 @@ typedef struct {
UINT8 hci_status;
} tBTM_SET_AFH_CHANNELS_RESULTS;
/* Structure returned with set BLE channels event (in tBTM_CMPL_CB callback function)
** in response to BTM_BleSetChannels call.
*/
typedef struct {
tBTM_STATUS status;
UINT8 hci_status;
} tBTM_BLE_SET_CHANNELS_RESULTS;
/* Structure returned with read inq tx power quality event (in tBTM_CMPL_CB callback function)
** in response to BTM_ReadInquiryRspTxPower call.
*/
@@ -4118,6 +4126,17 @@ tBTM_CONTRL_STATE BTM_PM_ReadControllerState(void);
*******************************************************************************/
tBTM_STATUS BTM_SetAfhChannels (AFH_CHANNELS channels, tBTM_CMPL_CB *p_afh_channels_cmpl_cback);
/*******************************************************************************
**
** Function BTM_BleSetChannels
**
** Description This function is called to set BLE channels
**
** Returns status of the operation
**
*******************************************************************************/
tBTM_STATUS BTM_BleSetChannels (BLE_CHANNELS channels, tBTM_CMPL_CB *p_ble_channels_cmpl_cback);
/*
#ifdef __cplusplus
}

View File

@@ -523,6 +523,8 @@ BOOLEAN btsnd_hcic_change_name(BD_NAME name);
/* set AFH channels */
BOOLEAN btsnd_hcic_set_afh_channels (AFH_CHANNELS channels);
#define HCIC_PARAM_SIZE_SET_AFH_CHANNELS 10
BOOLEAN btsnd_hcic_ble_set_channels (BLE_CHANNELS channels);
#define HCIC_PARAM_SIZE_BLE_SET_CHANNELS 5
BOOLEAN btsnd_hcic_write_pin_type(UINT8 type); /* Write PIN Type */
BOOLEAN btsnd_hcic_write_auto_accept(UINT8 flag); /* Write Auto Accept */