component/bt : use ESP_LOGx instead of printf
This commit is contained in:
parent
9f33d8f5c0
commit
5a14e8addf
3 changed files with 8 additions and 22 deletions
|
@ -8,18 +8,6 @@ config BT_ENABLED
|
|||
help
|
||||
This compiles in the low-level BT stack.
|
||||
|
||||
menu "BT UTILITY OPTION"
|
||||
visible if BT_ENABLED
|
||||
|
||||
config BT_USE_ETS_PRINT
|
||||
bool "BT use print which has nolock"
|
||||
default y
|
||||
depends on BT_ENABLED
|
||||
help
|
||||
This select use print or ets_print
|
||||
|
||||
endmenu #menu
|
||||
|
||||
config BTC_TASK_STACK_SIZE
|
||||
int "BT event (callback to application) task stack size"
|
||||
default 2048
|
||||
|
|
|
@ -59,7 +59,7 @@ tBTA_SDP_STATUS BTA_SdpEnable(tBTA_SDP_DM_CBACK *p_cback)
|
|||
tBTA_SDP_STATUS status = BTA_SDP_FAILURE;
|
||||
tBTA_SDP_API_ENABLE *p_buf;
|
||||
|
||||
APPL_TRACE_API(__FUNCTION__);
|
||||
APPL_TRACE_API("%s\n", __FUNCTION__);
|
||||
if (p_cback && FALSE == bta_sys_is_register(BTA_ID_SDP)) {
|
||||
memset(&bta_sdp_cb, 0, sizeof(tBTA_SDP_CB));
|
||||
|
||||
|
@ -95,7 +95,7 @@ tBTA_SDP_STATUS BTA_SdpSearch(BD_ADDR bd_addr, tSDP_UUID *uuid)
|
|||
tBTA_SDP_STATUS ret = BTA_SDP_FAILURE;
|
||||
tBTA_SDP_API_SEARCH *p_msg;
|
||||
|
||||
APPL_TRACE_API(__FUNCTION__);
|
||||
APPL_TRACE_API("%s\n", __FUNCTION__);
|
||||
if ((p_msg = (tBTA_SDP_API_SEARCH *)GKI_getbuf(sizeof(tBTA_SDP_API_SEARCH))) != NULL) {
|
||||
p_msg->hdr.event = BTA_SDP_API_SEARCH_EVT;
|
||||
bdcpy(p_msg->bd_addr, bd_addr);
|
||||
|
@ -125,7 +125,7 @@ tBTA_SDP_STATUS BTA_SdpCreateRecordByUser(void *user_data)
|
|||
tBTA_SDP_STATUS ret = BTA_SDP_FAILURE;
|
||||
tBTA_SDP_API_RECORD_USER *p_msg;
|
||||
|
||||
APPL_TRACE_API(__FUNCTION__);
|
||||
APPL_TRACE_API("%s\n", __FUNCTION__);
|
||||
if ((p_msg = (tBTA_SDP_API_RECORD_USER *)GKI_getbuf(sizeof(tBTA_SDP_API_RECORD_USER))) != NULL) {
|
||||
p_msg->hdr.event = BTA_SDP_API_CREATE_RECORD_USER_EVT;
|
||||
p_msg->user_data = user_data;
|
||||
|
@ -153,7 +153,7 @@ tBTA_SDP_STATUS BTA_SdpRemoveRecordByUser(void *user_data)
|
|||
tBTA_SDP_STATUS ret = BTA_SDP_FAILURE;
|
||||
tBTA_SDP_API_RECORD_USER *p_msg;
|
||||
|
||||
APPL_TRACE_API(__FUNCTION__);
|
||||
APPL_TRACE_API("%s\n", __FUNCTION__);
|
||||
if ((p_msg = (tBTA_SDP_API_RECORD_USER *)GKI_getbuf(sizeof(tBTA_SDP_API_RECORD_USER))) != NULL) {
|
||||
p_msg->hdr.event = BTA_SDP_API_REMOVE_RECORD_USER_EVT;
|
||||
p_msg->user_data = user_data;
|
||||
|
|
|
@ -22,13 +22,11 @@
|
|||
#include <stdio.h>
|
||||
#include "bt_types.h"
|
||||
|
||||
#include "rom/ets_sys.h"
|
||||
#include "esp_log.h"
|
||||
|
||||
#ifdef CONFIG_BT_USE_ETS_PRINT
|
||||
#define BT_PRINTF ets_printf
|
||||
#else
|
||||
#define BT_PRINTF printf
|
||||
#endif
|
||||
#define TAG "BT"
|
||||
|
||||
#define BT_PRINTF(fmt, ...) ESP_LOGE(TAG, fmt, ##__VA_ARGS__)
|
||||
|
||||
#ifndef assert
|
||||
#define assert(x) do { if (!(x)) BT_PRINTF("bt host error %s %u\n", __FILE__, __LINE__); } while (0)
|
||||
|
|
Loading…
Reference in a new issue