- esp_err_t esp_bt_gap_register_callback(esp_bt_gap_cb_t callback)
- {
- if (esp_bluedroid_get_status() != ESP_BLUEDROID_STATUS_ENABLED) {
- return ESP_ERR_INVALID_STATE;
- }
- if (callback == NULL) {
- return ESP_FAIL;
- }
- btc_profile_cb_set(BTC_PID_GAP_BT, callback);
- return ESP_OK;
- }
- static inline void btc_gap_bt_cb_to_app(esp_bt_gap_cb_event_t event, esp_bt_gap_cb_param_t *param)
- {
- esp_bt_gap_cb_t cb = (esp_bt_gap_cb_t)btc_profile_cb_get(BTC_PID_GAP_BT);
- if (cb) {
- cb(event, param);
- }
- }
So what's the reason behind banning such reset using simply esp_bt_gap_register_callback?