Add support for VSC to clear legacy adv memory

This commit is contained in:
Rahul Tank
2024-02-20 12:22:49 +05:30
committed by Abhinav Kudnar
parent 6c739904c7
commit 77c18856ec
3 changed files with 15 additions and 1 deletions
+7 -1
View File
@@ -179,8 +179,14 @@ int ble_gap_set_auto_pcl_param(struct ble_gap_set_auto_pcl_params *params);
*
* @return 0 on success; nonzero on failure.
*/
int ble_gap_duplicate_exception_list(uint8_t subcode, uint8_t type, uint8_t *value, void *cb);
/**
* This API is used to clean up residue memory in controller for legacy advertisement
*
* @return 0 on success; nonzero on failure.
*/
int ble_gap_clear_legacy_adv(void);
#endif
#ifdef __cplusplus
+6
View File
@@ -7480,6 +7480,12 @@ ble_gap_duplicate_exception_list(uint8_t subcode, uint8_t type, uint8_t *value,
return ble_hs_hci_send_vs_cmd(BLE_HCI_OCF_VS_DUPLICATE_EXCEPTION_LIST,
&device_info_array, sizeof(device_info_array), NULL, 0);
}
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);
}
#endif
int
+2
View File
@@ -1223,6 +1223,8 @@ struct ble_hci_vs_duplicate_exception_list_cp {
uint8_t device_info[6];
} __attribute__((packed));
#define BLE_HCI_OCF_VS_LEGACY_ADV_CLEAR (MYNEWT_VAL(BLE_HCI_VS_OCF_OFFSET) + (0x010C))
/* Command Specific Definitions */
/* --- Set controller to host flow control (OGF 0x03, OCF 0x0031) --- */
#define BLE_HCI_CTLR_TO_HOST_FC_OFF (0)