From a68c698c67ba30c692cf15a1e3ac7067535523a3 Mon Sep 17 00:00:00 2001 From: chenqingqing Date: Fri, 4 Aug 2023 17:35:59 +0800 Subject: [PATCH] fix(bt): Fix argument type of ESP_LOGI for spp examples about format error Closes https://github.com/espressif/esp-idf/pull/11819 --- .../bluetooth/bluedroid/classic_bt/bt_spp_acceptor/main/main.c | 2 +- .../bluetooth/bluedroid/classic_bt/bt_spp_initiator/main/main.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/bluetooth/bluedroid/classic_bt/bt_spp_acceptor/main/main.c b/examples/bluetooth/bluedroid/classic_bt/bt_spp_acceptor/main/main.c index 4449434e27..617e67f569 100644 --- a/examples/bluetooth/bluedroid/classic_bt/bt_spp_acceptor/main/main.c +++ b/examples/bluetooth/bluedroid/classic_bt/bt_spp_acceptor/main/main.c @@ -107,7 +107,7 @@ static void esp_spp_cb(esp_spp_cb_event_t event, esp_spp_cb_param_t *param) * rather than in this callback directly. Since the printing takes too much time, it may stuck the Bluetooth * stack and also have a effect on the throughput! */ - ESP_LOGI(SPP_TAG, "ESP_SPP_DATA_IND_EVT len:%d handle:%d", + ESP_LOGI(SPP_TAG, "ESP_SPP_DATA_IND_EVT len:%d handle:%"PRIu32, param->data_ind.len, param->data_ind.handle); if (param->data_ind.len < 128) { esp_log_buffer_hex("", param->data_ind.data, param->data_ind.len); diff --git a/examples/bluetooth/bluedroid/classic_bt/bt_spp_initiator/main/main.c b/examples/bluetooth/bluedroid/classic_bt/bt_spp_initiator/main/main.c index 3934336d6c..137847f68b 100644 --- a/examples/bluetooth/bluedroid/classic_bt/bt_spp_initiator/main/main.c +++ b/examples/bluetooth/bluedroid/classic_bt/bt_spp_initiator/main/main.c @@ -189,7 +189,7 @@ static void esp_spp_cb(esp_spp_cb_event_t event, esp_spp_cb_param_t *param) * rather than in this callback directly. Since the printing takes too much time, it may stuck the Bluetooth * stack and also have a effect on the throughput! */ - ESP_LOGI(SPP_TAG, "ESP_SPP_WRITE_EVT len:%d handle:%d cong:%d", param->write.len, param->write.handle, + ESP_LOGI(SPP_TAG, "ESP_SPP_WRITE_EVT len:%d handle:%"PRIu32" cong:%d", param->write.len, param->write.handle, param->write.cong); if (param->write.len < 128) { esp_log_buffer_hex("", spp_data, param->write.len);