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

This commit is contained in:
Francisco Molina
2021-11-02 16:22:37 +01:00
committed by Szymon Janc
parent da46f181fc
commit 9716331795
2 changed files with 22 additions and 0 deletions
+12
View File
@@ -1314,6 +1314,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
@@ -1303,6 +1303,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).