nimble/host/include/host/ble_gap: add ble_gap_ext_adv_active()

This commit is contained in:
Francisco Molina
2023-03-20 16:32:02 +05:30
committed by [email protected]
parent 1692c94ca5
commit 9fd023d47f
2 changed files with 22 additions and 0 deletions
+12
View File
@@ -1443,6 +1443,18 @@ int ble_gap_ext_adv_remove(uint8_t instance);
* other error code on failure.
*/
int ble_gap_ext_adv_clear(void);
/**
* Indicates whether an advertisement procedure is currently in progress on
* the specified Instance
*
* @param instance Instance Id
*
* @return 0 if there is no active advertising procedure for the instance,
* 1 otherwise
*
*/
int ble_gap_ext_adv_active(uint8_t instance);
#endif
/* Periodic Advertising */
+10
View File
@@ -1453,6 +1453,16 @@ ble_gap_adv_active_instance(uint8_t instance)
}
#endif
#if MYNEWT_VAL(BLE_EXT_ADV)
int ble_gap_ext_adv_active(uint8_t instance)
{
if (instance >= BLE_ADV_INSTANCES) {
return 0;
}
return ble_gap_adv_active_instance(instance);
}
#endif
/**
* Clears advertisement and discovery state. This function is necessary
* when the controller loses its active state (e.g. on stack reset).