From 758a9e5f064289f2f630f33fc7ccd71ac8d01b7f Mon Sep 17 00:00:00 2001 From: Tian Hao Date: Tue, 29 Nov 2016 19:45:10 +0800 Subject: [PATCH] component/bt : fix compile error --- components/bt/bluedroid/api/esp_gattc_api.c | 3 ++- components/bt/bluedroid/api/esp_gatts_api.c | 3 ++- components/bt/bluedroid/btc/profile/std/gatt/btc_gatts.c | 7 ------- components/bt/bluedroid/include/bt_trace.h | 2 +- 4 files changed, 5 insertions(+), 10 deletions(-) diff --git a/components/bt/bluedroid/api/esp_gattc_api.c b/components/bt/bluedroid/api/esp_gattc_api.c index 6c2fd340b5..3c17f73371 100644 --- a/components/bt/bluedroid/api/esp_gattc_api.c +++ b/components/bt/bluedroid/api/esp_gattc_api.c @@ -33,7 +33,8 @@ esp_err_t esp_ble_gattc_app_register(uint16_t app_id) btc_msg_t msg; btc_ble_gattc_args_t arg; - if (app_id < ESP_APP_ID_MIN || app_id > ESP_APP_ID_MAX) { + //if (app_id < ESP_APP_ID_MIN || app_id > ESP_APP_ID_MAX) { + if (app_id > ESP_APP_ID_MAX) { return ESP_ERR_INVALID_ARG; } diff --git a/components/bt/bluedroid/api/esp_gatts_api.c b/components/bt/bluedroid/api/esp_gatts_api.c index 66b2b5b165..803ff030dd 100644 --- a/components/bt/bluedroid/api/esp_gatts_api.c +++ b/components/bt/bluedroid/api/esp_gatts_api.c @@ -30,7 +30,8 @@ esp_err_t esp_ble_gatts_app_register(uint16_t app_id) btc_msg_t msg; btc_ble_gatts_args_t arg; - if (app_id < ESP_APP_ID_MIN || app_id > ESP_APP_ID_MAX) { + //if (app_id < ESP_APP_ID_MIN || app_id > ESP_APP_ID_MAX) { + if (app_id > ESP_APP_ID_MAX) { return ESP_ERR_INVALID_ARG; } diff --git a/components/bt/bluedroid/btc/profile/std/gatt/btc_gatts.c b/components/bt/bluedroid/btc/profile/std/gatt/btc_gatts.c index 54d278a088..8a844f6258 100644 --- a/components/bt/bluedroid/btc/profile/std/gatt/btc_gatts.c +++ b/components/bt/bluedroid/btc/profile/std/gatt/btc_gatts.c @@ -433,11 +433,4 @@ void btc_gatts_cb_handler(btc_msg_t *msg) } btc_gatts_cb_param_copy_free(msg, p_data); - - //ets_printf("yyy\n"); } - - - - - diff --git a/components/bt/bluedroid/include/bt_trace.h b/components/bt/bluedroid/include/bt_trace.h index d50e2e77d3..fd92f6e8c5 100644 --- a/components/bt/bluedroid/include/bt_trace.h +++ b/components/bt/bluedroid/include/bt_trace.h @@ -271,7 +271,7 @@ inline void trc_dump_buffer(uint8_t *prefix, uint8_t *data, uint16_t len) #ifndef LOG_LEVEL #define LOG_LEVEL LOG_LEVEL_INFO #endif -#define LOG_ERROR(fmt, args...) do {if (LOG_LEVEL >= LOG_LEVEL_ERROR) printf(fmt,## args);} while(0) +#define LOG_ERROR(fmt, args...) do {if (LOG_LEVEL >= LOG_LEVEL_ERROR) BT_PRINTF(fmt,## args);} while(0) #define LOG_WARN(fmt, args...) do {if (LOG_LEVEL >= LOG_LEVEL_WARN) BT_PRINTF(fmt,## args);} while(0) #define LOG_INFO(fmt, args...) do {if (LOG_LEVEL >= LOG_LEVEL_INFO) BT_PRINTF(fmt,## args);} while(0) #define LOG_DEBUG(fmt, args...) do {if (LOG_LEVEL >= LOG_LEVEL_DEBUG) BT_PRINTF(fmt,## args);} while(0) -- 2.40.0