From 05fdc51e3977f1a9dc620ffd3f53288cf3271358 Mon Sep 17 00:00:00 2001 From: h2zero Date: Thu, 13 Jun 2024 13:07:16 -0600 Subject: [PATCH] Rename "TAG" to "LOG_TAG" to avoid conflict with Arduino core. Fixes #670 --- CHANGELOG.md | 1 + .../esp_port/esp-hci/include/esp_nimble_hci.h | 4 +- .../esp_port/esp-hci/src/esp_nimble_hci.c | 12 +-- .../host/store/config/src/ble_store_nvs.c | 90 +++++++++---------- .../npl/freertos/src/npl_os_freertos.c | 12 +-- 5 files changed, 60 insertions(+), 59 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e02b4675..272b61ba 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ All notable changes to this project will be documented in this file. - `NimBLEEddystoneTLM` now correctly sets/gets negative temperatures. - Adding to the whitelist will now allow the device to be added again if the previous attempts failed. - The IPC calls added to esp_nimble_hci have been removed to prevent IPC stack crashing. + - Espressif log tag renamed from "TAG" to "LOG_TAG" to avoid conflict with Arduino core definition. ### Added - `NimBLEAdvertisedDevice` new method: `getAdvFlags`, to read the flags advertised. diff --git a/src/nimble/esp_port/esp-hci/include/esp_nimble_hci.h b/src/nimble/esp_port/esp-hci/include/esp_nimble_hci.h index 5d98edf5..58f2e045 100644 --- a/src/nimble/esp_port/esp-hci/include/esp_nimble_hci.h +++ b/src/nimble/esp_port/esp-hci/include/esp_nimble_hci.h @@ -53,7 +53,7 @@ esp_err_t esp_nimble_hci_init(void); * * int ret = esp_nimble_hci_and_controller_init(); * if (ret != ESP_OK) { - ESP_LOGE(TAG, "esp_nimble_hci_and_controller_init() failed with error: %d", ret); + ESP_LOGE(LOG_TAG, "esp_nimble_hci_and_controller_init() failed with error: %d", ret); * return; * } * @@ -103,7 +103,7 @@ esp_err_t esp_nimble_hci_deinit(void); * * ret = esp_nimble_hci_and_controller_deinit(); * if (ret != ESP_OK) { - ESP_LOGE(TAG, "esp_nimble_hci_and_controller_deinit() failed with error: %d", ret); + ESP_LOGE(LOG_TAG, "esp_nimble_hci_and_controller_deinit() failed with error: %d", ret); * } * } * @endcode diff --git a/src/nimble/esp_port/esp-hci/src/esp_nimble_hci.c b/src/nimble/esp_port/esp-hci/src/esp_nimble_hci.c index 56ee5029..5aa5d7ea 100644 --- a/src/nimble/esp_port/esp-hci/src/esp_nimble_hci.c +++ b/src/nimble/esp_port/esp-hci/src/esp_nimble_hci.c @@ -51,7 +51,7 @@ static struct os_mempool ble_hci_evt_lo_pool; static os_membuf_t *ble_hci_evt_lo_buf; static SemaphoreHandle_t vhci_send_sem; -const static char *TAG = "NimBLE"; +const static char *LOG_TAG = "NimBLE"; int os_msys_buf_alloc(void); void os_msys_buf_free(void); @@ -77,7 +77,7 @@ int ble_hci_trans_hs_cmd_tx(uint8_t *cmd) *cmd = BLE_HCI_UART_H4_CMD; len = BLE_HCI_CMD_HDR_LEN + cmd[3] + 1; if (!esp_vhci_host_check_send_available()) { - ESP_LOGD(TAG, "Controller not ready to receive packets"); + ESP_LOGD(LOG_TAG, "Controller not ready to receive packets"); } if (xSemaphoreTake(vhci_send_sem, NIMBLE_VHCI_TIMEOUT_MS / portTICK_PERIOD_MS) == pdTRUE) { @@ -113,7 +113,7 @@ int ble_hci_trans_hs_acl_tx(struct os_mbuf *om) } if (!esp_vhci_host_check_send_available()) { - ESP_LOGD(TAG, "Controller not ready to receive packets"); + ESP_LOGD(LOG_TAG, "Controller not ready to receive packets"); } len = 1 + OS_MBUF_PKTLEN(om); @@ -249,11 +249,11 @@ static void ble_hci_rx_acl(uint8_t *data, uint16_t len) m = ble_hci_trans_acl_buf_alloc(); if (!m) { - ESP_LOGE(TAG, "%s failed to allocate ACL buffers; increase ACL_BUF_COUNT", __func__); + ESP_LOGE(LOG_TAG, "%s failed to allocate ACL buffers; increase ACL_BUF_COUNT", __func__); return; } if ((rc = os_mbuf_append(m, data, len)) != 0) { - ESP_LOGE(TAG, "%s failed to os_mbuf_append; rc = %d", __func__, rc); + ESP_LOGE(LOG_TAG, "%s failed to os_mbuf_append; rc = %d", __func__, rc); os_mbuf_free_chain(m); return; } @@ -338,7 +338,7 @@ static int host_rcv_pkt(uint8_t *data, uint16_t len) assert(totlen <= UINT8_MAX + BLE_HCI_EVENT_HDR_LEN); if (totlen > MYNEWT_VAL(BLE_HCI_EVT_BUF_SIZE)) { - ESP_LOGE(TAG, "Received HCI data length at host (%d) exceeds maximum configured HCI event buffer size (%d).", + ESP_LOGE(LOG_TAG, "Received HCI data length at host (%d) exceeds maximum configured HCI event buffer size (%d).", totlen, MYNEWT_VAL(BLE_HCI_EVT_BUF_SIZE)); ble_hs_sched_reset(BLE_HS_ECONTROLLER); return 0; diff --git a/src/nimble/nimble/host/store/config/src/ble_store_nvs.c b/src/nimble/nimble/host/store/config/src/ble_store_nvs.c index e09182d9..e427779c 100644 --- a/src/nimble/nimble/host/store/config/src/ble_store_nvs.c +++ b/src/nimble/nimble/host/store/config/src/ble_store_nvs.c @@ -44,7 +44,7 @@ typedef uint32_t nvs_handle_t; -static const char *TAG = "NIMBLE_NVS"; +static const char *LOG_TAG = "NIMBLE_NVS"; /***************************************************************************** * $ MISC * @@ -115,7 +115,7 @@ get_nvs_peer_record(char *key_string, struct ble_hs_dev_records *p_dev_rec) err = nvs_open(NIMBLE_NVS_NAMESPACE, NVS_READWRITE, &nimble_handle); if (err != ESP_OK) { - ESP_LOGE(TAG, "NVS open operation failed"); + ESP_LOGE(LOG_TAG, "NVS open operation failed"); return BLE_HS_ESTORE_FAIL; } @@ -144,7 +144,7 @@ get_nvs_db_value(int obj_type, char *key_string, union ble_store_value *val) err = nvs_open(NIMBLE_NVS_NAMESPACE, NVS_READWRITE, &nimble_handle); if (err != ESP_OK) { - ESP_LOGE(TAG, "NVS open operation failed"); + ESP_LOGE(LOG_TAG, "NVS open operation failed"); return BLE_HS_ESTORE_FAIL; } @@ -204,7 +204,7 @@ get_nvs_db_attribute(int obj_type, bool empty, void *value, int num_value) /* Check if the user is searching for empty index to write to */ if (err == ESP_ERR_NVS_NOT_FOUND) { if (empty) { - ESP_LOGD(TAG, "Empty NVS index found = %d for obj_type = %d", i, obj_type); + ESP_LOGD(LOG_TAG, "Empty NVS index found = %d for obj_type = %d", i, obj_type); return i; } } else if (err == ESP_OK) { @@ -236,7 +236,7 @@ get_nvs_db_attribute(int obj_type, bool empty, void *value, int num_value) } } } else { - ESP_LOGE(TAG, "NVS read operation failed while fetching size !!"); + ESP_LOGE(LOG_TAG, "NVS read operation failed while fetching size !!"); return -1; } } @@ -260,13 +260,13 @@ ble_nvs_delete_value(int obj_type, int8_t index) char key_string[NIMBLE_NVS_STR_NAME_MAX_LEN]; if (index > get_nvs_max_obj_value(obj_type)) { - ESP_LOGE(TAG, "Invalid index provided to delete"); + ESP_LOGE(LOG_TAG, "Invalid index provided to delete"); return BLE_HS_EUNKNOWN; } err = nvs_open(NIMBLE_NVS_NAMESPACE, NVS_READWRITE, &nimble_handle); if (err != ESP_OK) { - ESP_LOGE(TAG, "NVS open operation failed !!"); + ESP_LOGE(LOG_TAG, "NVS open operation failed !!"); return BLE_HS_ESTORE_FAIL; } @@ -297,20 +297,20 @@ ble_nvs_write_key_value(char *key, const void *value, size_t required_size) err = nvs_open(NIMBLE_NVS_NAMESPACE, NVS_READWRITE, &nimble_handle); if (err != ESP_OK) { - ESP_LOGE(TAG, "NVS open operation failed !!"); + ESP_LOGE(LOG_TAG, "NVS open operation failed !!"); return BLE_HS_ESTORE_FAIL; } err = nvs_set_blob(nimble_handle, key, value, required_size); if (err != ESP_OK) { - ESP_LOGE(TAG, "NVS write operation failed !!"); + ESP_LOGE(LOG_TAG, "NVS write operation failed !!"); goto error; } /* NVS commit and close */ err = nvs_commit(nimble_handle); if (err != ESP_OK) { - ESP_LOGE(TAG, "NVS commit operation failed !!"); + ESP_LOGE(LOG_TAG, "NVS commit operation failed !!"); goto error; } @@ -334,13 +334,13 @@ ble_store_nvs_write(int obj_type, const union ble_store_value *val) write_key_index = get_nvs_db_attribute(obj_type, 1, NULL, 0); if (write_key_index == -1) { - ESP_LOGE(TAG, "NVS operation failed !!"); + ESP_LOGE(LOG_TAG, "NVS operation failed !!"); return BLE_HS_ESTORE_FAIL; } else if (write_key_index > get_nvs_max_obj_value(obj_type)) { /* bare-bone config code will take care of capacity overflow event, * however another check added for consistency */ - ESP_LOGD(TAG, "NVS size overflow."); + ESP_LOGD(LOG_TAG, "NVS size overflow."); return BLE_HS_ESTORE_CAP; } @@ -365,13 +365,13 @@ ble_store_nvs_peer_records(int obj_type, const struct ble_hs_dev_records *p_dev_ write_key_index = get_nvs_db_attribute(obj_type, 1, NULL, 0); if (write_key_index == -1) { - ESP_LOGE(TAG, "NVS operation failed !!"); + ESP_LOGE(LOG_TAG, "NVS operation failed !!"); return BLE_HS_ESTORE_FAIL; } else if (write_key_index > get_nvs_max_obj_value(obj_type)) { /* bare-bone config code will take care of capacity overflow event, * however another check added for consistency */ - ESP_LOGD(TAG, "NVS size overflow."); + ESP_LOGD(LOG_TAG, "NVS size overflow."); return BLE_HS_ESTORE_CAP; } @@ -405,7 +405,7 @@ populate_db_from_nvs(int obj_type, void *dst, int *db_num) if (err == ESP_ERR_NVS_NOT_FOUND) { continue; } else if (err != ESP_OK) { - ESP_LOGE(TAG, "NVS read operation failed !!"); + ESP_LOGE(LOG_TAG, "NVS read operation failed !!"); return -1; } #if MYNEWT_VAL(BLE_HOST_BASED_PRIVACY) @@ -414,14 +414,14 @@ populate_db_from_nvs(int obj_type, void *dst, int *db_num) if (err == ESP_ERR_NVS_NOT_FOUND) { continue; } else if (err != ESP_OK) { - ESP_LOGE(TAG, "NVS read operation failed !!"); + ESP_LOGE(LOG_TAG, "NVS read operation failed !!"); return -1; } } /* NVS index has data, fill up the ram db with it */ if (obj_type == BLE_STORE_OBJ_TYPE_PEER_DEV_REC) { - ESP_LOGD(TAG, "Peer dev records filled from NVS index = %d", i); + ESP_LOGD(LOG_TAG, "Peer dev records filled from NVS index = %d", i); memcpy(db_item, &p_dev_rec, sizeof(struct ble_hs_dev_records)); db_item += sizeof(struct ble_hs_dev_records); (*db_num)++; @@ -429,12 +429,12 @@ populate_db_from_nvs(int obj_type, void *dst, int *db_num) #endif { if (obj_type == BLE_STORE_OBJ_TYPE_CCCD) { - ESP_LOGD(TAG, "CCCD in RAM is filled up from NVS index = %d", i); + ESP_LOGD(LOG_TAG, "CCCD in RAM is filled up from NVS index = %d", i); memcpy(db_item, &cur.cccd, sizeof(struct ble_store_value_cccd)); db_item += sizeof(struct ble_store_value_cccd); (*db_num)++; } else { - ESP_LOGD(TAG, "KEY in RAM is filled up from NVS index = %d", i); + ESP_LOGD(LOG_TAG, "KEY in RAM is filled up from NVS index = %d", i); memcpy(db_item, &cur.sec, sizeof(struct ble_store_value_sec)); db_item += sizeof(struct ble_store_value_sec); (*db_num)++; @@ -455,27 +455,27 @@ ble_nvs_restore_sec_keys(void) err = populate_db_from_nvs(BLE_STORE_OBJ_TYPE_OUR_SEC, ble_store_config_our_secs, &ble_store_config_num_our_secs); if (err != ESP_OK) { - ESP_LOGE(TAG, "NVS operation failed for 'our sec'"); + ESP_LOGE(LOG_TAG, "NVS operation failed for 'our sec'"); return err; } - ESP_LOGD(TAG, "ble_store_config_our_secs restored %d bonds", ble_store_config_num_our_secs); + ESP_LOGD(LOG_TAG, "ble_store_config_our_secs restored %d bonds", ble_store_config_num_our_secs); err = populate_db_from_nvs(BLE_STORE_OBJ_TYPE_PEER_SEC, ble_store_config_peer_secs, &ble_store_config_num_peer_secs); if (err != ESP_OK) { - ESP_LOGE(TAG, "NVS operation failed for 'peer sec'"); + ESP_LOGE(LOG_TAG, "NVS operation failed for 'peer sec'"); return err; } - ESP_LOGD(TAG, "ble_store_config_peer_secs restored %d bonds", + ESP_LOGD(LOG_TAG, "ble_store_config_peer_secs restored %d bonds", ble_store_config_num_peer_secs); err = populate_db_from_nvs(BLE_STORE_OBJ_TYPE_CCCD, ble_store_config_cccds, &ble_store_config_num_cccds); if (err != ESP_OK) { - ESP_LOGE(TAG, "NVS operation failed for 'CCCD'"); + ESP_LOGE(LOG_TAG, "NVS operation failed for 'CCCD'"); return err; } - ESP_LOGD(TAG, "ble_store_config_cccds restored %d bonds", + ESP_LOGD(LOG_TAG, "ble_store_config_cccds restored %d bonds", ble_store_config_num_cccds); return 0; @@ -492,12 +492,12 @@ ble_nvs_restore_peer_records(void) err = populate_db_from_nvs(BLE_STORE_OBJ_TYPE_PEER_DEV_REC, peer_dev_rec, &ble_store_num_peer_dev_rec); if (err != ESP_OK) { - ESP_LOGE(TAG, "NVS operation failed fetching 'Peer Dev Records'"); + ESP_LOGE(LOG_TAG, "NVS operation failed fetching 'Peer Dev Records'"); return err; } ble_rpa_set_num_peer_dev_records(ble_store_num_peer_dev_rec); - ESP_LOGD(TAG, "peer_dev_rec restored %d records", ble_store_num_peer_dev_rec); + ESP_LOGD(LOG_TAG, "peer_dev_rec restored %d records", ble_store_num_peer_dev_rec); return 0; } @@ -510,14 +510,14 @@ int ble_store_config_persist_cccds(void) nvs_count = get_nvs_db_attribute(BLE_STORE_OBJ_TYPE_CCCD, 0, NULL, 0); if (nvs_count == -1) { - ESP_LOGE(TAG, "NVS operation failed while persisting CCCD"); + ESP_LOGE(LOG_TAG, "NVS operation failed while persisting CCCD"); return BLE_HS_ESTORE_FAIL; } if (nvs_count < ble_store_config_num_cccds) { /* NVS db count less than RAM count, write operation */ - ESP_LOGD(TAG, "Persisting CCCD value in NVS..."); + ESP_LOGD(LOG_TAG, "Persisting CCCD value in NVS..."); val.cccd = ble_store_config_cccds[ble_store_config_num_cccds - 1]; return ble_store_nvs_write(BLE_STORE_OBJ_TYPE_CCCD, &val); } else if (nvs_count > ble_store_config_num_cccds) { @@ -525,10 +525,10 @@ int ble_store_config_persist_cccds(void) nvs_idx = get_nvs_db_attribute(BLE_STORE_OBJ_TYPE_CCCD, 0, ble_store_config_cccds, ble_store_config_num_cccds); if (nvs_idx == -1) { - ESP_LOGE(TAG, "NVS delete operation failed for CCCD"); + ESP_LOGE(LOG_TAG, "NVS delete operation failed for CCCD"); return BLE_HS_ESTORE_FAIL; } - ESP_LOGD(TAG, "Deleting CCCD, nvs idx = %d", nvs_idx); + ESP_LOGD(LOG_TAG, "Deleting CCCD, nvs idx = %d", nvs_idx); return ble_nvs_delete_value(BLE_STORE_OBJ_TYPE_CCCD, nvs_idx); } return 0; @@ -541,14 +541,14 @@ int ble_store_config_persist_peer_secs(void) nvs_count = get_nvs_db_attribute(BLE_STORE_OBJ_TYPE_PEER_SEC, 0, NULL, 0); if (nvs_count == -1) { - ESP_LOGE(TAG, "NVS operation failed while persisting peer sec"); + ESP_LOGE(LOG_TAG, "NVS operation failed while persisting peer sec"); return BLE_HS_ESTORE_FAIL; } if (nvs_count < ble_store_config_num_peer_secs) { /* NVS db count less than RAM count, write operation */ - ESP_LOGD(TAG, "Persisting peer sec value in NVS..."); + ESP_LOGD(LOG_TAG, "Persisting peer sec value in NVS..."); val.sec = ble_store_config_peer_secs[ble_store_config_num_peer_secs - 1]; return ble_store_nvs_write(BLE_STORE_OBJ_TYPE_PEER_SEC, &val); } else if (nvs_count > ble_store_config_num_peer_secs) { @@ -556,10 +556,10 @@ int ble_store_config_persist_peer_secs(void) nvs_idx = get_nvs_db_attribute(BLE_STORE_OBJ_TYPE_PEER_SEC, 0, ble_store_config_peer_secs, ble_store_config_num_peer_secs); if (nvs_idx == -1) { - ESP_LOGE(TAG, "NVS delete operation failed for peer sec"); + ESP_LOGE(LOG_TAG, "NVS delete operation failed for peer sec"); return BLE_HS_ESTORE_FAIL; } - ESP_LOGD(TAG, "Deleting peer sec, nvs idx = %d", nvs_idx); + ESP_LOGD(LOG_TAG, "Deleting peer sec, nvs idx = %d", nvs_idx); return ble_nvs_delete_value(BLE_STORE_OBJ_TYPE_PEER_SEC, nvs_idx); } return 0; @@ -572,14 +572,14 @@ int ble_store_config_persist_our_secs(void) nvs_count = get_nvs_db_attribute(BLE_STORE_OBJ_TYPE_OUR_SEC, 0, NULL, 0); if (nvs_count == -1) { - ESP_LOGE(TAG, "NVS operation failed while persisting our sec"); + ESP_LOGE(LOG_TAG, "NVS operation failed while persisting our sec"); return BLE_HS_ESTORE_FAIL; } if (nvs_count < ble_store_config_num_our_secs) { /* NVS db count less than RAM count, write operation */ - ESP_LOGD(TAG, "Persisting our sec value to NVS..."); + ESP_LOGD(LOG_TAG, "Persisting our sec value to NVS..."); val.sec = ble_store_config_our_secs[ble_store_config_num_our_secs - 1]; return ble_store_nvs_write(BLE_STORE_OBJ_TYPE_OUR_SEC, &val); } else if (nvs_count > ble_store_config_num_our_secs) { @@ -587,10 +587,10 @@ int ble_store_config_persist_our_secs(void) nvs_idx = get_nvs_db_attribute(BLE_STORE_OBJ_TYPE_OUR_SEC, 0, ble_store_config_our_secs, ble_store_config_num_our_secs); if (nvs_idx == -1) { - ESP_LOGE(TAG, "NVS delete operation failed for our sec"); + ESP_LOGE(LOG_TAG, "NVS delete operation failed for our sec"); return BLE_HS_ESTORE_FAIL; } - ESP_LOGD(TAG, "Deleting our sec, nvs idx = %d", nvs_idx); + ESP_LOGD(LOG_TAG, "Deleting our sec, nvs idx = %d", nvs_idx); return ble_nvs_delete_value(BLE_STORE_OBJ_TYPE_OUR_SEC, nvs_idx); } return 0; @@ -606,14 +606,14 @@ int ble_store_persist_peer_records(void) nvs_count = get_nvs_db_attribute(BLE_STORE_OBJ_TYPE_PEER_DEV_REC, 0, NULL, 0); if (nvs_count == -1) { - ESP_LOGE(TAG, "NVS operation failed while persisting peer_dev_rec"); + ESP_LOGE(LOG_TAG, "NVS operation failed while persisting peer_dev_rec"); return BLE_HS_ESTORE_FAIL; } if (nvs_count < ble_store_num_peer_dev_rec) { /* NVS db count less than RAM count, write operation */ - ESP_LOGD(TAG, "Persisting peer dev record to NVS..."); + ESP_LOGD(LOG_TAG, "Persisting peer dev record to NVS..."); peer_rec = peer_dev_rec[ble_store_num_peer_dev_rec - 1]; return ble_store_nvs_peer_records(BLE_STORE_OBJ_TYPE_PEER_DEV_REC, &peer_rec); } else if (nvs_count > ble_store_num_peer_dev_rec) { @@ -622,10 +622,10 @@ int ble_store_persist_peer_records(void) peer_dev_rec, ble_store_num_peer_dev_rec); if (nvs_idx == -1) { - ESP_LOGE(TAG, "NVS delete operation failed for peer records"); + ESP_LOGE(LOG_TAG, "NVS delete operation failed for peer records"); return BLE_HS_ESTORE_FAIL; } - ESP_LOGD(TAG, "Deleting peer record, nvs idx = %d", nvs_idx); + ESP_LOGD(LOG_TAG, "Deleting peer record, nvs idx = %d", nvs_idx); return ble_nvs_delete_value(BLE_STORE_OBJ_TYPE_PEER_DEV_REC, nvs_idx); } return 0; @@ -638,12 +638,12 @@ void ble_store_config_conf_init(void) err = ble_nvs_restore_sec_keys(); if (err != 0) { - ESP_LOGE(TAG, "NVS operation failed, can't retrieve the bonding info"); + ESP_LOGE(LOG_TAG, "NVS operation failed, can't retrieve the bonding info"); } #if MYNEWT_VAL(BLE_HOST_BASED_PRIVACY) err = ble_nvs_restore_peer_records(); if (err != 0) { - ESP_LOGE(TAG, "NVS operation failed, can't retrieve the peer records"); + ESP_LOGE(LOG_TAG, "NVS operation failed, can't retrieve the peer records"); } #endif } diff --git a/src/nimble/porting/npl/freertos/src/npl_os_freertos.c b/src/nimble/porting/npl/freertos/src/npl_os_freertos.c index 27338b26..57a94e78 100644 --- a/src/nimble/porting/npl/freertos/src/npl_os_freertos.c +++ b/src/nimble/porting/npl/freertos/src/npl_os_freertos.c @@ -55,7 +55,7 @@ static void *rtc0_isr_addr; #endif #if CONFIG_BT_NIMBLE_USE_ESP_TIMER -static const char *TAG = "Timer"; +static const char *LOG_TAG = "Timer"; #endif #define OS_MEM_ALLOC (1) @@ -860,10 +860,10 @@ IRAM_ATTR npl_freertos_callout_deinit(struct ble_npl_callout *co) #if CONFIG_BT_NIMBLE_USE_ESP_TIMER if(esp_timer_stop(callout->handle)) - ESP_LOGD(TAG, "Timer not stopped"); + ESP_LOGD(LOG_TAG, "Timer not stopped"); if(esp_timer_delete(callout->handle)) - ESP_LOGW(TAG, "Timer not deleted"); + ESP_LOGW(LOG_TAG, "Timer not deleted"); #else @@ -1347,7 +1347,7 @@ void npl_freertos_funcs_deinit(void) #include "esp_log.h" portMUX_TYPE ble_port_mutex = portMUX_INITIALIZER_UNLOCKED; # if CONFIG_BT_NIMBLE_USE_ESP_TIMER -static const char *TAG = "Timer"; +static const char *LOG_TAG = "Timer"; # endif #else @@ -1777,10 +1777,10 @@ npl_freertos_callout_deinit(struct ble_npl_callout *co) #if CONFIG_BT_NIMBLE_USE_ESP_TIMER if(esp_timer_stop(co->handle)) - ESP_LOGW(TAG, "Timer not stopped"); + ESP_LOGW(LOG_TAG, "Timer not stopped"); if(esp_timer_delete(co->handle)) - ESP_LOGW(TAG, "Timer not deleted"); + ESP_LOGW(LOG_TAG, "Timer not deleted"); #else xTimerDelete(co->handle, portMAX_DELAY); ble_npl_event_deinit(&co->ev);