return ESP_ERR_NOT_FOUND;
}
+esp_err_t esp_gap_ble_set_channels(esp_gap_ble_channels channels)
+{
+ btc_msg_t msg;
+ btc_ble_gap_args_t arg;
+ if (esp_bluedroid_get_status() != ESP_BLUEDROID_STATUS_ENABLED) {
+ return ESP_ERR_INVALID_STATE;
+ }
+ msg.sig = BTC_SIG_API_CALL;
+ msg.pid = BTC_PID_GAP_BLE;
+ msg.act = BTC_GAP_BLE_SET_AFH_CHANNELS;
+ memcpy(&arg.set_channels.channels, channels, ESP_GAP_BLE_CHANNELS_LEN);
+ arg.set_channels.channels[ESP_GAP_BLE_CHANNELS_LEN -1] &= 0x1F;
+ return (btc_transfer_context(&msg, &arg, sizeof(btc_ble_gap_args_t), NULL) == BT_STATUS_SUCCESS ? ESP_OK : ESP_FAIL);
+}
ESP_GAP_BLE_SCAN_RESULT_EVT, /*!< When one scan result ready, the event comes each time */
ESP_GAP_BLE_ADV_DATA_RAW_SET_COMPLETE_EVT, /*!< When raw advertising data set complete, the event comes */
ESP_GAP_BLE_SCAN_RSP_DATA_RAW_SET_COMPLETE_EVT, /*!< When raw advertising data set complete, the event comes */
- ESP_GAP_BLE_ADV_START_COMPLETE_EVT, /*!< When start advertising complete, the event comes */
- ESP_GAP_BLE_SCAN_START_COMPLETE_EVT, /*!< When start scan complete, the event comes */
- ESP_GAP_BLE_AUTH_CMPL_EVT, /* Authentication complete indication. */
- ESP_GAP_BLE_KEY_EVT, /* BLE key event for peer device keys */
- ESP_GAP_BLE_SEC_REQ_EVT, /* BLE security request */
- ESP_GAP_BLE_PASSKEY_NOTIF_EVT, /* passkey notification event */
- ESP_GAP_BLE_PASSKEY_REQ_EVT, /* passkey request event */
- ESP_GAP_BLE_OOB_REQ_EVT, /* OOB request event */
- ESP_GAP_BLE_LOCAL_IR_EVT, /* BLE local IR event */
- ESP_GAP_BLE_LOCAL_ER_EVT, /* BLE local ER event */
- ESP_GAP_BLE_NC_REQ_EVT, /* Numeric Comparison request event */
- ESP_GAP_BLE_ADV_STOP_COMPLETE_EVT, /*!< When stop adv complete, the event comes */
- ESP_GAP_BLE_SCAN_STOP_COMPLETE_EVT, /*!< When stop scan complete, the event comes */
- ESP_GAP_BLE_SET_STATIC_RAND_ADDR_EVT, /*!< When set the static rand address complete, the event comes */
- ESP_GAP_BLE_UPDATE_CONN_PARAMS_EVT, /*!< When update connection parameters complete, the event comes */
- ESP_GAP_BLE_SET_PKT_LENGTH_COMPLETE_EVT, /*!< When set pkt length complete, the event comes */
- ESP_GAP_BLE_SET_LOCAL_PRIVACY_COMPLETE_EVT, /*!< When Enable/disable privacy on the local device complete, the event comes */
- ESP_GAP_BLE_REMOVE_BOND_DEV_COMPLETE_EVT, /*!< When remove the bond device complete, the event comes */
- ESP_GAP_BLE_CLEAR_BOND_DEV_COMPLETE_EVT, /*!< When clear the bond device clear complete, the event comes */
- ESP_GAP_BLE_GET_BOND_DEV_COMPLETE_EVT, /*!< When get the bond device list complete, the event comes */
- ESP_GAP_BLE_READ_RSSI_COMPLETE_EVT, /*!< When read the rssi complete, the event comes */
- ESP_GAP_BLE_UPDATE_WHITELIST_COMPLETE_EVT, /*!< When add or remove whitelist complete, the event comes */
- ESP_GAP_BLE_UPDATE_DUPLICATE_EXCEPTIONAL_LIST_COMPLETE_EVT, /*!< When update duplicate exceptional list complete, the event comes */
+ ESP_GAP_BLE_ADV_START_COMPLETE_EVT, /*!< When starting advertising complete, the event comes */
+ ESP_GAP_BLE_SCAN_START_COMPLETE_EVT, /*!< When starting scan complete, the event comes */
+ ESP_GAP_BLE_AUTH_CMPL_EVT, /*!< Authentication complete indication. */
+ ESP_GAP_BLE_KEY_EVT, /*!< BLE key event for peer device keys */
+ ESP_GAP_BLE_SEC_REQ_EVT, /*!< BLE security request */
+ ESP_GAP_BLE_PASSKEY_NOTIF_EVT, /*!< passkey notification event */
+ ESP_GAP_BLE_PASSKEY_REQ_EVT, /*!< passkey request event */
+ ESP_GAP_BLE_OOB_REQ_EVT, /*!< OOB request event */
+ ESP_GAP_BLE_LOCAL_IR_EVT, /*!< BLE local IR event */
+ ESP_GAP_BLE_LOCAL_ER_EVT, /*!< BLE local ER event */
+ ESP_GAP_BLE_NC_REQ_EVT, /*!< Numeric Comparison request event */
+ ESP_GAP_BLE_ADV_STOP_COMPLETE_EVT, /*!< When stopping adv complete, the event comes */
+ ESP_GAP_BLE_SCAN_STOP_COMPLETE_EVT, /*!< When stopping scan complete, the event comes */
+ ESP_GAP_BLE_SET_STATIC_RAND_ADDR_EVT, /*!< When setting the static rand address complete, the event comes */
+ ESP_GAP_BLE_UPDATE_CONN_PARAMS_EVT, /*!< When updating connection parameters complete, the event comes */
+ ESP_GAP_BLE_SET_PKT_LENGTH_COMPLETE_EVT, /*!< When setting pkt length complete, the event comes */
+ ESP_GAP_BLE_SET_LOCAL_PRIVACY_COMPLETE_EVT, /*!< When enabling/disabling privacy on the local device complete, the event comes */
+ ESP_GAP_BLE_REMOVE_BOND_DEV_COMPLETE_EVT, /*!< When removing the bond device complete, the event comes */
+ ESP_GAP_BLE_CLEAR_BOND_DEV_COMPLETE_EVT, /*!< When clearing the bond device clear complete, the event comes */
+ ESP_GAP_BLE_GET_BOND_DEV_COMPLETE_EVT, /*!< When getting the bond device list complete, the event comes */
+ ESP_GAP_BLE_READ_RSSI_COMPLETE_EVT, /*!< When reading the rssi complete, the event comes */
+ ESP_GAP_BLE_UPDATE_WHITELIST_COMPLETE_EVT, /*!< When adding or removing whitelist complete, the event comes */
+ ESP_GAP_BLE_UPDATE_DUPLICATE_EXCEPTIONAL_LIST_COMPLETE_EVT, /*!< When updating duplicate exceptional list complete, the event comes */
+ ESP_GAP_BLE_SET_CHANNELS_EVT, /*!< When setting BLE channels complete, the event comes */
ESP_GAP_BLE_EVT_MAX,
} esp_gap_ble_cb_event_t;
+
+#define ESP_GAP_BLE_CHANNELS_LEN 5
+typedef uint8_t esp_gap_ble_channels[ESP_GAP_BLE_CHANNELS_LEN];
+
/// This is the old name, just for backwards compatibility
#define ESP_GAP_BLE_ADD_WHITELIST_COMPLETE_EVT ESP_GAP_BLE_UPDATE_WHITELIST_COMPLETE_EVT
uint16_t length; /*!< The length of device_info */
esp_duplicate_info_t device_info; /*!< device information, when subcode is ESP_BLE_DUPLICATE_EXCEPTIONAL_LIST_CLEAN, the value is invalid */
} update_duplicate_exceptional_list_cmpl; /*!< Event parameter of ESP_GAP_BLE_UPDATE_DUPLICATE_EXCEPTIONAL_LIST_COMPLETE_EVT */
+ /**
+ * @brief ESP_GAP_BLE_SET_CHANNELS_EVT
+ */
+ struct ble_set_channels_evt_param {
+ esp_bt_status_t stat; /*!< BLE set channel status */
+ } ble_set_channels; /*!< Event parameter of ESP_GAP_BLE_SET_CHANNELS_EVT */
} esp_ble_gap_cb_param_t;
/**
*/
esp_err_t esp_ble_get_current_conn_params(esp_bd_addr_t bd_addr, esp_gap_conn_params_t *conn_params);
+/**
+* @brief BLE set channels
+*
+* @param[in] channels : The n th such field (in the range 0 to 36) contains the value for the link layer channel index n.
+* 0 means channel n is bad.
+* 1 means channel n is unknown.
+* The most significant bits are reserved and shall be set to 0.
+* At least one channel shall be marked as unknown.
+*
+* @return - ESP_OK : success
+* - ESP_ERR_INVALID_STATE: if bluetooth stack is not yet enabled
+* - other : failed
+*
+*/
+esp_err_t esp_gap_ble_set_channels(esp_gap_ble_channels channels);
+
#ifdef __cplusplus
}
#endif
*/
struct set_afh_channels_param {
esp_bt_status_t stat; /*!< set AFH channel status */
- } set_afh_channels;
+ } set_afh_channels; /*!< set AFH channel parameter struct */
} esp_bt_gap_cb_param_t;
/**
/**
* @brief Set the AFH channels
*
-* @param[in] channles : The n th such field (in the range 0 to 78) contains the value for channel n :
-* Channel n is bad = 0
-* Channel n is unknown = 1
-* The most significant bit is reserved and shall be set to 0
-* At least 20 channels shall be marked as unknown
+* @param[in] channels : The n th such field (in the range 0 to 78) contains the value for channel n :
+* 0 means channel n is bad.
+* 1 means channel n is unknown.
+* The most significant bit is reserved and shall be set to 0.
+* At least 20 channels shall be marked as unknown.
*
* @return - ESP_OK : success
* - ESP_ERR_INVALID_STATE: if bluetooth stack is not yet enabled
* - other : failed
*
*/
-esp_err_t esp_bt_gap_set_afh_channels(esp_bt_gap_afh_channels channles);
+esp_err_t esp_bt_gap_set_afh_channels(esp_bt_gap_afh_channels channels);
#ifdef __cplusplus
}
bta_dm_set_eir(NULL);
}
+/*******************************************************************************
+**
+** Function bta_dm_set_afh_channels
+**
+** Description Sets AFH channels
+**
+**
+** Returns void
+**
+*******************************************************************************/
+void bta_dm_ble_set_channels (tBTA_DM_MSG *p_data)
+{
+#if (BLE_INCLUDED == TRUE)
+ BTM_BleSetChannels (p_data->ble_set_channels.channels, p_data->ble_set_channels.set_channels_cb);
+#endif /// BLE_INCLUDED == TRUE
+}
+
void bta_dm_update_white_list(tBTA_DM_MSG *p_data)
{
#if (BLE_INCLUDED == TRUE)
#endif /// CLASSIC_BT_INCLUDED == TRUE
#if (BLE_INCLUDED == TRUE)
+/*******************************************************************************
+**
+** Function BTA_DmBleSetChannels
+**
+** Description This function sets BLE channels
+**
+**
+** Returns void
+**
+*******************************************************************************/
+void BTA_DmBleSetChannels(const uint8_t *channels, tBTA_CMPL_CB *set_channels_cb)
+{
+
+ tBTA_DM_API_BLE_SET_CHANNELS *p_msg;
+
+ if ((p_msg = (tBTA_DM_API_BLE_SET_CHANNELS *) osi_malloc(sizeof(tBTA_DM_API_BLE_SET_CHANNELS))) != NULL) {
+ p_msg->hdr.event = BTA_DM_API_BLE_SET_CHANNELS_EVT;
+
+ p_msg->set_channels_cb = set_channels_cb;
+ memcpy(p_msg->channels, channels, BLE_CHANNELS_LEN);
+
+ bta_sys_sendmsg(p_msg);
+ }
+
+
+}
+
void BTA_DmUpdateWhiteList(BOOLEAN add_remove, BD_ADDR remote_addr, tBLE_ADDR_TYPE addr_type, tBTA_ADD_WHITELIST_CBACK *add_wl_cb)
{
tBTA_DM_API_UPDATE_WHITE_LIST *p_msg;
bta_dm_remove_all_acl, /* BTA_DM_API_REMOVE_ALL_ACL_EVT */
bta_dm_remove_device, /* BTA_DM_API_REMOVE_DEVICE_EVT */
+ bta_dm_ble_set_channels, /* BTA_DM_API_BLE_SET_CHANNELS_EVT */
bta_dm_update_white_list, /* BTA_DM_API_UPDATE_WHITE_LIST_EVT */
bta_dm_ble_read_adv_tx_power, /* BTA_DM_API_BLE_READ_ADV_TX_POWER_EVT */
bta_dm_ble_read_rssi, /* BTA_DM_API_BLE_READ_RSSI_EVT */
BTA_DM_API_EXECUTE_CBACK_EVT,
BTA_DM_API_REMOVE_ALL_ACL_EVT,
BTA_DM_API_REMOVE_DEVICE_EVT,
+ BTA_DM_API_BLE_SET_CHANNELS_EVT,
BTA_DM_API_UPDATE_WHITE_LIST_EVT,
BTA_DM_API_BLE_READ_ADV_TX_POWER_EVT,
BTA_DM_API_BLE_READ_RSSI_EVT,
}tBTA_DM_API_SET_AFH_CHANNELS;
#if (BLE_INCLUDED == TRUE)
+/* data type for BTA_DM_API_BLE_SET_CHANNELS_EVT */
+typedef struct {
+ BT_HDR hdr;
+ AFH_CHANNELS channels;
+ tBTA_CMPL_CB *set_channels_cb;
+}tBTA_DM_API_BLE_SET_CHANNELS;
+
typedef struct {
BT_HDR hdr;
BOOLEAN add_remove;
tBTA_DM_API_SET_AFH_CHANNELS set_afh_channels;
#if (BLE_INCLUDED == TRUE)
+ tBTA_DM_API_BLE_SET_CHANNELS ble_set_channels;
tBTA_DM_API_UPDATE_WHITE_LIST white_list;
tBTA_DM_API_READ_ADV_TX_POWER read_tx_power;
tBTA_DM_API_READ_RSSI rssi;
extern void bta_dm_set_dev_name (tBTA_DM_MSG *p_data);
extern void bta_dm_config_eir (tBTA_DM_MSG *p_data);
extern void bta_dm_set_afh_channels (tBTA_DM_MSG *p_data);
+extern void bta_dm_ble_set_channels (tBTA_DM_MSG *p_data);
extern void bta_dm_update_white_list(tBTA_DM_MSG *p_data);
extern void bta_dm_ble_read_adv_tx_power(tBTA_DM_MSG *p_data);
extern void bta_dm_ble_read_rssi(tBTA_DM_MSG *p_data);
typedef tBTM_RSSI_RESULTS tBTA_RSSI_RESULTS;
typedef tBTM_SET_AFH_CHANNELS_RESULTS tBTA_SET_AFH_CHANNELS_RESULTS;
-
+typedef tBTM_BLE_SET_CHANNELS_RESULTS tBTA_BLE_SET_CHANNELS_RESULTS;
/* advertising channel map */
#define BTA_BLE_ADV_CHNL_37 BTM_BLE_ADV_CHNL_37
#define BTA_BLE_ADV_CHNL_38 BTM_BLE_ADV_CHNL_38
void BTA_DmSetAfhChannels(const uint8_t *channels, tBTA_CMPL_CB *set_afh_cb);
#if (BLE_INCLUDED == TRUE)
+/*******************************************************************************
+**
+** Function BTA_DmBleSetChannels
+**
+** Description This function sets BLE channels
+**
+**
+** Returns void
+**
+*******************************************************************************/
+void BTA_DmBleSetChannels(const uint8_t *channels, tBTA_CMPL_CB *set_channels_cb);
+
extern void BTA_DmUpdateWhiteList(BOOLEAN add_remove, BD_ADDR remote_addr, tBLE_ADDR_TYPE addr_type, tBTA_ADD_WHITELIST_CBACK *add_wl_cb);
extern void BTA_DmBleReadAdvTxPower(tBTA_CMPL_CB *cmpl_cb);
}
}
+static void btc_gap_ble_set_channels_cmpl_callback(void *p_data)
+{
+ tBTA_BLE_SET_CHANNELS_RESULTS *result = (tBTA_BLE_SET_CHANNELS_RESULTS *)p_data;
+ esp_ble_gap_cb_param_t param;
+ bt_status_t ret;
+ btc_msg_t msg;
+ msg.sig = BTC_SIG_API_CB;
+ msg.pid = BTC_PID_GAP_BLE;
+ msg.act = ESP_GAP_BLE_SET_CHANNELS_EVT;
+
+ param.ble_set_channels.stat = btc_btm_status_to_esp_status(result->status);
+
+ ret = btc_transfer_context(&msg, ¶m,
+ sizeof(esp_ble_gap_cb_param_t), NULL);
+
+ if (ret != BT_STATUS_SUCCESS) {
+ BTC_TRACE_ERROR("%s btc_transfer_context failed\n", __func__);
+ }
+}
+
+
static void btc_add_whitelist_complete_callback(UINT8 status, tBTM_WL_OPERATION wl_opration)
{
esp_ble_gap_cb_param_t param;
BTA_DmBleDisconnect(bd_addr);
}
+static void btc_gap_ble_set_channels(esp_gap_ble_channels channels)
+{
+ BTA_DmBleSetChannels(channels, btc_gap_ble_set_channels_cmpl_callback);
+}
+
+
void btc_gap_ble_cb_handler(btc_msg_t *msg)
{
esp_ble_gap_cb_param_t *param = (esp_ble_gap_cb_param_t *)msg->arg;
case BTC_GAP_BLE_DISCONNECT_EVT:
btc_ble_disconnect(arg->disconnect.remote_device);
break;
+ case BTC_GAP_BLE_SET_AFH_CHANNELS:
+ btc_gap_ble_set_channels(arg->set_channels.channels);
+ break;
default:
break;
}
BTC_GAP_BLE_REMOVE_BOND_DEV_EVT,
BTC_GAP_BLE_OOB_REQ_REPLY_EVT,
BTC_GAP_BLE_UPDATE_DUPLICATE_SCAN_EXCEPTIONAL_LIST,
+ BTC_GAP_BLE_SET_AFH_CHANNELS,
} btc_gap_ble_act_t;
/* btc_ble_gap_args_t */
struct read_rssi_args {
esp_bd_addr_t remote_addr;
} read_rssi;
+ // BTC_GAP_BLE_SET_AFH_CHANNELS
+ struct set_channels_args {
+ esp_gap_ble_channels channels;
+ } set_channels;
} btc_ble_gap_args_t;
void btc_gap_ble_call_handler(btc_msg_t *msg);
**
** Function btm_set_afh_channels_complete
**
-** Description This function is called when set AFH channels complete.
+** Description This function is called when setting AFH channels complete.
** message is received from the HCI.
**
** Returns void
btu_free_timer (&btm_cb.devcb.afh_channels_timer);
- /* If there was a callback address for set AFH channels, call it */
+ /* If there is a callback address for setting AFH channels, call it */
btm_cb.devcb.p_afh_channels_cmpl_cb = NULL;
if (p_cb) {
(*p_cb)(&results);
}
}
-#endif /// CLASSIC_BT_INCLUDED == TRUE
\ No newline at end of file
+#endif /// CLASSIC_BT_INCLUDED == TRUE
+
+#if (BLE_INCLUDED == TRUE)
+/*******************************************************************************
+**
+** 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)
+{
+ if (!controller_get_interface()->get_is_ready()) {
+ return (BTM_DEV_RESET);
+ }
+
+ /* Check if set afh already in progress */
+ if (btm_cb.devcb.p_ble_channels_cmpl_cb) {
+ return (BTM_NO_RESOURCES);
+ }
+
+ /* Save callback */
+ btm_cb.devcb.p_ble_channels_cmpl_cb = p_ble_channels_cmpl_cback;
+
+ if (!btsnd_hcic_ble_set_channels (channels)) {
+ return (BTM_NO_RESOURCES);
+ }
+
+ btu_start_timer (&btm_cb.devcb.ble_channels_timer, BTU_TTYPE_BTM_ACL, BTM_DEV_REPLY_TIMEOUT);
+
+ return BTM_CMD_STARTED;
+}
+
+/*******************************************************************************
+**
+** Function btm_set_afh_channels_complete
+**
+** Description This function is called when setting AFH channels complete.
+** message is received from the HCI.
+**
+** Returns void
+**
+*******************************************************************************/
+void btm_ble_set_channels_complete (UINT8 *p)
+{
+ tBTM_CMPL_CB *p_cb = btm_cb.devcb.p_ble_channels_cmpl_cb;
+ tBTM_BLE_SET_CHANNELS_RESULTS results;
+
+ btu_free_timer (&btm_cb.devcb.ble_channels_timer);
+
+ /* If there is a callback address for setting AFH channels, call it */
+ btm_cb.devcb.p_ble_channels_cmpl_cb = NULL;
+
+ if (p_cb) {
+ STREAM_TO_UINT8 (results.hci_status, p);
+
+ switch (results.hci_status){
+ case HCI_SUCCESS:
+ results.status = BTM_SUCCESS;
+ break;
+ case HCI_ERR_UNSUPPORTED_VALUE:
+ case HCI_ERR_ILLEGAL_PARAMETER_FMT:
+ results.status = BTM_ILLEGAL_VALUE;
+ break;
+ default:
+ results.status = BTM_ERR_PROCESSING;
+ break;
+ }
+ (*p_cb)(&results);
+ }
+}
+#endif /// BLE_INCLUDED == TRUE
\ No newline at end of file
#if BLE_INCLUDED == TRUE
+TIMER_LIST_ENT ble_channels_timer;
+tBTM_CMPL_CB *p_ble_channels_cmpl_cb; /* Callback function to be called When
+ ble set host channels is completed */
+
tBTM_CMPL_CB *p_le_test_cmd_cmpl_cb; /* Callback function to be called when
LE test mode command has been sent successfully */
void btm_delete_stored_link_key_complete (UINT8 *p);
void btm_report_device_status (tBTM_DEV_STATUS status);
void btm_set_afh_channels_complete (UINT8 *p);
+void btm_ble_set_channels_complete (UINT8 *p);
/* Internal functions provided by btm_dev.c
**********************************************
#endif
#if (BLE_INCLUDED == TRUE)
- /* BLE Commands sComplete*/
+ /* BLE Commands Complete*/
+ case HCI_BLE_SET_HOST_CHNL_CLASS:
+ btm_ble_set_channels_complete(p);
+ break;
case HCI_BLE_ADD_WHITE_LIST:
btm_ble_add_2_white_list_complete(*p);
break;
return TRUE;
}
+BOOLEAN btsnd_hcic_ble_set_channels (BLE_CHANNELS channels)
+{
+ BT_HDR *p;
+ UINT8 *pp;
+
+ if ((p = HCI_GET_CMD_BUF(HCIC_PARAM_SIZE_BLE_SET_CHANNELS)) == NULL) {
+ return (FALSE);
+ }
+
+ pp = (UINT8 *)(p + 1);
+
+ p->len = HCIC_PREAMBLE_SIZE + HCIC_PARAM_SIZE_BLE_SET_CHANNELS;
+ p->offset = 0;
+
+ UINT16_TO_STREAM (pp, HCI_BLE_SET_HOST_CHNL_CLASS);
+ UINT8_TO_STREAM (pp, HCIC_PARAM_SIZE_BLE_SET_CHANNELS);
+
+ ARRAY_TO_STREAM (pp, channels, HCIC_PARAM_SIZE_BLE_SET_CHANNELS);
+
+ btu_hcif_send_cmd (LOCAL_BR_EDR_CONTROLLER_ID, p);
+ return (TRUE);
+}
+
#endif
#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 */
typedef uint8_t BD_ADDR[BD_ADDR_LEN];
#endif
-/* */
-
// From bd.c
/*****************************************************************************
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.
*/
*******************************************************************************/
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
}
/* 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 */