summaryrefslogtreecommitdiff
path: root/lib/bt/host/bluedroid/common/include
diff options
context:
space:
mode:
authorjacqueline <me@jacqueline.id.au>2025-07-25 13:33:07 +1000
committerjacqueline <me@jacqueline.id.au>2025-07-25 13:33:07 +1000
commitc8e79a926620e48830778714cfe4b2ea2453fcaf (patch)
tree8c756e08e01b8e147cf72bec128026f46bd854c5 /lib/bt/host/bluedroid/common/include
parent237136f3e93cb6b5be24670d7520adb17cc0fa36 (diff)
downloadtangara-fw-c8e79a926620e48830778714cfe4b2ea2453fcaf.tar.gz
Update forked idf components
Diffstat (limited to 'lib/bt/host/bluedroid/common/include')
-rw-r--r--lib/bt/host/bluedroid/common/include/common/bluedroid_user_config.h263
-rw-r--r--lib/bt/host/bluedroid/common/include/common/bt_target.h473
-rw-r--r--lib/bt/host/bluedroid/common/include/common/bt_trace.h192
3 files changed, 873 insertions, 55 deletions
diff --git a/lib/bt/host/bluedroid/common/include/common/bluedroid_user_config.h b/lib/bt/host/bluedroid/common/include/common/bluedroid_user_config.h
index 81cfbaac..16a6320d 100644
--- a/lib/bt/host/bluedroid/common/include/common/bluedroid_user_config.h
+++ b/lib/bt/host/bluedroid/common/include/common/bluedroid_user_config.h
@@ -39,6 +39,25 @@
#define UC_BT_A2DP_ENABLED FALSE
#endif
+#ifdef CONFIG_BT_A2DP_USE_EXTERNAL_CODEC
+#define UC_BT_A2DP_USE_EXTERNAL_CODEC CONFIG_BT_A2DP_USE_EXTERNAL_CODEC
+#else
+#define UC_BT_A2DP_USE_EXTERNAL_CODEC FALSE
+#endif
+
+//AVRCP
+#ifdef CONFIG_BT_AVRCP_ENABLED
+#define UC_BT_AVRCP_ENABLED TRUE
+#ifdef CONFIG_BT_AVRCP_CT_COVER_ART_ENABLED
+#define UC_BT_AVRCP_CT_COVER_ART_ENABLED CONFIG_BT_AVRCP_CT_COVER_ART_ENABLED
+#else
+#define UC_BT_AVRCP_CT_COVER_ART_ENABLED FALSE
+#endif
+#else
+#define UC_BT_AVRCP_ENABLED FALSE
+#define UC_BT_AVRCP_CT_COVER_ART_ENABLED FALSE
+#endif
+
//SPP
#ifdef CONFIG_BT_SPP_ENABLED
#define UC_BT_SPP_ENABLED CONFIG_BT_SPP_ENABLED
@@ -48,16 +67,37 @@
//L2CAP
#ifdef CONFIG_BT_L2CAP_ENABLED
-#define UC_BT_L2CAP_ENABLED CONFIG_BT_L2CAP_ENABLED
+#define UC_BT_L2CAP_ENABLED CONFIG_BT_L2CAP_ENABLED
#else
-#define UC_BT_L2CAP_ENABLED FALSE
+#define UC_BT_L2CAP_ENABLED FALSE
+#endif
+
+//SDP common
+#ifdef CONFIG_BT_SDP_COMMON_ENABLED
+#define UC_BT_SDP_COMMON_ENABLED CONFIG_BT_SDP_COMMON_ENABLED
+#else
+#define UC_BT_SDP_COMMON_ENABLED FALSE
+#endif
+
+// SDP Pad Length
+#ifdef CONFIG_BT_SDP_PAD_LEN
+#define UC_SDP_MAX_PAD_LEN CONFIG_BT_SDP_PAD_LEN
+#else
+#define UC_SDP_MAX_PAD_LEN 300
+#endif
+
+// SDP Max Attribute Length
+#ifdef CONFIG_BT_SDP_ATTR_LEN
+#define UC_SDP_MAX_ATTR_LEN CONFIG_BT_SDP_ATTR_LEN
+#else
+#define UC_SDP_MAX_ATTR_LEN 300
#endif
//HFP(AG)
#ifdef CONFIG_BT_HFP_AG_ENABLE
-#define UC_BT_HFP_AG_ENABLED CONFIG_BT_HFP_AG_ENABLE
+#define UC_BT_HFP_AG_ENABLED CONFIG_BT_HFP_AG_ENABLE
#else
-#define UC_BT_HFP_AG_ENABLED FALSE
+#define UC_BT_HFP_AG_ENABLED FALSE
#endif
//HFP(Client)
@@ -67,6 +107,12 @@
#define UC_BT_HFP_CLIENT_ENABLED FALSE
#endif
+#ifdef CONFIG_BT_HFP_USE_EXTERNAL_CODEC
+#define UC_BT_HFP_USE_EXTERNAL_CODEC CONFIG_BT_HFP_USE_EXTERNAL_CODEC
+#else
+#define UC_BT_HFP_USE_EXTERNAL_CODEC FALSE
+#endif
+
//HID
#ifdef CONFIG_BT_HID_ENABLED
#define UC_BT_HID_ENABLED CONFIG_BT_HID_ENABLED
@@ -88,6 +134,13 @@
#define UC_BT_HID_DEVICE_ENABLED FALSE
#endif
+//HID remove device bonding option
+#ifdef CONFIG_BT_HID_REMOVE_DEVICE_BONDING_ENABLED
+#define UC_BT_HID_REMOVE_DEVICE_BONDING_ENABLED CONFIG_BT_HID_REMOVE_DEVICE_BONDING_ENABLED
+#else
+#define UC_BT_HID_REMOVE_DEVICE_BONDING_ENABLED FALSE
+#endif
+
//BQB(BT)
#ifdef CONFIG_BT_CLASSIC_BQB_ENABLED
#define UC_BT_CLASSIC_BQB_ENABLED CONFIG_BT_CLASSIC_BQB_ENABLED
@@ -104,6 +157,32 @@
#define UC_BT_ENC_KEY_SIZE_CTRL_MODE 0
#endif
+//PBAP Client
+#ifdef CONFIG_BT_PBAC_ENABLED
+#define UC_BT_PBAC_ENABLED CONFIG_BT_PBAC_ENABLED
+#else
+#define UC_BT_PBAC_ENABLED FALSE
+#endif
+
+#ifdef CONFIG_BT_PBAC_SUPPORTED_FEAT
+#define UC_BT_PBAC_SUPPORTED_FEAT CONFIG_BT_PBAC_SUPPORTED_FEAT
+#else
+#define UC_BT_PBAC_SUPPORTED_FEAT 0x00
+#endif
+
+#ifdef CONFIG_BT_PBAC_PREFERRED_MTU
+#define UC_BT_PBAC_PREFERRED_MTU CONFIG_BT_PBAC_PREFERRED_MTU
+#else
+#define UC_BT_PBAC_PREFERRED_MTU 0
+#endif
+
+//GOEPC (BT)
+#ifdef CONFIG_BT_GOEPC_ENABLED
+#define UC_BT_GOEPC_ENABLED CONFIG_BT_GOEPC_ENABLED
+#else
+#define UC_BT_GOEPC_ENABLED FALSE
+#endif
+
//BLE
#ifdef CONFIG_BT_BLE_ENABLED
#define UC_BT_BLE_ENABLED CONFIG_BT_BLE_ENABLED
@@ -133,12 +212,60 @@
#define UC_BT_BLE_42_FEATURES_SUPPORTED FALSE
#endif
+#ifdef CONFIG_BT_BLE_42_DTM_TEST_EN
+#define UC_BT_BLE_42_DTM_TEST_EN CONFIG_BT_BLE_42_DTM_TEST_EN
+#else
+#define UC_BT_BLE_42_DTM_TEST_EN FALSE
+#endif
+
+#ifdef CONFIG_BT_BLE_42_ADV_EN
+#define UC_BT_BLE_42_ADV_EN CONFIG_BT_BLE_42_ADV_EN
+#else
+#define UC_BT_BLE_42_ADV_EN FALSE
+#endif
+
+#ifdef CONFIG_BT_BLE_42_SCAN_EN
+#define UC_BT_BLE_42_SCAN_EN CONFIG_BT_BLE_42_SCAN_EN
+#else
+#define UC_BT_BLE_42_SCAN_EN FALSE
+#endif
+
#ifdef CONFIG_BT_BLE_FEAT_PERIODIC_ADV_SYNC_TRANSFER
#define UC_BT_BLE_FEAT_PERIODIC_ADV_SYNC_TRANSFER CONFIG_BT_BLE_FEAT_PERIODIC_ADV_SYNC_TRANSFER
#else
#define UC_BT_BLE_FEAT_PERIODIC_ADV_SYNC_TRANSFER FALSE
#endif
+#ifdef CONFIG_BT_BLE_50_EXTEND_ADV_EN
+#define UC_BT_BLE_50_EXTEND_ADV_EN CONFIG_BT_BLE_50_EXTEND_ADV_EN
+#else
+#define UC_BT_BLE_50_EXTEND_ADV_EN FALSE
+#endif
+
+#ifdef CONFIG_BT_BLE_50_PERIODIC_ADV_EN
+#define UC_BT_BLE_50_PERIODIC_ADV_EN CONFIG_BT_BLE_50_PERIODIC_ADV_EN
+#else
+#define UC_BT_BLE_50_PERIODIC_ADV_EN FALSE
+#endif
+
+#ifdef CONFIG_BT_BLE_50_EXTEND_SCAN_EN
+#define UC_BT_BLE_50_EXTEND_SCAN_EN CONFIG_BT_BLE_50_EXTEND_SCAN_EN
+#else
+#define UC_BT_BLE_50_EXTEND_SCAN_EN FALSE
+#endif
+
+#ifdef CONFIG_BT_BLE_50_EXTEND_SYNC_EN
+#define UC_BT_BLE_50_EXTEND_SYNC_EN CONFIG_BT_BLE_50_EXTEND_SYNC_EN
+#else
+#define UC_BT_BLE_50_EXTEND_SYNC_EN FALSE
+#endif
+
+#ifdef CONFIG_BT_BLE_50_DTM_TEST_EN
+#define UC_BT_BLE_50_DTM_TEST_EN CONFIG_BT_BLE_50_DTM_TEST_EN
+#else
+#define UC_BT_BLE_50_DTM_TEST_EN FALSE
+#endif
+
#ifdef CONFIG_BT_BLE_FEAT_PERIODIC_ADV_ENH
#define UC_BT_BLE_FEAT_PERIODIC_ADV_ENH CONFIG_BT_BLE_FEAT_PERIODIC_ADV_ENH
#else
@@ -151,6 +278,98 @@
#define UC_BT_BLE_FEAT_CREATE_SYNC_ENH FALSE
#endif
+#ifdef CONFIG_BT_BLE_FEAT_ISO_EN
+#define UC_BT_BLE_FEAT_ISO_EN CONFIG_BT_BLE_FEAT_ISO_EN
+#else
+#define UC_BT_BLE_FEAT_ISO_EN FALSE
+#endif
+
+#if CONFIG_BT_BLE_FEAT_ISO_60_EN
+#define UC_BT_BLE_FEAT_ISO_60_EN CONFIG_BT_BLE_FEAT_ISO_60_EN
+#else
+#define UC_BT_BLE_FEAT_ISO_60_EN FALSE
+#endif
+
+#ifdef CONFIG_BT_BLE_FEAT_ISO_BIG_SYNCER
+#define UC_BT_BLE_FEAT_ISO_BIG_SYNCER CONFIG_BT_BLE_FEAT_ISO_BIG_SYNCER
+#else
+#define UC_BT_BLE_FEAT_ISO_BIG_SYNCER FALSE
+#endif
+
+#ifdef CONFIG_BT_BLE_FEAT_ISO_BIG_BROCASTER
+#define UC_BT_BLE_FEAT_ISO_BIG_BROCASTER CONFIG_BT_BLE_FEAT_ISO_BIG_BROCASTER
+#else
+#define UC_BT_BLE_FEAT_ISO_BIG_BROCASTER FALSE
+#endif
+
+#ifdef CONFIG_BT_BLE_FEAT_ISO_CIG_CENTRAL
+#define UC_BT_BLE_FEAT_ISO_CIG_CENTRAL CONFIG_BT_BLE_FEAT_ISO_CIG_CENTRAL
+#else
+#define UC_BT_BLE_FEAT_ISO_CIG_CENTRAL FALSE
+#endif
+
+#ifdef CONFIG_BT_BLE_FEAT_ISO_CIG_PERIPHERAL
+#define UC_BT_BLE_FEAT_ISO_CIG_PERIPHERAL CONFIG_BT_BLE_FEAT_ISO_CIG_PERIPHERAL
+#else
+#define UC_BT_BLE_FEAT_ISO_CIG_PERIPHERAL FALSE
+#endif
+
+#ifdef CONFIG_BT_BLE_ISO_CIS_MAX_COUNT
+#define UC_BT_BLE_ISO_CIS_MAX_COUNT CONFIG_BT_BLE_ISO_CIS_MAX_COUNT
+#else
+#define UC_BT_BLE_ISO_CIS_MAX_COUNT (0)
+#endif
+
+#ifdef CONFIG_BT_BLE_ISO_BIS_MAX_COUNT
+#define UC_BT_BLE_ISO_BIS_MAX_COUNT CONFIG_BT_BLE_ISO_BIS_MAX_COUNT
+#else
+#define UC_BT_BLE_ISO_BIS_MAX_COUNT (0)
+#endif
+
+#ifdef CONFIG_BT_BLE_ISO_STD_FLOW_CTRL
+#define UC_BT_BLE_ISO_STD_FLOW_CTRL CONFIG_BT_BLE_ISO_STD_FLOW_CTRL
+#endif
+
+#ifdef CONFIG_BT_BLE_ISO_NON_STD_FLOW_CTRL
+#define UC_BT_BLE_ISO_NON_STD_FLOW_CTRL CONFIG_BT_BLE_ISO_NON_STD_FLOW_CTRL
+#endif
+
+#ifdef CONFIG_BT_BLE_FEAT_CTE_EN
+#define UC_BT_BLE_FEAT_CTE_EN CONFIG_BT_BLE_FEAT_CTE_EN
+#else
+#define UC_BT_BLE_FEAT_CTE_EN FALSE
+#endif
+
+#ifdef CONFIG_BT_BLE_FEAT_CTE_CONNECTIONLESS_EN
+#define UC_BT_BLE_FEAT_CTE_CONNECTIONLESS_EN CONFIG_BT_BLE_FEAT_CTE_CONNECTIONLESS_EN
+#else
+#define UC_BT_BLE_FEAT_CTE_CONNECTIONLESS_EN FALSE
+#endif
+
+#ifdef CONFIG_BT_BLE_FEAT_CTE_CONNECTION_EN
+#define UC_BT_BLE_FEAT_CTE_CONNECTION_EN CONFIG_BT_BLE_FEAT_CTE_CONNECTION_EN
+#else
+#define UC_BT_BLE_FEAT_CTE_CONNECTION_EN FALSE
+#endif
+
+#ifdef CONFIG_BT_BLE_FEAT_POWER_CONTROL
+#define UC_BT_BLE_FEAT_POWER_CONTROL CONFIG_BT_BLE_FEAT_POWER_CONTROL
+#else
+#define UC_BT_BLE_FEAT_POWER_CONTROL FALSE
+#endif
+
+#ifdef CONFIG_BT_BLE_FEAT_CONN_SUBRATING
+#define UC_BT_BLE_FEAT_CONN_SUBRATING CONFIG_BT_BLE_FEAT_CONN_SUBRATING
+#else
+#define UC_BT_BLE_FEAT_CONN_SUBRATING FALSE
+#endif
+
+#ifdef CONFIG_BT_BLE_VENDOR_HCI_EN
+#define UC_BT_BLE_VENDOR_HCI_EN CONFIG_BT_BLE_VENDOR_HCI_EN
+#else
+#define UC_BT_BLE_VENDOR_HCI_EN FALSE
+#endif
+
#ifdef CONFIG_BT_BLE_HIGH_DUTY_ADV_INTERVAL
#define UC_BT_BLE_HIGH_DUTY_ADV_INTERVAL CONFIG_BT_BLE_HIGH_DUTY_ADV_INTERVAL
#else
@@ -218,7 +437,19 @@
#define UC_BT_SMP_MAX_BONDS 8
#endif
-//Device Nane Maximum Length
+#ifdef CONFIG_BT_BLE_SMP_ID_RESET_ENABLE
+#define UC_BT_BLE_SMP_ID_RESET_ENABLE CONFIG_BT_BLE_SMP_ID_RESET_ENABLE
+#else
+#define UC_BT_BLE_SMP_ID_RESET_ENABLE FALSE
+#endif
+
+#ifdef CONFIG_BT_BLE_SMP_BOND_NVS_FLASH
+#define UC_BT_BLE_SMP_BOND_NVS_FLASH CONFIG_BT_BLE_SMP_BOND_NVS_FLASH
+#else
+#define UC_BT_BLE_SMP_BOND_NVS_FLASH FALSE
+#endif
+
+//Device Name Maximum Length
#ifdef CONFIG_BT_MAX_DEVICE_NAME_LEN
#define UC_MAX_LOC_BD_NAME_LEN CONFIG_BT_MAX_DEVICE_NAME_LEN
#else
@@ -294,14 +525,6 @@
#define UC_BT_BLE_ESTAB_LINK_CONN_TOUT 30
#endif
-
-//HOST QUEUE CONGEST CHECK
-#ifdef CONFIG_BT_BLE_HOST_QUEUE_CONGESTION_CHECK
-#define UC_BT_BLE_HOST_QUEUE_CONGESTION_CHECK CONFIG_BT_BLE_HOST_QUEUE_CONGESTION_CHECK
-#else
-#define UC_BT_BLE_HOST_QUEUE_CONGESTION_CHECK FALSE
-#endif
-
#ifdef CONFIG_BT_GATTS_PPCP_CHAR_GAP
#define UC_CONFIG_BT_GATTS_PPCP_CHAR_GAP CONFIG_BT_GATTS_PPCP_CHAR_GAP
#else
@@ -375,20 +598,6 @@
* Memory reference
**********************************************************/
-//MEMORY ALLOCATOR
-#ifdef CONFIG_BT_ALLOCATION_FROM_SPIRAM_FIRST
-#define UC_HEAP_ALLOCATION_FROM_SPIRAM_FIRST CONFIG_BT_ALLOCATION_FROM_SPIRAM_FIRST
-#else
-#define UC_HEAP_ALLOCATION_FROM_SPIRAM_FIRST FALSE
-#endif
-
-//MEMORY DEBUG
-#ifdef CONFIG_BT_BLUEDROID_MEM_DEBUG
-#define UC_BT_BLUEDROID_MEM_DEBUG CONFIG_BT_BLUEDROID_MEM_DEBUG
-#else
-#define UC_BT_BLUEDROID_MEM_DEBUG FALSE
-#endif
-
//ESP COEXIST VSC
#ifdef CONFIG_BT_BLUEDROID_ESP_COEX_VSC
#define UC_BT_BLUEDROID_ESP_COEX_VSC CONFIG_BT_BLUEDROID_ESP_COEX_VSC
diff --git a/lib/bt/host/bluedroid/common/include/common/bt_target.h b/lib/bt/host/bluedroid/common/include/common/bt_target.h
index 0adad84f..d1dfd177 100644
--- a/lib/bt/host/bluedroid/common/include/common/bt_target.h
+++ b/lib/bt/host/bluedroid/common/include/common/bt_target.h
@@ -88,9 +88,19 @@
#define BTC_AV_INCLUDED TRUE
#define BTA_AV_SINK_INCLUDED TRUE
#define BTC_AV_SINK_INCLUDED TRUE
-#define SBC_DEC_INCLUDED TRUE
#define BTC_AV_SRC_INCLUDED TRUE
+#if (UC_BT_A2DP_USE_EXTERNAL_CODEC == TRUE)
+#define BTC_AV_EXT_CODEC TRUE
+#define BTA_AV_EXT_CODEC TRUE
+#else
+#define SBC_DEC_INCLUDED TRUE
#define SBC_ENC_INCLUDED TRUE
+#endif
+#if UC_BT_AVRCP_CT_COVER_ART_ENABLED
+#define BTA_AV_CA_INCLUDED TRUE
+#define BTC_AV_CA_INCLUDED TRUE
+#define AVRC_CA_INCLUDED TRUE
+#endif /* UC_BT_AVRCP_CT_COVER_ART_ENABLED */
#endif /* UC_BT_A2DP_ENABLED */
#if (UC_BT_SPP_ENABLED == TRUE)
@@ -103,10 +113,13 @@
#if (UC_BT_L2CAP_ENABLED == TRUE)
#define BTA_JV_INCLUDED TRUE
#define BTC_L2CAP_INCLUDED TRUE
-#define BTC_SDP_INCLUDED TRUE
#define VND_BT_JV_BTA_L2CAP TRUE
#endif /* UC_BT_L2CAP_ENABLED */
+#if (UC_BT_SDP_COMMON_ENABLED == TRUE)
+#define BTC_SDP_COMMON_INCLUDED TRUE
+#endif /* UC_BT_SDP_COMMON_ENABLED */
+
#if (UC_BT_HFP_AG_ENABLED == TRUE) || (UC_BT_HFP_CLIENT_ENABLED == TRUE)
#ifndef RFCOMM_INCLUDED
#define RFCOMM_INCLUDED TRUE
@@ -114,14 +127,22 @@
#ifndef BTM_SCO_INCLUDED
#define BTM_SCO_INCLUDED TRUE
#endif
+#if (UC_BT_HFP_AUDIO_DATA_PATH_HCI == TRUE)
+#if (UC_BT_HFP_USE_EXTERNAL_CODEC == TRUE)
+#define BTC_HFP_EXT_CODEC TRUE
+#define BTA_HFP_EXT_CODEC TRUE
+#define PLC_INCLUDED FALSE
+#else
#ifndef SBC_DEC_INCLUDED
#define SBC_DEC_INCLUDED TRUE
#endif
#ifndef SBC_ENC_INCLUDED
#define SBC_ENC_INCLUDED TRUE
#endif
-#ifndef PLC_INCLUDED
#define PLC_INCLUDED TRUE
+#endif /* (UC_BT_HFP_USE_EXTERNAL_CODEC == TRUE) */
+#else
+#define PLC_INCLUDED FALSE
#endif
#if (UC_BT_HFP_AG_ENABLED == TRUE)
@@ -168,6 +189,27 @@
#define BTC_HD_INCLUDED TRUE
#endif /* UC_BT_HID_DEVICE_ENABLED */
+#if UC_BT_HID_REMOVE_DEVICE_BONDING_ENABLED
+#define BTC_HID_REMOVE_DEVICE_BONDING TRUE
+#endif
+
+#if UC_BT_GOEPC_ENABLED
+#ifndef RFCOMM_INCLUDED
+#define RFCOMM_INCLUDED TRUE
+#endif
+#ifndef OBEX_INCLUDED
+#define OBEX_INCLUDED TRUE
+#endif
+#define GOEPC_INCLUDED TRUE
+#endif /* UC_BT_GOEPC_ENABLED */
+
+#if UC_BT_PBAC_ENABLED
+#define BTC_PBA_CLIENT_INCLUDED TRUE
+#define BTC_PBA_SUPPORTED_FEAT UC_BT_PBAC_SUPPORTED_FEAT
+#define BTC_PBA_PREFERRED_MTU UC_BT_PBAC_PREFERRED_MTU
+#define BTA_PBA_CLIENT_INCLUDED TRUE
+#endif
+
#endif /* UC_BT_CLASSIC_ENABLED */
/* This is set to enable use of GAP L2CAP connections. */
@@ -200,11 +242,64 @@
#define BLE_50_FEATURE_SUPPORT FALSE
#endif
+#if (UC_BT_BLE_ENABLED ==TRUE)
#if (UC_BT_BLE_42_FEATURES_SUPPORTED == TRUE || BLE_50_FEATURE_SUPPORT == FALSE)
#define BLE_42_FEATURE_SUPPORT TRUE
#else
#define BLE_42_FEATURE_SUPPORT FALSE
#endif
+#else
+#define BLE_42_FEATURE_SUPPORT FALSE
+#define BLE_50_FEATURE_SUPPORT FALSE
+#endif /* UC_BT_BLE_ENABLED */
+
+#if (UC_BT_BLE_42_DTM_TEST_EN == TRUE)
+#define BLE_42_DTM_TEST_EN TRUE
+#else
+#define BLE_42_DTM_TEST_EN FALSE
+#endif
+
+#if (UC_BT_BLE_42_ADV_EN == TRUE)
+#define BLE_42_ADV_EN TRUE
+#else
+#define BLE_42_ADV_EN FALSE
+#endif
+
+#if (UC_BT_BLE_42_SCAN_EN == TRUE)
+#define BLE_42_SCAN_EN TRUE
+#else
+#define BLE_42_SCAN_EN FALSE
+#endif
+
+#if (UC_BT_BLE_50_EXTEND_ADV_EN == TRUE)
+#define BLE_50_EXTEND_ADV_EN TRUE
+#else
+#define BLE_50_EXTEND_ADV_EN FALSE
+#endif
+
+#if (UC_BT_BLE_50_PERIODIC_ADV_EN == TRUE)
+#define BLE_50_PERIODIC_ADV_EN TRUE
+#else
+#define BLE_50_PERIODIC_ADV_EN FALSE
+#endif
+
+#if (UC_BT_BLE_50_EXTEND_SCAN_EN == TRUE)
+#define BLE_50_EXTEND_SCAN_EN TRUE
+#else
+#define BLE_50_EXTEND_SCAN_EN FALSE
+#endif
+
+#if (UC_BT_BLE_50_EXTEND_SYNC_EN == TRUE)
+#define BLE_50_EXTEND_SYNC_EN TRUE
+#else
+#define BLE_50_EXTEND_SYNC_EN FALSE
+#endif
+
+#if (UC_BT_BLE_50_DTM_TEST_EN == TRUE)
+#define BLE_50_DTM_TEST_EN TRUE
+#else
+#define BLE_50_DTM_TEST_EN FALSE
+#endif
#if (UC_BT_BLE_FEAT_PERIODIC_ADV_SYNC_TRANSFER == TRUE)
#define BLE_FEAT_PERIODIC_ADV_SYNC_TRANSFER TRUE
@@ -224,6 +319,108 @@
#define BLE_FEAT_CREATE_SYNC_ENH FALSE
#endif
+#if (UC_BT_BLE_FEAT_ISO_EN == TRUE)
+#define BLE_FEAT_ISO_EN TRUE
+#else
+#define BLE_FEAT_ISO_EN FALSE
+#endif
+
+#if (UC_BT_BLE_FEAT_ISO_60_EN == TRUE)
+#define BLE_FEAT_ISO_60_EN TRUE
+#else
+#define BLE_FEAT_ISO_60_EN FALSE
+#endif
+
+#if (UC_BT_BLE_FEAT_ISO_BIG_BROCASTER == TRUE)
+#define BLE_FEAT_ISO_BIG_BROCASTER_EN TRUE
+#else
+#define BLE_FEAT_ISO_BIG_BROCASTER_EN FALSE
+#endif
+
+#if (UC_BT_BLE_FEAT_ISO_BIG_SYNCER == TRUE)
+#define BLE_FEAT_ISO_BIG_SYNCER_EN TRUE
+#else
+#define BLE_FEAT_ISO_BIG_SYNCER_EN FALSE
+#endif
+
+#if (UC_BT_BLE_FEAT_ISO_CIG_CENTRAL == TRUE)
+#define BLE_FEAT_ISO_CIG_CENTRAL_EN TRUE
+#else
+#define BLE_FEAT_ISO_CIG_CENTRAL_EN FALSE
+#endif
+
+#if (UC_BT_BLE_FEAT_ISO_CIG_PERIPHERAL == TRUE)
+#define BLE_FEAT_ISO_CIG_PERIPHERAL_EN TRUE
+#else
+#define BLE_FEAT_ISO_CIG_PERIPHERAL_EN FALSE
+#endif
+
+#if ((BLE_FEAT_ISO_CIG_CENTRAL_EN == TRUE) || (BLE_FEAT_ISO_CIG_PERIPHERAL_EN == TRUE))
+#define BLE_FEAT_ISO_CIG_EN TRUE
+#else
+#define BLE_FEAT_ISO_CIG_EN FALSE
+#endif
+
+#ifdef UC_BT_BLE_ISO_CIS_MAX_COUNT
+#define BLE_ISO_CIS_MAX_COUNT UC_BT_BLE_ISO_CIS_MAX_COUNT
+#else
+#define BLE_ISO_CIS_MAX_COUNT (0)
+#endif
+
+#ifdef CONFIG_BT_BLE_ISO_BIS_MAX_COUNT
+#define BLE_ISO_BIS_MAX_COUNT CONFIG_BT_BLE_ISO_BIS_MAX_COUNT
+#else
+#define BLE_ISO_BIS_MAX_COUNT (0)
+#endif
+
+#ifdef UC_BT_BLE_ISO_STD_FLOW_CTRL
+#define BLE_ISO_STD_FLOW_CTRL TRUE
+#endif
+
+#ifdef UC_BT_BLE_ISO_NON_STD_FLOW_CTRL
+#define BLE_ISO_NON_STD_FLOW_CTRL TRUE
+#endif
+
+#if ((UC_BT_BLE_ISO_STD_FLOW_CTRL == TRUE) && (UC_BT_BLE_ISO_NON_STD_FLOW_CTRL == TRUE))
+#error "Only one of standard or non-standard can be enabled"
+#endif
+
+#if (UC_BT_BLE_FEAT_CTE_EN == TRUE)
+#define BLE_FEAT_CTE_EN TRUE
+#else
+#define BLE_FEAT_CTE_EN FALSE
+#endif
+
+#if (UC_BT_BLE_FEAT_CTE_CONNECTIONLESS_EN == TRUE)
+#define BLE_FEAT_CTE_CONNECTIONLESS_EN TRUE
+#else
+#define BLE_FEAT_CTE_CONNECTIONLESS_EN FALSE
+#endif
+
+#if (UC_BT_BLE_FEAT_CTE_CONNECTION_EN == TRUE)
+#define BLE_FEAT_CTE_CONNECTION_EN TRUE
+#else
+#define BLE_FEAT_CTE_CONNECTION_EN FALSE
+#endif
+
+#if (UC_BT_BLE_FEAT_POWER_CONTROL == TRUE)
+#define BLE_FEAT_POWER_CONTROL_EN TRUE
+#else
+#define BLE_FEAT_POWER_CONTROL_EN FALSE
+#endif
+
+#if (UC_BT_BLE_FEAT_CONN_SUBRATING == TRUE)
+#define BLE_FEAT_CONN_SUBRATING TRUE
+#else
+#define BLE_FEAT_CONN_SUBRATING FALSE
+#endif
+
+#if (UC_BT_BLE_VENDOR_HCI_EN == TRUE)
+#define BLE_VENDOR_HCI_EN TRUE
+#else
+#define BLE_VENDOR_HCI_EN FALSE
+#endif
+
#if (UC_BT_BLE_HIGH_DUTY_ADV_INTERVAL == TRUE)
#define BLE_HIGH_DUTY_ADV_INTERVAL TRUE
#else
@@ -290,6 +487,18 @@
#define SMP_SLAVE_CON_PARAMS_UPD_ENABLE FALSE
#endif /* UC_BT_SMP_SLAVE_CON_PARAMS_UPD_ENABLE */
+#if (UC_BT_BLE_SMP_ID_RESET_ENABLE)
+#define BLE_SMP_ID_RESET_ENABLE TRUE
+#else
+#define BLE_SMP_ID_RESET_ENABLE FALSE
+#endif
+
+#if (UC_BT_BLE_SMP_BOND_NVS_FLASH)
+#define BLE_SMP_BOND_NVS_FLASH TRUE
+#else
+#define BLE_SMP_BOND_NVS_FLASH FALSE
+#endif
+
#ifdef UC_BTDM_BLE_ADV_REPORT_FLOW_CTRL_SUPP
#define BLE_ADV_REPORT_FLOW_CONTROL (UC_BTDM_BLE_ADV_REPORT_FLOW_CTRL_SUPP && BLE_INCLUDED)
#endif /* UC_BTDM_BLE_ADV_REPORT_FLOW_CTRL_SUPP */
@@ -367,6 +576,10 @@
#define BTC_AV_INCLUDED FALSE
#endif
+#ifndef BTC_AV_CA_INCLUDED
+#define BTC_AV_CA_INCLUDED FALSE
+#endif
+
#ifndef BTC_AV_SINK_INCLUDED
#define BTC_AV_SINK_INCLUDED FALSE
#endif
@@ -375,6 +588,10 @@
#define BTC_AV_SRC_INCLUDED FALSE
#endif
+#ifndef BTC_AV_EXT_CODEC
+#define BTC_AV_EXT_CODEC FALSE
+#endif
+
#ifndef BTC_SPP_INCLUDED
#define BTC_SPP_INCLUDED FALSE
#endif
@@ -387,6 +604,10 @@
#define BTC_HD_INCLUDED FALSE
#endif
+#ifndef BTC_HID_REMOVE_DEVICE_BONDING
+#define BTC_HID_REMOVE_DEVICE_BONDING FALSE
+#endif
+
#ifndef SBC_DEC_INCLUDED
#define SBC_DEC_INCLUDED FALSE
#endif
@@ -395,6 +616,10 @@
#define SBC_ENC_INCLUDED FALSE
#endif
+#ifndef BTC_HFP_EXT_CODEC
+#define BTC_HFP_EXT_CODEC FALSE
+#endif
+
/******************************************************************************
**
** BTA-layer components
@@ -440,6 +665,14 @@
#define BTA_AV_INCLUDED FALSE
#endif
+#ifndef BTA_AV_CA_INCLUDED
+#define BTA_AV_CA_INCLUDED FALSE
+#endif
+
+#ifndef BTA_AV_EXT_CODEC
+#define BTA_AV_EXT_CODEC FALSE
+#endif
+
#ifndef BTA_AV_SINK_INCLUDED
#define BTA_AV_SINK_INCLUDED FALSE
#endif
@@ -452,6 +685,10 @@
#define BTA_SDP_INCLUDED FALSE
#endif
+#ifndef BTA_HFP_EXT_CODEC
+#define BTA_HFP_EXT_CODEC FALSE
+#endif
+
/* This is set to enable use of GAP L2CAP connections. */
#ifndef VND_BT_JV_BTA_L2CAP
#define VND_BT_JV_BTA_L2CAP FALSE
@@ -523,12 +760,6 @@
#define BTA_AV_CO_CP_SCMS_T FALSE
#endif
-#if UC_BT_BLE_HOST_QUEUE_CONGESTION_CHECK
-#define SCAN_QUEUE_CONGEST_CHECK TRUE
-#else
-#define SCAN_QUEUE_CONGEST_CHECK FALSE
-#endif
-
#ifdef UC_CONFIG_BT_GATTS_PPCP_CHAR_GAP
#define BTM_PERIPHERAL_ENABLED UC_CONFIG_BT_GATTS_PPCP_CHAR_GAP
#endif
@@ -569,7 +800,7 @@
#define BT_CLASSIC_BQB_INCLUDED FALSE
#endif
-/* This feature is used to eanble interleaved scan*/
+/* This feature is used to enable interleaved scan*/
#ifndef BTA_HOST_INTERLEAVE_SEARCH
#define BTA_HOST_INTERLEAVE_SEARCH FALSE
#endif
@@ -904,9 +1135,95 @@
#define BTM_SEC_MAX_DEVICE_RECORDS UC_BT_SMP_MAX_BONDS
#endif
-/* The number of security records for services. 32 AS Default*/
+#if BTA_SDP_INCLUDED
+#define BTM_SDP_SEC_SERVICE_RECORDS 1
+#else
+#define BTM_SDP_SEC_SERVICE_RECORDS 0
+#endif
+
+#if BTA_AG_INCLUDED
+#define BTM_AG_SEC_SERVICE_RECORDS 1
+#else
+#define BTM_AG_SEC_SERVICE_RECORDS 0
+#endif
+
+#if BTA_HF_INCLUDED
+#define BTM_HF_SEC_SERVICE_RECORDS 1
+#else
+#define BTM_HF_SEC_SERVICE_RECORDS 0
+#endif
+
+#if BTA_JV_INCLUDED
+#define BTM_JV_SEC_SERVICE_RECORDS (MAX_RFC_PORTS - BTM_HF_SEC_SERVICE_RECORDS - BTM_AG_SEC_SERVICE_RECORDS)
+#else
+#define BTM_JV_SEC_SERVICE_RECORDS 0
+#endif
+
+#if BTA_PBA_CLIENT_INCLUDED
+#define BTM_PBA_SEC_SERVICE_RECORDS 2
+#else
+#define BTM_PBA_SEC_SERVICE_RECORDS 0
+#endif
+
+#if BTA_AV_CA_INCLUDED
+#define BTM_AC_VA_SEC_SERVICE_RECORDS 1
+#else
+#define BTM_AC_VA_SEC_SERVICE_RECORDS 0
+#endif
+
+#if AVCT_INCLUDED
+#if AVCT_BROWSE_INCLUDED
+#define BTM_AVCT_SEC_SERVICE_RECORDS 2
+#else
+#define BTM_AVCT_SEC_SERVICE_RECORDS 1
+#endif // AVCT_BROWSE_INCLUDED
+#else
+#define BTM_AVCT_SEC_SERVICE_RECORDS 0
+#endif
+
+#if AVDT_INCLUDED
+#if AVDT_REPORTING
+#define BTM_AVDT_SEC_SERVICE_RECORDS 3
+#else
+#define BTM_AVDT_SEC_SERVICE_RECORDS 2
+#endif // AVDT_INCLUDED
+#else
+#define BTM_AVDT_SEC_SERVICE_RECORDS 0
+#endif
+
+#if GAP_CONN_INCLUDED
+#define BTM_GAP_SEC_SERVICE_RECORDS GAP_MAX_CONNECTIONS
+#else
+#define BTM_GAP_SEC_SERVICE_RECORDS 0
+#endif
+
+#if HID_DEV_INCLUDED
+#define BTM_HIDD_SEC_SERVICE_RECORDS 3
+#else
+#define BTM_HIDD_SEC_SERVICE_RECORDS 0
+#endif
+
+#if HID_HOST_INCLUDED
+#define BTM_HIDH_SEC_SERVICE_RECORDS 3
+#else
+#define BTM_HIDH_SEC_SERVICE_RECORDS 0
+#endif
+
+#if BLE_INCLUDED
+#define BTM_GATT_SEC_SERVICE_RECORDS 1
+#else
+#define BTM_GATT_SEC_SERVICE_RECORDS 0
+#endif
+
+#define BTM_SEC_DEV_SERVICE_RECORDS 1
+
+/* The number of security records for services. */
#ifndef BTM_SEC_MAX_SERVICE_RECORDS
-#define BTM_SEC_MAX_SERVICE_RECORDS 8 // 32
+#define BTM_SEC_MAX_SERVICE_RECORDS (BTM_SDP_SEC_SERVICE_RECORDS + BTM_AG_SEC_SERVICE_RECORDS \
+ + BTM_AVCT_SEC_SERVICE_RECORDS + BTM_AVDT_SEC_SERVICE_RECORDS + BTM_GAP_SEC_SERVICE_RECORDS \
+ + BTM_HIDD_SEC_SERVICE_RECORDS + BTM_GATT_SEC_SERVICE_RECORDS + BTM_PBA_SEC_SERVICE_RECORDS \
+ + BTM_HIDH_SEC_SERVICE_RECORDS + BTM_SEC_DEV_SERVICE_RECORDS + BTM_HF_SEC_SERVICE_RECORDS \
+ + BTM_JV_SEC_SERVICE_RECORDS + BTM_AC_VA_SEC_SERVICE_RECORDS )
#endif
/* If True, force a retrieval of remote device name for each bond in case it's changed */
@@ -1028,10 +1345,12 @@
**************************/
/* 4.1/4.2 secure connections feature */
-#ifndef SC_MODE_INCLUDED
-// Disable AES-CCM (BT 4.1) for BT Classic to workaround controller AES issue. E0 encryption (BT 4.0) will be used.
+#if defined(CONFIG_IDF_TARGET_ESP32) && (BT_CONTROLLER_INCLUDED == TRUE)
+// Disable AES-CCM (BT 4.1) for BT Classic to workaround controller AES issue on ESP32 controller. E0 encryption (BT 4.0) will be used.
#define SC_MODE_INCLUDED FALSE
-#endif
+#else
+#define SC_MODE_INCLUDED TRUE
+#endif // CONFIG_IDF_TARGET_ESP32
/* Used for conformance testing ONLY */
#ifndef BTM_BLE_CONFORMANCE_TESTING
@@ -1247,7 +1566,72 @@
#endif
#ifndef BLE_ANDROID_CONTROLLER_SCAN_FILTER
-#define BLE_ANDROID_CONTROLLER_SCAN_FILTER TRUE
+#define BLE_ANDROID_CONTROLLER_SCAN_FILTER FALSE
+#endif
+
+#ifndef BLE_HOST_BLE_MULTI_ADV_EN
+#define BLE_HOST_BLE_MULTI_ADV_EN FALSE
+#endif
+
+#ifndef BLE_HOST_TRACK_ADVERTISER_EN
+#define BLE_HOST_TRACK_ADVERTISER_EN FALSE
+#endif
+
+#ifndef BLE_HOST_ENERGY_INFO_EN
+#define BLE_HOST_ENERGY_INFO_EN FALSE
+#endif
+
+
+#ifndef BLE_HOST_ENABLE_TEST_MODE_EN
+#define BLE_HOST_ENABLE_TEST_MODE_EN FALSE
+#endif
+
+#ifndef BLE_HOST_EXECUTE_CBACK_EN
+#define BLE_HOST_EXECUTE_CBACK_EN FALSE
+#endif
+
+#ifndef BLE_HOST_REMOVE_ALL_ACL_EN
+#define BLE_HOST_REMOVE_ALL_ACL_EN FALSE
+#endif
+
+#ifndef BLE_HOST_REMOVE_AN_ACL_EN
+#define BLE_HOST_REMOVE_AN_ACL_EN FALSE
+#endif
+
+#ifndef BLE_HOST_READ_TX_POWER_EN
+#define BLE_HOST_READ_TX_POWER_EN FALSE
+#endif
+
+#ifndef BLE_HOST_STOP_ADV_UNUSED
+#define BLE_HOST_STOP_ADV_UNUSED FALSE
+#endif
+
+#ifndef BLE_HOST_BLE_OBSERVE_EN
+#define BLE_HOST_BLE_OBSERVE_EN FALSE
+#endif
+
+#ifndef BLE_HOST_BLE_SCAN_PARAM_UNUSED
+#define BLE_HOST_BLE_SCAN_PARAM_UNUSED FALSE
+#endif
+
+#ifndef BLE_HOST_CONN_SCAN_PARAM_EN
+#define BLE_HOST_CONN_SCAN_PARAM_EN FALSE
+#endif
+
+#ifndef BLE_HOST_SETUP_STORAGE_EN
+#define BLE_HOST_SETUP_STORAGE_EN FALSE
+#endif
+
+#ifndef BLE_HOST_READ_SCAN_REPORTS_EN
+#define BLE_HOST_READ_SCAN_REPORTS_EN FALSE
+#endif
+
+#ifndef BLE_HOST_BATCH_SCAN_EN
+#define BLE_HOST_BATCH_SCAN_EN FALSE
+#endif
+
+#ifndef BLE_HOST_BG_CONNECT_EN
+#define BLE_HOST_BG_CONNECT_EN FALSE
#endif
#ifndef LOCAL_BLE_CONTROLLER_ID
@@ -1281,7 +1665,7 @@
#ifdef CONFIG_IDF_TARGET_ESP32
#define BTM_BLE_ADV_TX_POWER {-12, -9, -6, -3, 0, 3, 6, 9}
#else
-#define BTM_BLE_ADV_TX_POWER {-24, -21, -18, -15, -12, -9, -6, -3, 0, 3, 6, 9, 12, 15, 18, 21}
+#define BTM_BLE_ADV_TX_POWER {-24, -21, -18, -15, -12, -9, -6, -3, 0, 3, 6, 9, 12, 15, 18, 20}
#endif
#endif
@@ -1289,7 +1673,7 @@
#ifdef CONFIG_IDF_TARGET_ESP32
#define BTM_TX_POWER {-12, -9, -6, -3, 0, 3, 6, 9}
#else
-#define BTM_TX_POWER {-24, -21, -18, -15, -12, -9, -6, -3, 0, 3, 6, 9, 12, 15, 18, 21}
+#define BTM_TX_POWER {-24, -21, -18, -15, -12, -9, -6, -3, 0, 3, 6, 9, 12, 15, 18, 20}
#endif
#endif
@@ -1385,7 +1769,7 @@
#define GATT_CONFORMANCE_TESTING FALSE
#endif
-/* number of background connection device allowence, ideally to be the same as WL size
+/* number of background connection device allowance, ideally to be the same as WL size
*/
#ifndef GATT_MAX_BG_CONN_DEV
#define GATT_MAX_BG_CONN_DEV 8 /*MAX is 32*/
@@ -1494,20 +1878,21 @@
/* The maximum number of attributes in each record. */
#ifndef SDP_MAX_REC_ATTR
-#if (defined(HID_DEV_INCLUDED) && (HID_DEV_INCLUDED==TRUE)) || (defined(BTC_SDP_INCLUDED) && (BTC_SDP_INCLUDED==TRUE))
+#if (defined(HID_DEV_INCLUDED) && (HID_DEV_INCLUDED==TRUE)) || (defined(BTC_SDP_COMMON_INCLUDED) && (BTC_SDP_COMMON_INCLUDED==TRUE))
#define SDP_MAX_REC_ATTR 25
#else
#define SDP_MAX_REC_ATTR 8
#endif /* defined(HID_DEV_INCLUDED) && (HID_DEV_INCLUDED==TRUE) */
#endif
+/* The maximum length, in bytes, of all SDP attributes combined. */
#ifndef SDP_MAX_PAD_LEN
-#define SDP_MAX_PAD_LEN 300
+#define SDP_MAX_PAD_LEN UC_SDP_MAX_PAD_LEN
#endif
/* The maximum length, in bytes, of an attribute. */
#ifndef SDP_MAX_ATTR_LEN
-#define SDP_MAX_ATTR_LEN 400
+#define SDP_MAX_ATTR_LEN UC_SDP_MAX_ATTR_LEN
#endif
/* The maximum number of attribute filters supported by SDP databases. */
@@ -1800,6 +2185,26 @@
#define OBX_FCR_TX_POOL_ID 3
#endif
+/* Maximum OBEX connection allowed */
+#ifndef OBEX_MAX_CONNECTION
+#define OBEX_MAX_CONNECTION 3
+#endif
+
+/* Maximum OBEX server allowed */
+#ifndef OBEX_MAX_SERVER
+#define OBEX_MAX_SERVER 2
+#endif
+
+/******************************************************************************
+**
+** GOEP
+**
+******************************************************************************/
+
+/* Maximum GOEP client connection allowed */
+#ifndef GOEPC_MAX_CONNECTION
+#define GOEPC_MAX_CONNECTION 3
+#endif
/******************************************************************************
**
@@ -2133,6 +2538,20 @@
#endif
/*************************************************************************
+** Definitions for OBEX
+*/
+#ifndef OBEX_INCLUDED
+#define OBEX_INCLUDED FALSE
+#endif
+
+/*************************************************************************
+** Definitions for OBEX
+*/
+#ifndef GOEPC_INCLUDED
+#define GOEPC_INCLUDED FALSE
+#endif
+
+/*************************************************************************
* A2DP Definitions
*/
#ifndef A2D_INCLUDED
@@ -2170,6 +2589,10 @@
#define AVRC_INCLUDED FALSE
#endif
+#ifndef AVRC_CA_INCLUDED
+#define AVRC_CA_INCLUDED FALSE
+#endif
+
#ifndef AVRC_METADATA_INCLUDED
#if AVRC_INCLUDED == TRUE
#define AVRC_METADATA_INCLUDED TRUE
@@ -2372,12 +2795,6 @@ The maximum number of payload octets that the local device can receive in a sing
#define BTSNOOP_MEM FALSE
#endif
-#if UC_HEAP_ALLOCATION_FROM_SPIRAM_FIRST
-#define HEAP_ALLOCATION_FROM_SPIRAM_FIRST TRUE
-#else
-#define HEAP_ALLOCATION_FROM_SPIRAM_FIRST FALSE
-#endif
-
#include "common/bt_trace.h"
#endif /* BT_TARGET_H */
diff --git a/lib/bt/host/bluedroid/common/include/common/bt_trace.h b/lib/bt/host/bluedroid/common/include/common/bt_trace.h
index a4f1ca74..b5f0a9bb 100644
--- a/lib/bt/host/bluedroid/common/include/common/bt_trace.h
+++ b/lib/bt/host/bluedroid/common/include/common/bt_trace.h
@@ -25,6 +25,9 @@
#include "stack/bt_types.h"
#include "bt_common.h"
+#if (BT_BLE_LOG_SPI_OUT_HOST_ENABLED && !CLASSIC_BT_INCLUDED)
+#include "ble_log/ble_log_spi_out.h"
+#endif // (BT_BLE_LOG_SPI_OUT_HOST_ENABLED && !CLASSIC_BT_INCLUDED)
static inline void trc_dump_buffer(const char *prefix, uint8_t *data, uint16_t len)
{
uint16_t i;
@@ -217,20 +220,76 @@ static inline void trc_dump_buffer(const char *prefix, uint8_t *data, uint16_t l
/* Define tracing for BTM
*/
+#if (BT_BLE_LOG_SPI_OUT_HOST_ENABLED && !CLASSIC_BT_INCLUDED)
+
+#define BTM_TRACE_ERROR(fmt, args...) { \
+ if (btm_cb.trace_level >= BT_TRACE_LEVEL_ERROR && BT_LOG_LEVEL_CHECK(BTM, ERROR)) BT_PRINT_E("BT_BTM", fmt, ## args); \
+}
+
+#define BTM_TRACE_WARNING(fmt, args...) { \
+ if (btm_cb.trace_level >= BT_TRACE_LEVEL_WARNING && BT_LOG_LEVEL_CHECK(BTM, WARNING)) BT_PRINT_W("BT_BTM", fmt, ## args); \
+}
+
+#define BTM_TRACE_API(fmt, args...) { \
+ ble_log_spi_out_printf_enh(BLE_LOG_SPI_OUT_SOURCE_BLUEDROID, BLE_LOG_SPI_OUT_LEVEL_INFO, "BT_BTM", fmt, ## args); \
+ if (btm_cb.trace_level >= BT_TRACE_LEVEL_API && BT_LOG_LEVEL_CHECK(BTM, API)) BT_PRINT_I("BT_BTM", fmt, ## args); \
+}
+
+#define BTM_TRACE_EVENT(fmt, args...) { \
+ ble_log_spi_out_printf_enh(BLE_LOG_SPI_OUT_SOURCE_BLUEDROID, BLE_LOG_SPI_OUT_LEVEL_DEBUG, "BT_BTM", fmt, ## args); \
+ if (btm_cb.trace_level >= BT_TRACE_LEVEL_EVENT && BT_LOG_LEVEL_CHECK(BTM, EVENT)) BT_PRINT_D("BT_BTM", fmt, ## args); \
+}
+
+#define BTM_TRACE_DEBUG(fmt, args...) { \
+ if (btm_cb.trace_level >= BT_TRACE_LEVEL_DEBUG && BT_LOG_LEVEL_CHECK(BTM, DEBUG)) BT_PRINT_D("BT_BTM", fmt, ## args); \
+}
+
+#else
+
#define BTM_TRACE_ERROR(fmt, args...) {if (btm_cb.trace_level >= BT_TRACE_LEVEL_ERROR && BT_LOG_LEVEL_CHECK(BTM, ERROR)) BT_PRINT_E("BT_BTM", fmt, ## args);}
#define BTM_TRACE_WARNING(fmt, args...) {if (btm_cb.trace_level >= BT_TRACE_LEVEL_WARNING && BT_LOG_LEVEL_CHECK(BTM, WARNING)) BT_PRINT_W("BT_BTM", fmt, ## args);}
#define BTM_TRACE_API(fmt, args...) {if (btm_cb.trace_level >= BT_TRACE_LEVEL_API && BT_LOG_LEVEL_CHECK(BTM,API)) BT_PRINT_I("BT_BTM", fmt, ## args);}
#define BTM_TRACE_EVENT(fmt, args...) {if (btm_cb.trace_level >= BT_TRACE_LEVEL_EVENT && BT_LOG_LEVEL_CHECK(BTM,EVENT)) BT_PRINT_D("BT_BTM", fmt, ## args);}
#define BTM_TRACE_DEBUG(fmt, args...) {if (btm_cb.trace_level >= BT_TRACE_LEVEL_DEBUG && BT_LOG_LEVEL_CHECK(BTM,DEBUG)) BT_PRINT_D("BT_BTM", fmt, ## args);}
+#endif // (BT_BLE_LOG_SPI_OUT_HOST_ENABLED && !CLASSIC_BT_INCLUDED)
+
/* Define tracing for the L2CAP unit
*/
+#if (BT_BLE_LOG_SPI_OUT_HOST_ENABLED && !CLASSIC_BT_INCLUDED)
+
+#define L2CAP_TRACE_ERROR(fmt, args...) { \
+ if (l2cb.l2cap_trace_level >= BT_TRACE_LEVEL_ERROR && BT_LOG_LEVEL_CHECK(L2CAP, ERROR)) BT_PRINT_E("BT_L2CAP", fmt, ## args); \
+}
+
+#define L2CAP_TRACE_WARNING(fmt, args...) { \
+ if (l2cb.l2cap_trace_level >= BT_TRACE_LEVEL_WARNING && BT_LOG_LEVEL_CHECK(L2CAP, WARNING)) BT_PRINT_W("BT_L2CAP", fmt, ## args); \
+}
+
+#define L2CAP_TRACE_API(fmt, args...) { \
+ ble_log_spi_out_printf_enh(BLE_LOG_SPI_OUT_SOURCE_BLUEDROID, BLE_LOG_SPI_OUT_LEVEL_INFO, "BT_L2CAP", fmt, ## args); \
+ if (l2cb.l2cap_trace_level >= BT_TRACE_LEVEL_API && BT_LOG_LEVEL_CHECK(L2CAP, API)) BT_PRINT_I("BT_L2CAP", fmt, ## args); \
+}
+
+#define L2CAP_TRACE_EVENT(fmt, args...) { \
+ if (l2cb.l2cap_trace_level >= BT_TRACE_LEVEL_EVENT && BT_LOG_LEVEL_CHECK(L2CAP, EVENT)) BT_PRINT_D("BT_L2CAP", fmt, ## args); \
+}
+
+#define L2CAP_TRACE_DEBUG(fmt, args...) { \
+ if (l2cb.l2cap_trace_level >= BT_TRACE_LEVEL_DEBUG && BT_LOG_LEVEL_CHECK(L2CAP, DEBUG)) BT_PRINT_D("BT_L2CAP", fmt, ## args); \
+}
+
+#else
+
#define L2CAP_TRACE_ERROR(fmt, args...) {if (l2cb.l2cap_trace_level >= BT_TRACE_LEVEL_ERROR && BT_LOG_LEVEL_CHECK(L2CAP, ERROR)) BT_PRINT_E("BT_L2CAP", fmt, ## args);}
#define L2CAP_TRACE_WARNING(fmt, args...) {if (l2cb.l2cap_trace_level >= BT_TRACE_LEVEL_WARNING && BT_LOG_LEVEL_CHECK(L2CAP, WARNING)) BT_PRINT_W("BT_L2CAP", fmt, ## args);}
#define L2CAP_TRACE_API(fmt, args...) {if (l2cb.l2cap_trace_level >= BT_TRACE_LEVEL_API && BT_LOG_LEVEL_CHECK(L2CAP,API)) BT_PRINT_I("BT_L2CAP", fmt, ## args);}
#define L2CAP_TRACE_EVENT(fmt, args...) {if (l2cb.l2cap_trace_level >= BT_TRACE_LEVEL_EVENT && BT_LOG_LEVEL_CHECK(L2CAP,EVENT)) BT_PRINT_D("BT_L2CAP", fmt, ## args);}
#define L2CAP_TRACE_DEBUG(fmt, args...) {if (l2cb.l2cap_trace_level >= BT_TRACE_LEVEL_DEBUG && BT_LOG_LEVEL_CHECK(L2CAP,DEBUG)) BT_PRINT_D("BT_L2CAP", fmt, ## args);}
+#endif // (BT_BLE_LOG_SPI_OUT_HOST_ENABLED && !CLASSIC_BT_INCLUDED)
+
+
/* Define tracing for the SDP unit
*/
#define SDP_TRACE_ERROR(fmt, args...) {if (sdp_cb.trace_level >= BT_TRACE_LEVEL_ERROR && BT_LOG_LEVEL_CHECK(SDP, ERROR)) BT_PRINT_E("BT_SDP", fmt, ## args);}
@@ -248,11 +307,35 @@ static inline void trc_dump_buffer(const char *prefix, uint8_t *data, uint16_t l
#define RFCOMM_TRACE_DEBUG(fmt, args...) {if (rfc_cb.trace_level >= BT_TRACE_LEVEL_DEBUG && BT_LOG_LEVEL_CHECK(RFCOMM,DEBUG)) BT_PRINT_D("BT_RFCOMM", fmt, ## args);}
/* Generic Access Profile traces */
+#if (BT_BLE_LOG_SPI_OUT_HOST_ENABLED && !CLASSIC_BT_INCLUDED)
+
+#define GAP_TRACE_ERROR(fmt, args...) { \
+ if (gap_cb.trace_level >= BT_TRACE_LEVEL_ERROR && BT_LOG_LEVEL_CHECK(GAP, ERROR)) BT_PRINT_E("BT_GAP", fmt, ## args); \
+}
+
+#define GAP_TRACE_WARNING(fmt, args...) { \
+ if (gap_cb.trace_level >= BT_TRACE_LEVEL_WARNING && BT_LOG_LEVEL_CHECK(GAP, WARNING)) BT_PRINT_W("BT_GAP", fmt, ## args); \
+}
+
+#define GAP_TRACE_API(fmt, args...) { \
+ ble_log_spi_out_printf_enh(BLE_LOG_SPI_OUT_SOURCE_BLUEDROID, BLE_LOG_SPI_OUT_LEVEL_INFO, "BT_GAP", fmt, ## args); \
+ if (gap_cb.trace_level >= BT_TRACE_LEVEL_API && BT_LOG_LEVEL_CHECK(GAP, API)) BT_PRINT_I("BT_GAP", fmt, ## args); \
+}
+
+#define GAP_TRACE_EVENT(fmt, args...) { \
+ if (gap_cb.trace_level >= BT_TRACE_LEVEL_EVENT && BT_LOG_LEVEL_CHECK(GAP, EVENT)) BT_PRINT_D("BT_GAP", fmt, ## args); \
+}
+
+#else
+
#define GAP_TRACE_ERROR(fmt, args...) {if (gap_cb.trace_level >= BT_TRACE_LEVEL_ERROR && BT_LOG_LEVEL_CHECK(GAP, ERROR)) BT_PRINT_E("BT_GAP", fmt, ## args);}
#define GAP_TRACE_API(fmt, args...) {if (gap_cb.trace_level >= BT_TRACE_LEVEL_API && BT_LOG_LEVEL_CHECK(GAP,API)) BT_PRINT_I("BT_GAP", fmt, ## args);}
#define GAP_TRACE_EVENT(fmt, args...) {if (gap_cb.trace_level >= BT_TRACE_LEVEL_EVENT && BT_LOG_LEVEL_CHECK(GAP,EVENT)) BT_PRINT_D("BT_GAP", fmt, ## args);}
#define GAP_TRACE_WARNING(fmt, args...) {if (gap_cb.trace_level >= BT_TRACE_LEVEL_WARNING && BT_LOG_LEVEL_CHECK(GAP, WARNING)) BT_PRINT_W("BT_GAP", fmt, ## args);}
+#endif // (BT_BLE_LOG_SPI_OUT_HOST_ENABLED && !CLASSIC_BT_INCLUDED)
+
+
/* define traces for HID Host */
#define HIDH_TRACE_ERROR(fmt, args...) {if (hh_cb.trace_level >= BT_TRACE_LEVEL_ERROR && BT_LOG_LEVEL_CHECK(HIDH, ERROR)) BT_PRINT_E("BT_HIDH", fmt, ## args);}
#define HIDH_TRACE_WARNING(fmt, args...) {if (hh_cb.trace_level >= BT_TRACE_LEVEL_WARNING && BT_LOG_LEVEL_CHECK(HIDH, WARNING)) BT_PRINT_W("BT_HIDH", fmt, ## args);}
@@ -316,6 +399,34 @@ static inline void trc_dump_buffer(const char *prefix, uint8_t *data, uint16_t l
#define AVRC_TRACE_EVENT(fmt, args...) {if (avrc_cb.trace_level >= BT_TRACE_LEVEL_EVENT && BT_LOG_LEVEL_CHECK(AVRC,EVENT)) BT_PRINT_D("BT_AVRC", fmt, ## args);}
#define AVRC_TRACE_DEBUG(fmt, args...) {if (avrc_cb.trace_level >= BT_TRACE_LEVEL_DEBUG && BT_LOG_LEVEL_CHECK(AVRC,DEBUG)) BT_PRINT_D("BT_AVRC", fmt, ## args);}
+/* Define tracing for OBEX */
+#define OBEX_TRACE_ERROR(fmt, args...) {if (obex_cb.trace_level >= BT_TRACE_LEVEL_ERROR && BT_LOG_LEVEL_CHECK(AVRC, ERROR)) BT_PRINT_E("BT_OBEX", fmt, ## args);}
+#define OBEX_TRACE_WARNING(fmt, args...) {if (obex_cb.trace_level >= BT_TRACE_LEVEL_WARNING && BT_LOG_LEVEL_CHECK(AVRC, WARNING)) BT_PRINT_W("BT_OBEX", fmt, ## args);}
+#define OBEX_TRACE_API(fmt, args...) {if (obex_cb.trace_level >= BT_TRACE_LEVEL_API && BT_LOG_LEVEL_CHECK(AVRC,API)) BT_PRINT_I("BT_OBEX", fmt, ## args);}
+#define OBEX_TRACE_EVENT(fmt, args...) {if (obex_cb.trace_level >= BT_TRACE_LEVEL_EVENT && BT_LOG_LEVEL_CHECK(AVRC,EVENT)) BT_PRINT_D("BT_OBEX", fmt, ## args);}
+#define OBEX_TRACE_DEBUG(fmt, args...) {if (obex_cb.trace_level >= BT_TRACE_LEVEL_DEBUG && BT_LOG_LEVEL_CHECK(AVRC,DEBUG)) BT_PRINT_D("BT_OBEX", fmt, ## args);}
+
+/* Define tracing for OBEX_TL_L2CAP */
+#define OBEX_TL_L2CAP_TRACE_ERROR(fmt, args...) {if (obex_tl_l2cap_cb.trace_level >= BT_TRACE_LEVEL_ERROR && BT_LOG_LEVEL_CHECK(AVRC, ERROR)) BT_PRINT_E("OBEX_TL_L2CAP", fmt, ## args);}
+#define OBEX_TL_L2CAP_TRACE_WARNING(fmt, args...) {if (obex_tl_l2cap_cb.trace_level >= BT_TRACE_LEVEL_WARNING && BT_LOG_LEVEL_CHECK(AVRC, WARNING)) BT_PRINT_W("OBEX_TL_L2CAP", fmt, ## args);}
+#define OBEX_TL_L2CAP_TRACE_API(fmt, args...) {if (obex_tl_l2cap_cb.trace_level >= BT_TRACE_LEVEL_API && BT_LOG_LEVEL_CHECK(AVRC,API)) BT_PRINT_I("OBEX_TL_L2CAP", fmt, ## args);}
+#define OBEX_TL_L2CAP_TRACE_EVENT(fmt, args...) {if (obex_tl_l2cap_cb.trace_level >= BT_TRACE_LEVEL_EVENT && BT_LOG_LEVEL_CHECK(AVRC,EVENT)) BT_PRINT_D("OBEX_TL_L2CAP", fmt, ## args);}
+#define OBEX_TL_L2CAP_TRACE_DEBUG(fmt, args...) {if (obex_tl_l2cap_cb.trace_level >= BT_TRACE_LEVEL_DEBUG && BT_LOG_LEVEL_CHECK(AVRC,DEBUG)) BT_PRINT_D("OBEX_TL_L2CAP", fmt, ## args);}
+
+/* Define tracing for OBEX_TL_RFCOMM */
+#define OBEX_TL_RFCOMM_TRACE_ERROR(fmt, args...) {if (obex_tl_rfcomm_cb.trace_level >= BT_TRACE_LEVEL_ERROR && BT_LOG_LEVEL_CHECK(AVRC, ERROR)) BT_PRINT_E("OBEX_TL_RFCOMM", fmt, ## args);}
+#define OBEX_TL_RFCOMM_TRACE_WARNING(fmt, args...) {if (obex_tl_rfcomm_cb.trace_level >= BT_TRACE_LEVEL_WARNING && BT_LOG_LEVEL_CHECK(AVRC, WARNING)) BT_PRINT_W("OBEX_TL_RFCOMM", fmt, ## args);}
+#define OBEX_TL_RFCOMM_TRACE_API(fmt, args...) {if (obex_tl_rfcomm_cb.trace_level >= BT_TRACE_LEVEL_API && BT_LOG_LEVEL_CHECK(AVRC,API)) BT_PRINT_I("OBEX_TL_RFCOMM", fmt, ## args);}
+#define OBEX_TL_RFCOMM_TRACE_EVENT(fmt, args...) {if (obex_tl_rfcomm_cb.trace_level >= BT_TRACE_LEVEL_EVENT && BT_LOG_LEVEL_CHECK(AVRC,EVENT)) BT_PRINT_D("OBEX_TL_RFCOMM", fmt, ## args);}
+#define OBEX_TL_RFCOMM_TRACE_DEBUG(fmt, args...) {if (obex_tl_rfcomm_cb.trace_level >= BT_TRACE_LEVEL_DEBUG && BT_LOG_LEVEL_CHECK(AVRC,DEBUG)) BT_PRINT_D("OBEX_TL_RFCOMM", fmt, ## args);}
+
+/* Define tracing for GOEPC */
+#define GOEPC_TRACE_ERROR(fmt, args...) {if (goepc_cb.trace_level >= BT_TRACE_LEVEL_ERROR && BT_LOG_LEVEL_CHECK(AVRC, ERROR)) BT_PRINT_E("BT_GOEPC", fmt, ## args);}
+#define GOEPC_TRACE_WARNING(fmt, args...) {if (goepc_cb.trace_level >= BT_TRACE_LEVEL_WARNING && BT_LOG_LEVEL_CHECK(AVRC, WARNING)) BT_PRINT_W("BT_GOEPC", fmt, ## args);}
+#define GOEPC_TRACE_API(fmt, args...) {if (goepc_cb.trace_level >= BT_TRACE_LEVEL_API && BT_LOG_LEVEL_CHECK(AVRC,API)) BT_PRINT_I("BT_GOEPC", fmt, ## args);}
+#define GOEPC_TRACE_EVENT(fmt, args...) {if (goepc_cb.trace_level >= BT_TRACE_LEVEL_EVENT && BT_LOG_LEVEL_CHECK(AVRC,EVENT)) BT_PRINT_D("BT_GOEPC", fmt, ## args);}
+#define GOEPC_TRACE_DEBUG(fmt, args...) {if (goepc_cb.trace_level >= BT_TRACE_LEVEL_DEBUG && BT_LOG_LEVEL_CHECK(AVRC,DEBUG)) BT_PRINT_D("BT_GOEPC", fmt, ## args);}
+
/* MCAP
*/
#define MCA_TRACE_ERROR(fmt, args...) {if (mca_cb.trace_level >= BT_TRACE_LEVEL_ERROR && BT_LOG_LEVEL_CHECK(MCA, ERROR)) BT_PRINT_E("BT_MCA", fmt, ## args);}
@@ -326,20 +437,73 @@ static inline void trc_dump_buffer(const char *prefix, uint8_t *data, uint16_t l
/* Define tracing for the ATT/GATT unit
*/
+#if (BT_BLE_LOG_SPI_OUT_HOST_ENABLED && !CLASSIC_BT_INCLUDED)
+
+#define GATT_TRACE_ERROR(fmt, args...) { \
+ if (gatt_cb.trace_level >= BT_TRACE_LEVEL_ERROR && BT_LOG_LEVEL_CHECK(GATT, ERROR)) BT_PRINT_E("BT_GATT", fmt, ## args); \
+}
+
+#define GATT_TRACE_WARNING(fmt, args...) { \
+ if (gatt_cb.trace_level >= BT_TRACE_LEVEL_WARNING && BT_LOG_LEVEL_CHECK(GATT, WARNING)) BT_PRINT_W("BT_GATT", fmt, ## args); \
+}
+
+#define GATT_TRACE_API(fmt, args...) { \
+ ble_log_spi_out_printf_enh(BLE_LOG_SPI_OUT_SOURCE_BLUEDROID, BLE_LOG_SPI_OUT_LEVEL_INFO, "BT_GATT", fmt, ## args); \
+ if (gatt_cb.trace_level >= BT_TRACE_LEVEL_API && BT_LOG_LEVEL_CHECK(GATT, API)) BT_PRINT_I("BT_GATT", fmt, ## args); \
+}
+
+#define GATT_TRACE_EVENT(fmt, args...) { \
+ if (gatt_cb.trace_level >= BT_TRACE_LEVEL_EVENT && BT_LOG_LEVEL_CHECK(GATT, EVENT)) BT_PRINT_D("BT_GATT", fmt, ## args); \
+}
+
+#define GATT_TRACE_DEBUG(fmt, args...) { \
+ if (gatt_cb.trace_level >= BT_TRACE_LEVEL_DEBUG && BT_LOG_LEVEL_CHECK(GATT, DEBUG)) BT_PRINT_D("BT_GATT", fmt, ## args); \
+}
+
+#else
+
#define GATT_TRACE_ERROR(fmt, args...) {if (gatt_cb.trace_level >= BT_TRACE_LEVEL_ERROR && BT_LOG_LEVEL_CHECK(GATT, ERROR)) BT_PRINT_E("BT_GATT", fmt, ## args);}
#define GATT_TRACE_WARNING(fmt, args...) {if (gatt_cb.trace_level >= BT_TRACE_LEVEL_WARNING && BT_LOG_LEVEL_CHECK(GATT, WARNING)) BT_PRINT_W("BT_GATT", fmt, ## args);}
#define GATT_TRACE_API(fmt, args...) {if (gatt_cb.trace_level >= BT_TRACE_LEVEL_API && BT_LOG_LEVEL_CHECK(GATT,API)) BT_PRINT_I("BT_GATT", fmt, ## args);}
#define GATT_TRACE_EVENT(fmt, args...) {if (gatt_cb.trace_level >= BT_TRACE_LEVEL_EVENT && BT_LOG_LEVEL_CHECK(GATT,EVENT)) BT_PRINT_D("BT_GATT", fmt, ## args);}
#define GATT_TRACE_DEBUG(fmt, args...) {if (gatt_cb.trace_level >= BT_TRACE_LEVEL_DEBUG && BT_LOG_LEVEL_CHECK(GATT,DEBUG)) BT_PRINT_D("BT_GATT", fmt, ## args);}
+#endif // (BT_BLE_LOG_SPI_OUT_HOST_ENABLED && !CLASSIC_BT_INCLUDED)
+
/* Define tracing for the SMP unit
*/
+#if (BT_BLE_LOG_SPI_OUT_HOST_ENABLED && !CLASSIC_BT_INCLUDED)
+
+#define SMP_TRACE_ERROR(fmt, args...) { \
+ if (smp_cb.trace_level >= BT_TRACE_LEVEL_ERROR && BT_LOG_LEVEL_CHECK(SMP, ERROR)) BT_PRINT_E("BT_SMP", fmt, ## args); \
+}
+
+#define SMP_TRACE_WARNING(fmt, args...) { \
+ if (smp_cb.trace_level >= BT_TRACE_LEVEL_WARNING && BT_LOG_LEVEL_CHECK(SMP, WARNING)) BT_PRINT_W("BT_SMP", fmt, ## args); \
+}
+
+#define SMP_TRACE_API(fmt, args...) { \
+ ble_log_spi_out_printf_enh(BLE_LOG_SPI_OUT_SOURCE_BLUEDROID, BLE_LOG_SPI_OUT_LEVEL_INFO, "BT_SMP", fmt, ## args); \
+ if (smp_cb.trace_level >= BT_TRACE_LEVEL_API && BT_LOG_LEVEL_CHECK(SMP, API)) BT_PRINT_I("BT_SMP", fmt, ## args); \
+}
+
+#define SMP_TRACE_EVENT(fmt, args...) { \
+ if (smp_cb.trace_level >= BT_TRACE_LEVEL_EVENT && BT_LOG_LEVEL_CHECK(SMP, EVENT)) BT_PRINT_D("BT_SMP", fmt, ## args); \
+}
+
+#define SMP_TRACE_DEBUG(fmt, args...) { \
+ if (smp_cb.trace_level >= BT_TRACE_LEVEL_DEBUG && BT_LOG_LEVEL_CHECK(SMP, DEBUG)) BT_PRINT_D("BT_SMP", fmt, ## args); \
+}
+
+#else
+
#define SMP_TRACE_ERROR(fmt, args...) {if (smp_cb.trace_level >= BT_TRACE_LEVEL_ERROR && BT_LOG_LEVEL_CHECK(SMP, ERROR)) BT_PRINT_E("BT_SMP", fmt, ## args);}
#define SMP_TRACE_WARNING(fmt, args...) {if (smp_cb.trace_level >= BT_TRACE_LEVEL_WARNING && BT_LOG_LEVEL_CHECK(SMP, WARNING)) BT_PRINT_W("BT_SMP", fmt, ## args);}
#define SMP_TRACE_API(fmt, args...) {if (smp_cb.trace_level >= BT_TRACE_LEVEL_API && BT_LOG_LEVEL_CHECK(SMP,API)) BT_PRINT_I("BT_SMP", fmt, ## args);}
#define SMP_TRACE_EVENT(fmt, args...) {if (smp_cb.trace_level >= BT_TRACE_LEVEL_EVENT && BT_LOG_LEVEL_CHECK(SMP,EVENT)) BT_PRINT_D("BT_SMP", fmt, ## args);}
#define SMP_TRACE_DEBUG(fmt, args...) {if (smp_cb.trace_level >= BT_TRACE_LEVEL_DEBUG && BT_LOG_LEVEL_CHECK(SMP,DEBUG)) BT_PRINT_D("BT_SMP", fmt, ## args);}
+#endif // (BT_BLE_LOG_SPI_OUT_HOST_ENABLED && !CLASSIC_BT_INCLUDED)
extern UINT8 btif_trace_level;
@@ -484,6 +648,34 @@ extern UINT8 btif_trace_level;
#define AVRC_TRACE_DEBUG(fmt, args...)
#define AVRC_TRACE_API(fmt, args...)
+/* Define tracing for OBEX */
+#define OBEX_TRACE_ERROR(fmt, args...)
+#define OBEX_TRACE_WARNING(fmt, args...)
+#define OBEX_TRACE_API(fmt, args...)
+#define OBEX_TRACE_EVENT(fmt, args...)
+#define OBEX_TRACE_DEBUG(fmt, args...)
+
+/* Define tracing for OBEX L2CAP transport layer */
+#define OBEX_TL_L2CAP_TRACE_ERROR(fmt, args...)
+#define OBEX_TL_L2CAP_TRACE_WARNING(fmt, args...)
+#define OBEX_TL_L2CAP_TRACE_API(fmt, args...)
+#define OBEX_TL_L2CAP_TRACE_EVENT(fmt, args...)
+#define OBEX_TL_L2CAP_TRACE_DEBUG(fmt, args...)
+
+/* Define tracing for OBEX RFCOMM transport layer */
+#define OBEX_TL_RFCOMM_TRACE_ERROR(fmt, args...)
+#define OBEX_TL_RFCOMM_TRACE_WARNING(fmt, args...)
+#define OBEX_TL_RFCOMM_TRACE_API(fmt, args...)
+#define OBEX_TL_RFCOMM_TRACE_EVENT(fmt, args...)
+#define OBEX_TL_RFCOMM_TRACE_DEBUG(fmt, args...)
+
+/* Define tracing for GOEPC */
+#define GOEPC_TRACE_ERROR(fmt, args...)
+#define GOEPC_TRACE_WARNING(fmt, args...)
+#define GOEPC_TRACE_API(fmt, args...)
+#define GOEPC_TRACE_EVENT(fmt, args...)
+#define GOEPC_TRACE_DEBUG(fmt, args...)
+
/* MCAP
*/
#define MCA_TRACE_ERROR(fmt, args...)