mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
feat(ble/bluedroid): Add getter for BLE GATTS callback
This commit is contained in:
parent
9b2e0a2a01
commit
5ed6abc5e2
@ -29,6 +29,11 @@ esp_err_t esp_ble_gatts_register_callback(esp_gatts_cb_t callback)
|
|||||||
return (btc_profile_cb_set(BTC_PID_GATTS, callback) == 0 ? ESP_OK : ESP_FAIL);
|
return (btc_profile_cb_set(BTC_PID_GATTS, callback) == 0 ? ESP_OK : ESP_FAIL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
esp_gatts_cb_t esp_ble_gatts_get_callback(void)
|
||||||
|
{
|
||||||
|
return (esp_gatts_cb_t) btc_profile_cb_get(BTC_PID_GATTS);
|
||||||
|
}
|
||||||
|
|
||||||
esp_err_t esp_ble_gatts_app_register(uint16_t app_id)
|
esp_err_t esp_ble_gatts_app_register(uint16_t app_id)
|
||||||
{
|
{
|
||||||
btc_msg_t msg = {0};
|
btc_msg_t msg = {0};
|
||||||
|
@ -295,6 +295,16 @@ typedef void (* esp_gatts_cb_t)(esp_gatts_cb_event_t event, esp_gatt_if_t gatts_
|
|||||||
*/
|
*/
|
||||||
esp_err_t esp_ble_gatts_register_callback(esp_gatts_cb_t callback);
|
esp_err_t esp_ble_gatts_register_callback(esp_gatts_cb_t callback);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief This function is called to get the current application callbacks
|
||||||
|
* with BTA GATTS module.
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
* - esp_gatts_cb_t : current callback
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
esp_gatts_cb_t esp_ble_gatts_get_callback(void);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief This function is called to register application identifier
|
* @brief This function is called to register application identifier
|
||||||
*
|
*
|
||||||
|
Loading…
Reference in New Issue
Block a user