Merge branch 'bugfix/add_warning_print_timer' into 'nimble-1.3.0-idf'

NimBLE: Modified timer not started / running warning print

See merge request espressif/esp-nimble!109
This commit is contained in:
Wang Meng Yang
2021-11-15 07:47:38 +00:00
+8 -2
View File
@@ -22,9 +22,12 @@
#include <string.h>
#include "nimble/nimble_npl.h"
#include "freertos/portable.h"
#include "esp_log.h"
portMUX_TYPE ble_port_mutex = portMUX_INITIALIZER_UNLOCKED;
static const char *TAG = "Timer";
static inline bool
in_isr(void)
{
@@ -368,8 +371,11 @@ void
npl_freertos_callout_deinit(struct ble_npl_callout *co)
{
#if CONFIG_BT_NIMBLE_USE_ESP_TIMER
ESP_ERROR_CHECK_WITHOUT_ABORT(esp_timer_stop(co->handle));
ESP_ERROR_CHECK_WITHOUT_ABORT(esp_timer_delete(co->handle));
if(esp_timer_stop(co->handle))
ESP_LOGW(TAG, "Timer not stopped");
if(esp_timer_delete(co->handle))
ESP_LOGW(TAG, "Timer not deleted");
#else
if (co->handle) {
xTimerDelete(co->handle, portMAX_DELAY);