Add VSC support for setting chan select algo

This commit is contained in:
Rahul Tank
2024-02-20 18:48:54 +05:30
committed by Abhinav Kudnar
parent dd288f2b76
commit e5309236c9
3 changed files with 15 additions and 0 deletions
+8
View File
@@ -187,6 +187,14 @@ int ble_gap_duplicate_exception_list(uint8_t subcode, uint8_t type, uint8_t *val
* @return 0 on success; nonzero on failure.
*/
int ble_gap_clear_legacy_adv(void);
/**
* This API is used to let controller know which CSA to use. Not applicable for ESP32
*
* @return 0 on success; nonzero of failure.
*/
int ble_gap_set_chan_select(uint8_t select);
#endif
#ifdef __cplusplus
+6
View File
@@ -7499,6 +7499,12 @@ int ble_gap_clear_legacy_adv(void)
return ble_hs_hci_send_vs_cmd(BLE_HCI_OCF_VS_LEGACY_ADV_CLEAR,
NULL, 0, NULL, 0);
}
int ble_gap_set_chan_select(uint8_t select)
{
return ble_hs_hci_send_vs_cmd(BLE_HCI_OCF_VS_SET_CHAN_SELECT,
&select, 1, NULL, 0);
}
#endif
int
+1
View File
@@ -1224,6 +1224,7 @@ struct ble_hci_vs_duplicate_exception_list_cp {
} __attribute__((packed));
#define BLE_HCI_OCF_VS_LEGACY_ADV_CLEAR (MYNEWT_VAL(BLE_HCI_VS_OCF_OFFSET) + (0x010C))
#define BLE_HCI_OCF_VS_SET_CHAN_SELECT (MYNEWT_VAL(BLE_HCI_VS_OCF_OFFSET) + (0x0112))
/* Command Specific Definitions */
/* --- Set controller to host flow control (OGF 0x03, OCF 0x0031) --- */