update head files for nimble

Remove some useless error printing display
This commit is contained in:
GengYuchao
2022-07-04 21:16:13 +08:00
committed by BOT
parent 9e1466a34d
commit ee13e58b16
3 changed files with 37 additions and 9 deletions

View File

@@ -41,14 +41,22 @@ void nimble_port_deinit(void);
void nimble_port_run(void);
int nimble_port_stop(void);
struct ble_npl_eventq *nimble_port_get_dflt_eventq(void);
/**
* @brief esp_nimble_init - Initialize the NimBLE host stack
*
* @return esp_err_t
*/
esp_err_t esp_nimble_init(void);
esp_err_t esp_nimble_enable(void *host_task);
esp_err_t esp_nimble_disable(void);
/**
* @brief esp_nimble_deinit - Deinitialize the NimBLE host stack
*
* @return esp_err_t
*/
esp_err_t esp_nimble_deinit(void);
struct ble_npl_eventq *nimble_port_get_dflt_eventq(void);
#ifdef __cplusplus
}

View File

@@ -15,6 +15,22 @@
extern "C" {
#endif
/**
* @brief esp_nimble_enable - Initialize the NimBLE host task
*
* @param host_task
* @return esp_err_t
*/
esp_err_t esp_nimble_enable(void *host_task);
/**
* @brief esp_nimble_disable - Disable the NimBLE host task
*
* @return esp_err_t
*/
esp_err_t esp_nimble_disable(void);
void nimble_port_freertos_init(TaskFunction_t host_task_fn);
void nimble_port_freertos_deinit(void);
void npl_freertos_funcs_init(void);

View File

@@ -762,12 +762,16 @@ IRAM_ATTR npl_freertos_callout_deinit(struct ble_npl_callout *co)
BLE_LL_ASSERT(callout->handle);
#if CONFIG_BT_NIMBLE_USE_ESP_TIMER
if(esp_timer_stop(callout->handle))
esp_err_t err = esp_timer_stop(callout->handle);
if(err != ESP_OK) {
if (err != ESP_ERR_INVALID_STATE) { // ESP_ERR_INVALID_STATE is expected when timer is already stopped
ESP_LOGW(TAG, "Timer not stopped");
if(esp_timer_delete(callout->handle))
}
}
err = esp_timer_delete(callout->handle);
if(err != ESP_OK) {
ESP_LOGW(TAG, "Timer not deleted");
}
#else
xTimerDelete(callout->handle, portMAX_DELAY);