bt host: Don't redefine the assert macro

Required so that bt asserts obey the same configuration settings as other
asserts.

Progress towards https://github.com/espressif/esp-idf/issues/6306
This commit is contained in:
Angus Gratton 2021-02-18 10:10:49 +11:00
parent 10bde42551
commit a0c73c5f92
8 changed files with 8 additions and 11 deletions

View File

@ -16,6 +16,7 @@
#ifndef _BT_COMMON_H_
#define _BT_COMMON_H_
#include <assert.h>
#include "bt_user_config.h"
#include "esp_log.h"
@ -87,10 +88,6 @@
#define BT_PRINT_D(tag, format, ...) {esp_log_write(ESP_LOG_DEBUG, tag, LOG_FORMAT(D, format), esp_log_timestamp(), tag, ##__VA_ARGS__); }
#define BT_PRINT_V(tag, format, ...) {esp_log_write(ESP_LOG_VERBOSE, tag, LOG_FORMAT(V, format), esp_log_timestamp(), tag, ##__VA_ARGS__); }
#ifndef assert
#define assert(x) do { if (!(x)) BT_PRINT_E("BT", "bt host error %s %u\n", __FILE__, __LINE__); } while (0)
#endif
#if !UC_BT_STACK_NO_LOG
/* define traces for BTC */

View File

@ -27,7 +27,7 @@
#include "common/bt_target.h"
#if defined(BTA_AV_INCLUDED) && (BTA_AV_INCLUDED == TRUE)
// #include <assert.h>
#include <assert.h>
#include "common/bt_trace.h"
#include <string.h>

View File

@ -22,7 +22,7 @@
*
******************************************************************************/
// #include <assert.h>
#include <assert.h>
#include <string.h>
#include "common/bt_target.h"

View File

@ -23,7 +23,7 @@
*
******************************************************************************/
// #include <assert.h>
#include <assert.h>
#include <string.h>
#include "bta/bta_sys.h"

View File

@ -23,7 +23,7 @@
******************************************************************************/
#define LOG_TAG "bt_bta_sys_main"
// #include <assert.h>
#include <assert.h>
#include <string.h>
#include "osi/alarm.h"

View File

@ -22,7 +22,7 @@
*
******************************************************************************/
// #include <assert.h>
#include <assert.h>
#include "common/bt_trace.h"
#include <string.h>

View File

@ -21,7 +21,7 @@
* Interface to AVRCP mandatory commands
*
******************************************************************************/
// #include <assert.h>
#include <assert.h>
#include "common/bt_trace.h"
#include <string.h>
#include "common/bt_target.h"

View File

@ -21,7 +21,7 @@
* Interface to AVRCP optional commands
*
******************************************************************************/
// #include <assert.h>
#include <assert.h>
#include "common/bt_target.h"
#include <string.h>
#include "stack/avrc_api.h"