This commit is contained in:
lmx
2025-10-29 13:10:02 +08:00
commit 49a07fa419
2284 changed files with 642060 additions and 0 deletions

View File

@ -0,0 +1,180 @@
/*********************************************************************************************
* Filename : log_config.c
* Description : Optimized Code & RAM (编译优化Log配置)
* Author : Bingquan
* Email : caibingquan@zh-jieli.com
* Last modifiled : 2019-03-18 14:45
* Copyright:(c)JIELI 2011-2019 @ , All Rights Reserved.
*********************************************************************************************/
#include "system/includes.h"
/**
* @brief Bluetooth Controller Log
*/
/*-----------------------------------------------------------*/
const char log_tag_const_v_SETUP AT(.LOG_TAG_CONST) = FALSE;
const char log_tag_const_i_SETUP AT(.LOG_TAG_CONST) = FALSE;
const char log_tag_const_w_SETUP AT(.LOG_TAG_CONST) = FALSE;
const char log_tag_const_d_SETUP AT(.LOG_TAG_CONST) = TRUE;
const char log_tag_const_e_SETUP AT(.LOG_TAG_CONST) = TRUE;
const char log_tag_const_v_BOARD AT(.LOG_TAG_CONST) = FALSE;
const char log_tag_const_i_BOARD AT(.LOG_TAG_CONST) = TRUE;
const char log_tag_const_d_BOARD AT(.LOG_TAG_CONST) = TRUE;
const char log_tag_const_w_BOARD AT(.LOG_TAG_CONST) = TRUE;
const char log_tag_const_e_BOARD AT(.LOG_TAG_CONST) = TRUE;
const char log_tag_const_v_EARPHONE AT(.LOG_TAG_CONST) = FALSE;
const char log_tag_const_i_EARPHONE AT(.LOG_TAG_CONST) = TRUE;
const char log_tag_const_d_EARPHONE AT(.LOG_TAG_CONST) = FALSE;
const char log_tag_const_w_EARPHONE AT(.LOG_TAG_CONST) = TRUE;
const char log_tag_const_e_EARPHONE AT(.LOG_TAG_CONST) = TRUE;
const char log_tag_const_v_UI AT(.LOG_TAG_CONST) = FALSE;
const char log_tag_const_i_UI AT(.LOG_TAG_CONST) = TRUE;
const char log_tag_const_d_UI AT(.LOG_TAG_CONST) = FALSE;
const char log_tag_const_w_UI AT(.LOG_TAG_CONST) = TRUE;
const char log_tag_const_e_UI AT(.LOG_TAG_CONST) = TRUE;
const char log_tag_const_v_APP_CHARGE AT(.LOG_TAG_CONST) = FALSE;
const char log_tag_const_i_APP_CHARGE AT(.LOG_TAG_CONST) = TRUE;
const char log_tag_const_d_APP_CHARGE AT(.LOG_TAG_CONST) = FALSE;
const char log_tag_const_w_APP_CHARGE AT(.LOG_TAG_CONST) = TRUE;
const char log_tag_const_e_APP_CHARGE AT(.LOG_TAG_CONST) = TRUE;
const char log_tag_const_v_APP_ANCBOX AT(.LOG_TAG_CONST) = FALSE;
const char log_tag_const_i_APP_ANCBOX AT(.LOG_TAG_CONST) = TRUE;
const char log_tag_const_d_APP_ANCBOX AT(.LOG_TAG_CONST) = FALSE;
const char log_tag_const_w_APP_ANCBOX AT(.LOG_TAG_CONST) = TRUE;
const char log_tag_const_e_APP_ANCBOX AT(.LOG_TAG_CONST) = TRUE;
const char log_tag_const_v_KEY_EVENT_DEAL AT(.LOG_TAG_CONST) = FALSE;
const char log_tag_const_i_KEY_EVENT_DEAL AT(.LOG_TAG_CONST) = TRUE;
const char log_tag_const_d_KEY_EVENT_DEAL AT(.LOG_TAG_CONST) = FALSE;
const char log_tag_const_w_KEY_EVENT_DEAL AT(.LOG_TAG_CONST) = TRUE;
const char log_tag_const_e_KEY_EVENT_DEAL AT(.LOG_TAG_CONST) = TRUE;
const char log_tag_const_v_APP_CHARGESTORE AT(.LOG_TAG_CONST) = FALSE;
const char log_tag_const_i_APP_CHARGESTORE AT(.LOG_TAG_CONST) = TRUE;
const char log_tag_const_d_APP_CHARGESTORE AT(.LOG_TAG_CONST) = FALSE;
const char log_tag_const_w_APP_CHARGESTORE AT(.LOG_TAG_CONST) = TRUE;
const char log_tag_const_e_APP_CHARGESTORE AT(.LOG_TAG_CONST) = TRUE;
const char log_tag_const_v_APP_UMIDIGI_CHARGESTORE AT(.LOG_TAG_CONST) = FALSE;
const char log_tag_const_i_APP_UMIDIGI_CHARGESTORE AT(.LOG_TAG_CONST) = TRUE;
const char log_tag_const_d_APP_UMIDIGI_CHARGESTORE AT(.LOG_TAG_CONST) = FALSE;
const char log_tag_const_w_APP_UMIDIGI_CHARGESTORE AT(.LOG_TAG_CONST) = TRUE;
const char log_tag_const_e_APP_UMIDIGI_CHARGESTORE AT(.LOG_TAG_CONST) = TRUE;
const char log_tag_const_v_APP_CFG_TOOL AT(.LOG_TAG_CONST) = FALSE;
const char log_tag_const_i_APP_CFG_TOOL AT(.LOG_TAG_CONST) = TRUE;
const char log_tag_const_d_APP_CFG_TOOL AT(.LOG_TAG_CONST) = FALSE;
const char log_tag_const_w_APP_CFG_TOOL AT(.LOG_TAG_CONST) = TRUE;
const char log_tag_const_e_APP_CFG_TOOL AT(.LOG_TAG_CONST) = TRUE;
const char log_tag_const_v_APP_TESTBOX AT(.LOG_TAG_CONST) = FALSE;
const char log_tag_const_i_APP_TESTBOX AT(.LOG_TAG_CONST) = TRUE;
const char log_tag_const_d_APP_TESTBOX AT(.LOG_TAG_CONST) = FALSE;
const char log_tag_const_w_APP_TESTBOX AT(.LOG_TAG_CONST) = TRUE;
const char log_tag_const_e_APP_TESTBOX AT(.LOG_TAG_CONST) = TRUE;
const char log_tag_const_v_APP_IDLE AT(.LOG_TAG_CONST) = FALSE;
const char log_tag_const_i_APP_IDLE AT(.LOG_TAG_CONST) = TRUE;
const char log_tag_const_d_APP_IDLE AT(.LOG_TAG_CONST) = FALSE;
const char log_tag_const_w_APP_IDLE AT(.LOG_TAG_CONST) = TRUE;
const char log_tag_const_e_APP_IDLE AT(.LOG_TAG_CONST) = TRUE;
const char log_tag_const_v_APP_POWER AT(.LOG_TAG_CONST) = FALSE;
const char log_tag_const_i_APP_POWER AT(.LOG_TAG_CONST) = TRUE;
const char log_tag_const_d_APP_POWER AT(.LOG_TAG_CONST) = FALSE;
const char log_tag_const_w_APP_POWER AT(.LOG_TAG_CONST) = TRUE;
const char log_tag_const_e_APP_POWER AT(.LOG_TAG_CONST) = TRUE;
const char log_tag_const_v_APP AT(.LOG_TAG_CONST) = FALSE;
const char log_tag_const_i_APP AT(.LOG_TAG_CONST) = TRUE;
const char log_tag_const_d_APP AT(.LOG_TAG_CONST) = FALSE;
const char log_tag_const_w_APP AT(.LOG_TAG_CONST) = TRUE;
const char log_tag_const_e_APP AT(.LOG_TAG_CONST) = TRUE;
const char log_tag_const_v_USER_CFG AT(.LOG_TAG_CONST) = FALSE;
const char log_tag_const_i_USER_CFG AT(.LOG_TAG_CONST) = TRUE;
const char log_tag_const_d_USER_CFG AT(.LOG_TAG_CONST) = FALSE;
const char log_tag_const_w_USER_CFG AT(.LOG_TAG_CONST) = TRUE;
const char log_tag_const_e_USER_CFG AT(.LOG_TAG_CONST) = TRUE;
const char log_tag_const_v_APP_TONE AT(.LOG_TAG_CONST) = FALSE;
const char log_tag_const_i_APP_TONE AT(.LOG_TAG_CONST) = TRUE;
const char log_tag_const_d_APP_TONE AT(.LOG_TAG_CONST) = FALSE;
const char log_tag_const_w_APP_TONE AT(.LOG_TAG_CONST) = TRUE;
const char log_tag_const_e_APP_TONE AT(.LOG_TAG_CONST) = TRUE;
const char log_tag_const_v_BT_TWS AT(.LOG_TAG_CONST) = FALSE;
const char log_tag_const_i_BT_TWS AT(.LOG_TAG_CONST) = TRUE;
const char log_tag_const_d_BT_TWS AT(.LOG_TAG_CONST) = FALSE;
const char log_tag_const_w_BT_TWS AT(.LOG_TAG_CONST) = TRUE;
const char log_tag_const_e_BT_TWS AT(.LOG_TAG_CONST) = TRUE;
const char log_tag_const_v_AEC_USER AT(.LOG_TAG_CONST) = FALSE;
const char log_tag_const_i_AEC_USER AT(.LOG_TAG_CONST) = TRUE;
const char log_tag_const_d_AEC_USER AT(.LOG_TAG_CONST) = FALSE;
const char log_tag_const_w_AEC_USER AT(.LOG_TAG_CONST) = TRUE;
const char log_tag_const_e_AEC_USER AT(.LOG_TAG_CONST) = TRUE;
const char log_tag_const_v_BT_BLE AT(.LOG_TAG_CONST) = 0;
const char log_tag_const_i_BT_BLE AT(.LOG_TAG_CONST) = 0;
const char log_tag_const_d_BT_BLE AT(.LOG_TAG_CONST) = 1;
const char log_tag_const_w_BT_BLE AT(.LOG_TAG_CONST) = 1;
const char log_tag_const_e_BT_BLE AT(.LOG_TAG_CONST) = 1;
const char log_tag_const_v_EARTCH_EVENT_DEAL AT(.LOG_TAG_CONST) = FALSE;
const char log_tag_const_i_EARTCH_EVENT_DEAL AT(.LOG_TAG_CONST) = TRUE;
const char log_tag_const_d_EARTCH_EVENT_DEAL AT(.LOG_TAG_CONST) = FALSE;
const char log_tag_const_w_EARTCH_EVENT_DEAL AT(.LOG_TAG_CONST) = TRUE;
const char log_tag_const_e_EARTCH_EVENT_DEAL AT(.LOG_TAG_CONST) = TRUE;
const char log_tag_const_v_ONLINE_DB AT(.LOG_TAG_CONST) = 0;
const char log_tag_const_i_ONLINE_DB AT(.LOG_TAG_CONST) = 0;
const char log_tag_const_d_ONLINE_DB AT(.LOG_TAG_CONST) = 0;
const char log_tag_const_w_ONLINE_DB AT(.LOG_TAG_CONST) = 0;
const char log_tag_const_e_ONLINE_DB AT(.LOG_TAG_CONST) = 1;
const char log_tag_const_v_MUSIC AT(.LOG_TAG_CONST) = FALSE;
const char log_tag_const_i_MUSIC AT(.LOG_TAG_CONST) = TRUE;
const char log_tag_const_w_MUSIC AT(.LOG_TAG_CONST) = FALSE;
const char log_tag_const_d_MUSIC AT(.LOG_TAG_CONST) = TRUE;
const char log_tag_const_e_MUSIC AT(.LOG_TAG_CONST) = TRUE;
const char log_tag_const_v_APP_MUSIC AT(.LOG_TAG_CONST) = FALSE;
const char log_tag_const_i_APP_MUSIC AT(.LOG_TAG_CONST) = TRUE;
const char log_tag_const_d_APP_MUSIC AT(.LOG_TAG_CONST) = FALSE;
const char log_tag_const_w_APP_MUSIC AT(.LOG_TAG_CONST) = TRUE;
const char log_tag_const_e_APP_MUSIC AT(.LOG_TAG_CONST) = TRUE;
const char log_tag_const_v_PC AT(.LOG_TAG_CONST) = FALSE;
const char log_tag_const_i_PC AT(.LOG_TAG_CONST) = TRUE;
const char log_tag_const_w_PC AT(.LOG_TAG_CONST) = FALSE;
const char log_tag_const_d_PC AT(.LOG_TAG_CONST) = TRUE;
const char log_tag_const_e_PC AT(.LOG_TAG_CONST) = TRUE;
const char log_tag_const_v_AUX AT(.LOG_TAG_CONST) = FALSE;
const char log_tag_const_i_AUX AT(.LOG_TAG_CONST) = TRUE;
const char log_tag_const_d_AUX AT(.LOG_TAG_CONST) = FALSE;
const char log_tag_const_w_AUX AT(.LOG_TAG_CONST) = TRUE;
const char log_tag_const_e_AUX AT(.LOG_TAG_CONST) = TRUE;
const char log_tag_const_v_WIRELESSMIC AT(.LOG_TAG_CONST) = FALSE;
const char log_tag_const_i_WIRELESSMIC AT(.LOG_TAG_CONST) = TRUE;
const char log_tag_const_w_WIRELESSMIC AT(.LOG_TAG_CONST) = FALSE;
const char log_tag_const_d_WIRELESSMIC AT(.LOG_TAG_CONST) = TRUE;
const char log_tag_const_e_WIRELESSMIC AT(.LOG_TAG_CONST) = TRUE;
const char log_tag_const_v_KWS_VOICE_EVENT AT(.LOG_TAG_CONST) = FALSE;
const char log_tag_const_i_KWS_VOICE_EVENT AT(.LOG_TAG_CONST) = TRUE;
const char log_tag_const_d_KWS_VOICE_EVENT AT(.LOG_TAG_CONST) = TRUE;
const char log_tag_const_w_KWS_VOICE_EVENT AT(.LOG_TAG_CONST) = TRUE;
const char log_tag_const_e_KWS_VOICE_EVENT AT(.LOG_TAG_CONST) = TRUE;

View File

@ -0,0 +1,539 @@
/*********************************************************************************************
* Filename : btctrler_config.c
* Description : Optimized Code & RAM (编译优化配置)
* Author : Bingquan
* Email : caibingquan@zh-jieli.com
* Last modifiled : 2019-03-16 11:49
* Copyright:(c)JIELI 2011-2019 @ , All Rights Reserved.
*********************************************************************************************/
#include "app_config.h"
#include "system/includes.h"
#include "btcontroller_config.h"
#include "bt_common.h"
/**
* @brief Bluetooth Module
*/
//固定使用正常发射功率的等级:0-使用不同模式的各自等级;1~10-固定发射功率等级
const int config_force_bt_pwr_tab_using_normal_level = 0;
const int CONFIG_BLE_SYNC_WORD_BIT = 30;
const int CONFIG_LNA_CHECK_VAL = -80;
#if TCFG_USER_TWS_ENABLE
#if (BT_FOR_APP_EN || TCFG_USER_BLE_ENABLE)
const int config_btctler_modules = BT_MODULE_CLASSIC | BT_MODULE_LE;
#else
#ifdef CONFIG_NEW_BREDR_ENABLE
#if (BT_FOR_APP_EN)
const int config_btctler_modules = (BT_MODULE_CLASSIC | BT_MODULE_LE);
#else
const int config_btctler_modules = (BT_MODULE_CLASSIC);
#endif
#else
const int config_btctler_modules = (BT_MODULE_CLASSIC | BT_MODULE_LE);
#endif
#endif
#ifdef CONFIG_NEW_BREDR_ENABLE
const int config_btctler_le_tws = 0;
const int CONFIG_BTCTLER_FAST_CONNECT_ENABLE = 0;
#if TCFG_DEC2TWS_ENABLE
const int CONFIG_TWS_WORK_MODE = 1;
#else
const int CONFIG_TWS_WORK_MODE = 2;
#endif
#ifdef CONFIG_SUPPORT_EX_TWS_ADJUST
const int CONFIG_EX_TWS_ADJUST = 1;
#else
const int CONFIG_EX_TWS_ADJUST = 0;
#endif
const int CONFIG_EXTWS_NACK_LIMIT_INT_CNT = 4;
const int CONFIG_TWS_RUN_SLOT = 200;
const int CONFIG_PHONE_RUN_SLOT = 160;
const int CONFIG_TWS_LOW_LATENCY_RUN_SLOT = 8;
const int CONFIG_PHONE_LOW_LATENCY_RUN_SLOT = 120;
const int CONFIG_TWS_FORWARD_TIMEOUT = 64;
#else
const int config_btctler_le_tws = 1;
const int CONFIG_BTCTLER_FAST_CONNECT_ENABLE = 0;
#endif
const int CONFIG_BTCTLER_TWS_ENABLE = 1;
#ifdef CONFIG_256K_FLASH
const int CONFIG_TWS_POWER_BALANCE_ENABLE = 0;
const int CONFIG_LOW_LATENCY_ENABLE = 0;
const int CONFIG_TWS_AFH_ENABLE = 0;
#else
const int CONFIG_TWS_POWER_BALANCE_ENABLE = 1;
const int CONFIG_LOW_LATENCY_ENABLE = 1;
const int CONFIG_TWS_AFH_ENABLE = 1;
#endif
const int CONFIG_MASTER_MAX_RX_BULK_PERSENT = 70;
#else //TCFG_USER_TWS_ENABLE
/* #if (TCFG_USER_BLE_ENABLE || GMA_EN) */
#if (TCFG_USER_BLE_ENABLE)
const int config_btctler_modules = BT_MODULE_CLASSIC | BT_MODULE_LE;
#else
const int config_btctler_modules = BT_MODULE_CLASSIC;
#endif
const int config_btctler_le_tws = 0;
const int CONFIG_BTCTLER_TWS_ENABLE = 0;
const int CONFIG_TWS_AFH_ENABLE = 0;
const int CONFIG_LOW_LATENCY_ENABLE = 0;
const int CONFIG_MASTER_MAX_RX_BULK_PERSENT = 0;
const int CONFIG_TWS_POWER_BALANCE_ENABLE = 0;
const int CONFIG_BTCTLER_FAST_CONNECT_ENABLE = 0;
#endif
const int CONFIG_A2DP_MAX_BUF_SIZE = 20 * 1024;
const int CONFIG_BT_TX_BUFF_MAX_SIZE = 10 * 1024;
const int CONFIG_TWS_SUPER_TIMEOUT = 2000;
const int CONFIG_BTCTLER_QOS_ENABLE = 1;
const int CONFIG_A2DP_DATA_CACHE_LOW_AAC = 100;
const int CONFIG_A2DP_DATA_CACHE_HI_AAC = 250;
const int CONFIG_A2DP_DATA_CACHE_LOW_SBC = 150;
const int CONFIG_A2DP_DATA_CACHE_HI_SBC = 260;
#if TCFG_EQ_ONLINE_ENABLE
const int CONFIG_A2DP_DELAY_TIME = 200;//调音时,减少延时,避免影响频响测试
#else
const int CONFIG_A2DP_DELAY_TIME = 340;
#endif
const int CONFIG_A2DP_DELAY_TIME_LO = 100;
#ifdef CONFIG_A2DP_GAME_MODE_DELAY_TIME
const int CONFIG_A2DP_SBC_DELAY_TIME_LO = CONFIG_A2DP_GAME_MODE_DELAY_TIME + 12;
#else
const int CONFIG_A2DP_SBC_DELAY_TIME_LO = 75;
#endif
const int CONFIG_PAGE_POWER = 4;
const int CONFIG_PAGE_SCAN_POWER = 7;
const int CONFIG_INQUIRY_POWER = 7;
const int CONFIG_INQUIRY_SCAN_POWER = 7;
const int CONFIG_DUT_POWER = 10;
#if (CONFIG_BT_MODE != BT_NORMAL)
const int config_btctler_hci_standard = 1;
#else
const int config_btctler_hci_standard = 0;
#endif
const int config_btctler_mode = CONFIG_BT_MODE;
/*-----------------------------------------------------------*/
/**
* @brief Bluetooth Classic setting
*/
const u8 rx_fre_offset_adjust_enable = 1;
const int config_bredr_fcc_fix_fre = 0;
const int ble_disable_wait_enable = 1;
const int config_btctler_eir_version_info_len = 21;
#ifdef CONFIG_256K_FLASH
const int CONFIG_TEST_DUT_CODE = 1;
const int CONFIG_TEST_FCC_CODE = 0;
const int CONFIG_TEST_DUT_ONLY_BOX_CODE = 1;
#else
const int CONFIG_TEST_DUT_CODE = 1;
const int CONFIG_TEST_FCC_CODE = 1;
const int CONFIG_TEST_DUT_ONLY_BOX_CODE = 0;
#endif
const int CONFIG_ESCO_MUX_RX_BULK_ENABLE = 0;
#if TCFG_USER_EMITTER_ENABLE
const int CONFIG_BREDR_INQUIRY = 1;
const int CONFIG_LMP_MASTER_ESCO_ENABLE = 1;
#else
const int CONFIG_BREDR_INQUIRY = 0;
const int CONFIG_LMP_MASTER_ESCO_ENABLE = 0;
#endif
const int CONFIG_INQUIRY_PAGE_OFFSET_ADJUST = 0;
const int CONFIG_LMP_NAME_REQ_ENABLE = 0;
const int CONFIG_LMP_PASSKEY_ENABLE = 0;
// *INDENT-OFF*
#ifdef CONFIG_SUPPORT_WIFI_DETECT
#if TCFG_USER_TWS_ENABLE
const int CONFIG_WIFI_DETECT_ENABLE = 1;
#else
const int CONFIG_WIFI_DETECT_ENABLE = 1;
#endif
#else
const int CONFIG_WIFI_DETECT_ENABLE = 0;
#endif
const int ESCO_FORWARD_ENABLE = 0;
// *INDENT-ON*
const int config_bt_function = 0;
///bredr 强制 做 maseter
const int config_btctler_bredr_master = 0;
const int config_btctler_dual_a2dp = 0;
///afh maseter 使用app设置的map 通过USER_CTRL_AFH_CHANNEL 设置
const int config_bredr_afh_user = 0;
//bt PLL 温度跟随trim
const int config_bt_temperature_pll_trim = 0;
/*security check*/
const int config_bt_security_vulnerability = 0;
const int config_delete_link_key = 1; //配置是否连接失败返回PIN or Link Key Missing时删除linkKey
/*-----------------------------------------------------------*/
/**
* @brief Bluetooth LE setting
*/
#if (TCFG_USER_BLE_ENABLE)
#if (TCFG_BLE_DEMO_SELECT == DEF_BLE_DEMO_ADV)
const int config_btctler_le_roles = (LE_ADV);
const uint64_t config_btctler_le_features = 0;
#elif (TCFG_BLE_DEMO_SELECT == DEF_BLE_DEMO_WIRELESS_MIC_CLIENT)
const uint64_t config_btctler_le_features = LE_ENCRYPTION | LE_CODED_PHY | LE_DATA_PACKET_LENGTH_EXTENSION | LE_2M_PHY;
const int config_btctler_le_roles = (LE_SCAN | LE_INIT | LE_MASTER);
#elif (TCFG_BLE_DEMO_SELECT == DEF_BLE_DEMO_WIRELESS_MIC_SERVER)
const int config_btctler_le_roles = (LE_ADV | LE_SLAVE);
const uint64_t config_btctler_le_features = LE_ENCRYPTION | LE_CODED_PHY | LE_DATA_PACKET_LENGTH_EXTENSION | LE_2M_PHY;
#elif (TCFG_BLE_DEMO_SELECT == DEF_LE_AUDIO_CENTRAL)
const int config_btctler_le_roles = (LE_SCAN | LE_INIT | LE_MASTER);
const uint64_t config_btctler_le_features = LE_ENCRYPTION | LE_CODED_PHY | LE_FEATURES_ISO | LE_2M_PHY;
#elif (TCFG_BLE_DEMO_SELECT == DEF_LE_AUDIO_PERIPHERAL)
const int config_btctler_le_roles = (LE_ADV | LE_SLAVE);
const uint64_t config_btctler_le_features = LE_ENCRYPTION | LE_CODED_PHY | LE_FEATURES_ISO | LE_2M_PHY;
#elif (BLE_HID_EN)
const int config_btctler_le_roles = (LE_ADV | LE_SLAVE);
const uint64_t config_btctler_le_features = LE_ENCRYPTION;
#else
const int config_btctler_le_roles = (LE_ADV | LE_SLAVE);
const uint64_t config_btctler_le_features = 0;
#endif
#else
const int config_btctler_le_roles = 0;
const uint64_t config_btctler_le_features = 0;
#endif
// Master multi-link
const int config_btctler_le_master_multilink = 0;
// LE RAM Control
#ifdef CONFIG_NEW_BREDR_ENABLE
const int config_btctler_le_hw_nums = 1;
#else
const int config_btctler_le_hw_nums = 2;
#endif
const int config_btctler_le_slave_conn_update_winden = 2500;//range:100 to 2500
// LE vendor baseband
#if (TCFG_BLE_DEMO_SELECT == DEF_BLE_DEMO_WIRELESS_MIC_CLIENT)
//const u32 config_vendor_le_bb = VENDOR_BB_MD_CLOSE |
//VENDOR_BB_CONNECT_SLOT |
//VENDOR_BB_EVT_HOLD |
//VENDOR_BB_EVT_HOLD_TRIGG(25) |
//VENDOR_BB_EVT_HOLD_TICK(0); //LE vendor baseband
const u32 config_vendor_le_bb = VENDOR_BB_MD_CLOSE | VENDOR_BB_CONNECT_SLOT | VENDOR_BB_ADV_PDU_INT(3);//LE vendor baseband
// Master AFH
const int config_btctler_le_afh_en = 1;
const int config_btctler_le_rx_nums = 8;
const int config_btctler_le_acl_packet_length = 251;
const int config_btctler_le_acl_total_nums = 1;
#elif (TCFG_BLE_DEMO_SELECT == DEF_BLE_DEMO_WIRELESS_MIC_SERVER)
const u32 config_vendor_le_bb = VENDOR_BB_MD_CLOSE | VENDOR_BB_CONNECT_SLOT | VENDOR_BB_ADV_PDU_INT(3);//LE vendor baseband
// Master AFH
const int config_btctler_le_afh_en = 1;
const int config_btctler_le_rx_nums = 8;
const int config_btctler_le_acl_packet_length = 251;
const int config_btctler_le_acl_total_nums = 1;
#else
// Master AFH
const int config_btctler_le_afh_en = 0;
const u32 config_vendor_le_bb = 0;
const int config_btctler_le_rx_nums = 5;
const int config_btctler_le_acl_packet_length = 27;
const int config_btctler_le_acl_total_nums = 5;
#endif
/*-----------------------------------------------------------*/
/**
* @brief Bluetooth Analog setting
*/
/*-----------------------------------------------------------*/
#if ((!TCFG_USER_BT_CLASSIC_ENABLE) && TCFG_USER_BLE_ENABLE)
const int config_btctler_single_carrier_en = 1; ////单模ble才设置
#else
const int config_btctler_single_carrier_en = 0;
#endif
const int sniff_support_reset_anchor_point = 0; //sniff状态下是否支持reset到最近一次通信点用于HID
const int sniff_long_interval = (500 / 0.625); //sniff状态下进入long interval的通信间隔(ms)
const int config_rf_oob = 0;
/*-----------------------------------------------------------*/
/**
* @brief Log (Verbose/Info/Debug/Warn/Error)
*/
/*-----------------------------------------------------------*/
//RF part
const char log_tag_const_v_Analog AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(0);
const char log_tag_const_i_Analog AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(0);
const char log_tag_const_w_Analog AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(0);
const char log_tag_const_d_Analog AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(0);
const char log_tag_const_e_Analog AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(0);
const char log_tag_const_v_RF AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(0);
const char log_tag_const_i_RF AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(0);
const char log_tag_const_d_RF AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(0);
const char log_tag_const_w_RF AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(0);
const char log_tag_const_e_RF AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(0);
//Classic part
const char log_tag_const_v_HCI_LMP AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(0);
const char log_tag_const_i_HCI_LMP AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(1);
const char log_tag_const_d_HCI_LMP AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(0);
const char log_tag_const_w_HCI_LMP AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(1);
const char log_tag_const_e_HCI_LMP AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(1);
const char log_tag_const_v_LMP AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(0);
const char log_tag_const_i_LMP AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(1);
const char log_tag_const_d_LMP AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(1);
const char log_tag_const_w_LMP AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(1);
const char log_tag_const_e_LMP AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(1);
//LE part
const char log_tag_const_v_LE_BB AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(0);
const char log_tag_const_i_LE_BB AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(0);
const char log_tag_const_d_LE_BB AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(0);
const char log_tag_const_w_LE_BB AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(0);
const char log_tag_const_e_LE_BB AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(1);
const char log_tag_const_v_LE5_BB AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(0);
const char log_tag_const_i_LE5_BB AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(0);
const char log_tag_const_d_LE5_BB AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(1);
const char log_tag_const_w_LE5_BB AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(1);
const char log_tag_const_e_LE5_BB AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(1);
const char log_tag_const_v_HCI_LL AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(0);
const char log_tag_const_i_HCI_LL AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(0);
const char log_tag_const_d_HCI_LL AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(0);
const char log_tag_const_w_HCI_LL AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(0);
const char log_tag_const_e_HCI_LL AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(1);
const char log_tag_const_v_LL AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(0);
const char log_tag_const_i_LL AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(0);
const char log_tag_const_d_LL AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(0);
const char log_tag_const_w_LL AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(0);
const char log_tag_const_e_LL AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(1);
const char log_tag_const_v_LL_E AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(0);
const char log_tag_const_i_LL_E AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(0);
const char log_tag_const_d_LL_E AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(1);
const char log_tag_const_w_LL_E AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(1);
const char log_tag_const_e_LL_E AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(1);
const char log_tag_const_v_LL_M AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(0);
const char log_tag_const_i_LL_M AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(0);
const char log_tag_const_d_LL_M AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(1);
const char log_tag_const_w_LL_M AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(1);
const char log_tag_const_e_LL_M AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(1);
const char log_tag_const_v_LL_ADV AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(0);
const char log_tag_const_i_LL_ADV AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(0);
const char log_tag_const_d_LL_ADV AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(1);
const char log_tag_const_w_LL_ADV AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(1);
const char log_tag_const_e_LL_ADV AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(1);
const char log_tag_const_v_LL_SCAN AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(0);
const char log_tag_const_i_LL_SCAN AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(0);
const char log_tag_const_d_LL_SCAN AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(1);
const char log_tag_const_w_LL_SCAN AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(1);
const char log_tag_const_e_LL_SCAN AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(1);
const char log_tag_const_v_LL_INIT AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(0);
const char log_tag_const_i_LL_INIT AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(0);
const char log_tag_const_d_LL_INIT AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(1);
const char log_tag_const_w_LL_INIT AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(1);
const char log_tag_const_e_LL_INIT AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(1);
const char log_tag_const_v_LL_EXT_ADV AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(0);
const char log_tag_const_i_LL_EXT_ADV AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(0);
const char log_tag_const_d_LL_EXT_ADV AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(1);
const char log_tag_const_w_LL_EXT_ADV AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(1);
const char log_tag_const_e_LL_EXT_ADV AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(1);
const char log_tag_const_v_LL_EXT_SCAN AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(0);
const char log_tag_const_i_LL_EXT_SCAN AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(0);
const char log_tag_const_d_LL_EXT_SCAN AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(1);
const char log_tag_const_w_LL_EXT_SCAN AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(1);
const char log_tag_const_e_LL_EXT_SCAN AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(1);
const char log_tag_const_v_LL_EXT_INIT AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(0);
const char log_tag_const_i_LL_EXT_INIT AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(0);
const char log_tag_const_d_LL_EXT_INIT AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(1);
const char log_tag_const_w_LL_EXT_INIT AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(1);
const char log_tag_const_e_LL_EXT_INIT AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(1);
const char log_tag_const_v_LL_TWS_ADV AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(0);
const char log_tag_const_i_LL_TWS_ADV AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(0);
const char log_tag_const_d_LL_TWS_ADV AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(1);
const char log_tag_const_w_LL_TWS_ADV AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(1);
const char log_tag_const_e_LL_TWS_ADV AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(1);
const char log_tag_const_v_LL_TWS_SCAN AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(0);
const char log_tag_const_i_LL_TWS_SCAN AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(0);
const char log_tag_const_d_LL_TWS_SCAN AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(1);
const char log_tag_const_w_LL_TWS_SCAN AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(1);
const char log_tag_const_e_LL_TWS_SCAN AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(1);
const char log_tag_const_v_LL_S AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(0);
const char log_tag_const_i_LL_S AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(1);
const char log_tag_const_d_LL_S AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(1);
const char log_tag_const_w_LL_S AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(1);
const char log_tag_const_e_LL_S AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(1);
const char log_tag_const_v_LL_RL AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(0);
const char log_tag_const_i_LL_RL AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(1);
const char log_tag_const_d_LL_RL AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(1);
const char log_tag_const_w_LL_RL AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(1);
const char log_tag_const_e_LL_RL AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(1);
const char log_tag_const_v_LL_WL AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(0);
const char log_tag_const_i_LL_WL AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(1);
const char log_tag_const_d_LL_WL AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(1);
const char log_tag_const_w_LL_WL AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(1);
const char log_tag_const_e_LL_WL AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(1);
const char log_tag_const_v_AES AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(0);
const char log_tag_const_i_AES AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(0);
const char log_tag_const_d_AES AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(1);
const char log_tag_const_w_AES AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(1);
const char log_tag_const_e_AES AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(1);
const char log_tag_const_v_LL_PADV AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(0);
const char log_tag_const_i_LL_PADV AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(0);
const char log_tag_const_d_LL_PADV AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(1);
const char log_tag_const_w_LL_PADV AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(1);
const char log_tag_const_e_LL_PADV AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(1);
const char log_tag_const_v_LL_DX AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(0);
const char log_tag_const_i_LL_DX AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(0);
const char log_tag_const_d_LL_DX AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(1);
const char log_tag_const_w_LL_DX AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(1);
const char log_tag_const_e_LL_DX AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(1);
const char log_tag_const_v_LL_PHY AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(0);
const char log_tag_const_i_LL_PHY AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(0);
const char log_tag_const_d_LL_PHY AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(1);
const char log_tag_const_w_LL_PHY AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(1);
const char log_tag_const_e_LL_PHY AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(1);
const char log_tag_const_v_LL_AFH AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(0);
const char log_tag_const_i_LL_AFH AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(1);
const char log_tag_const_d_LL_AFH AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(0);
const char log_tag_const_w_LL_AFH AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(1);
const char log_tag_const_e_LL_AFH AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(1);
//HCI part
const char log_tag_const_v_Thread AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(0);
const char log_tag_const_i_Thread AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(0);
const char log_tag_const_d_Thread AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(1);
const char log_tag_const_w_Thread AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(1);
const char log_tag_const_e_Thread AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(1);
const char log_tag_const_v_HCI_STD AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(0);
const char log_tag_const_i_HCI_STD AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(0);
const char log_tag_const_d_HCI_STD AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(0);
const char log_tag_const_w_HCI_STD AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(1);
const char log_tag_const_e_HCI_STD AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(1);
const char log_tag_const_v_HCI_LL5 AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(0);
const char log_tag_const_i_HCI_LL5 AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(0);
const char log_tag_const_d_HCI_LL5 AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(1);
const char log_tag_const_w_HCI_LL5 AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(1);
const char log_tag_const_e_HCI_LL5 AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(1);
const char log_tag_const_v_LL_ISO AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(1);
const char log_tag_const_i_LL_ISO AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(1);
const char log_tag_const_d_LL_ISO AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(1);
const char log_tag_const_w_LL_ISO AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(1);
const char log_tag_const_e_LL_ISO AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(1);
const char log_tag_const_v_LL_BIS AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(0);
const char log_tag_const_i_LL_BIS AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(0);
const char log_tag_const_d_LL_BIS AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(1);
const char log_tag_const_w_LL_BIS AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(1);
const char log_tag_const_e_LL_BIS AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(1);
const char log_tag_const_v_LL_CIS AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(0);
const char log_tag_const_i_LL_CIS AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(0);
const char log_tag_const_d_LL_CIS AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(1);
const char log_tag_const_w_LL_CIS AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(1);
const char log_tag_const_e_LL_CIS AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(1);
const char log_tag_const_v_BL AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(0);
const char log_tag_const_i_BL AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(0);
const char log_tag_const_d_BL AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(0);
const char log_tag_const_w_BL AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(1);
const char log_tag_const_e_BL AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(1);
const char log_tag_const_c_BL AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(1);
const char log_tag_const_v_TWS_LE AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(1);
const char log_tag_const_i_TWS_LE AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(0);
const char log_tag_const_d_TWS_LE AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(1);
const char log_tag_const_w_TWS_LE AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(0);
const char log_tag_const_e_TWS_LE AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(0);
const char log_tag_const_c_TWS_LE AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(1);
const char log_tag_const_v_TWS_LMP AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(1);
const char log_tag_const_i_TWS_LMP AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(1);
const char log_tag_const_d_TWS_LMP AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(1);
const char log_tag_const_w_TWS_LMP AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(0);
const char log_tag_const_e_TWS_LMP AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(0);
const char log_tag_const_v_TWS AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(0);
const char log_tag_const_i_TWS AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(1);
const char log_tag_const_d_TWS AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(1);
const char log_tag_const_w_TWS AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(1);
const char log_tag_const_e_TWS AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(1);
const char log_tag_const_v_TWS_ESCO AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(1);
const char log_tag_const_i_TWS_ESCO AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(1);
const char log_tag_const_d_TWS_ESCO AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(1);
const char log_tag_const_w_TWS_ESCO AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(0);
const char log_tag_const_e_TWS_ESCO AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(1);

View File

@ -0,0 +1,85 @@
/*********************************************************************************************
* Filename : btstack_config.c
* Description : Optimized Code & RAM (编译优化配置)
* Author : Bingquan
* Email : caibingquan@zh-jieli.com
* Last modifiled : 2019-03-16 11:49
* Copyright:(c)JIELI 2011-2019 @ , All Rights Reserved.
*********************************************************************************************/
#include "app_config.h"
#include "system/includes.h"
#include "btcontroller_config.h"
#include "bt_common.h"
/**
* @brief Bluetooth Stack Module
*/
#ifdef CONFIG_SOUNDBOX_FLASH_256K
const int CONFIG_BTSTACK_BIG_FLASH_ENABLE = 0;
#else
const int CONFIG_BTSTACK_BIG_FLASH_ENABLE = 1;
#endif
#if TCFG_BT_SUPPORT_AAC
const int CONFIG_BTSTACK_SUPPORT_AAC = 1;
#else
const int CONFIG_BTSTACK_SUPPORT_AAC = 0;
#endif
#if TCFG_BT_SUPPORT_LDAC
const int CONFIG_BTSTACK_SUPPORT_LDAC = 1;
#else
const int CONFIG_BTSTACK_SUPPORT_LDAC = 0;
#endif
//协议栈接收到命令是否自动退出sniff
const int config_btstask_auto_exit_sniff = 1;
#if SMART_BOX_EN
const int config_rcsp_stack_enable = 1;
#else
const int config_rcsp_stack_enable = 0;
#endif
#if (TCFG_USER_BLE_ENABLE)
//le 配置,可以优化代码和RAM
#if (TCFG_BLE_DEMO_SELECT == DEF_BLE_DEMO_WIRELESS_MIC_CLIENT)
const int config_le_hci_connection_num = 1;//支持同时连接个数
const int config_le_sm_support_enable = 0; //是否支持加密配对
const int config_le_gatt_client_num = 1; //支持client角色个数
const int config_le_gatt_server_num = 0; //支持server角色个数
#elif (TCFG_BLE_DEMO_SELECT == DEF_BLE_DEMO_WIRELESS_MIC_SERVER)
const int config_le_hci_connection_num = 1;//支持同时连接个数
const int config_le_sm_support_enable = 0; //是否支持加密配对
const int config_le_gatt_client_num = 0; //支持client角色个数
const int config_le_gatt_server_num = 1; //支持server角色个数
#elif (BLE_HID_EN)
const int config_le_hci_connection_num = 1;//支持同时连接个数
const int config_le_sm_support_enable = 1; //是否支持加密配对
const int config_le_gatt_server_num = 1; //支持server角色个数
const int config_le_gatt_client_num = 0; //支持client角色个数
#else
const int config_le_hci_connection_num = 1;//支持同时连接个数
const int config_le_sm_support_enable = 0; //是否支持加密配对
const int config_le_gatt_server_num = 1; //支持server角色个数
const int config_le_gatt_client_num = 0; //支持client角色个数
#endif
#else
//no ble
const int config_le_hci_connection_num = 0;//支持同时连接个数
const int config_le_sm_support_enable = 0; //是否支持加密配对
const int config_le_gatt_server_num = 0; //支持server角色个数
const int config_le_gatt_client_num = 0; //支持client角色个数
#endif

View File

@ -0,0 +1,231 @@
/*********************************************************************************************
* Filename : lib_driver_config.c
* Description : Optimized Code & RAM (编译优化配置)
* Author : Bingquan
* Email : caibingquan@zh-jieli.com
* Last modifiled : 2019-03-18 14:58
* Copyright:(c)JIELI 2011-2019 @ , All Rights Reserved.
*********************************************************************************************/
#include "app_config.h"
#include "system/includes.h"
#if TCFG_SD0_SD1_USE_THE_SAME_HW
const int sd0_sd1_use_the_same_hw = 1;
#else
const int sd0_sd1_use_the_same_hw = 0;
#endif
#ifdef CONFIG_MOVABLE_ENABLE
const int config_spi_code_user_cache = 1;
#else
const int config_spi_code_user_cache = 0;
#endif
#if TCFG_KEEP_CARD_AT_ACTIVE_STATUS
const int keep_card_at_active_status = 1;
#else
const int keep_card_at_active_status = 0;
#endif
#if TCFG_SDX_CAN_OPERATE_MMC_CARD
const int sdx_can_operate_mmc_card = TCFG_SDX_CAN_OPERATE_MMC_CARD;
#else
const int sdx_can_operate_mmc_card = 0;
#endif
#if TCFG_POWER_MODE_QUIET_ENABLE
const int config_dcdc_mode = 1;
#else
const int config_dcdc_mode = 0;
#endif
#if(TCFG_CLOCK_SYS_SRC == SYS_CLOCK_INPUT_PLL_RCL) //系统时钟源选择
const int clock_sys_src_use_lrc_hw = 1; //当使用lrc时timer.c需要特殊设置
#else
const int clock_sys_src_use_lrc_hw = 0;
#endif
#ifdef TCFG_VAD_LOWPOWER_CLOCK
const char config_vad_lowpower_clock = TCFG_VAD_LOWPOWER_CLOCK;
#else
const char config_vad_lowpower_clock = 0;
#endif
#if defined(CONFIG_CPU_BR28) || ((TCFG_OTG_MODE & OTG_DET_DM_ONLY) != 0)
const int config_otg_slave_detect_method_2 = 1;
#else
const int config_otg_slave_detect_method_2 = 0;
#endif
/**
* @brief Log (Verbose/Info/Debug/Warn/Error)
*/
/*-----------------------------------------------------------*/
const char log_tag_const_v_CLOCK AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(FALSE) ;
const char log_tag_const_i_CLOCK AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(FALSE) ;
const char log_tag_const_d_CLOCK AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(TRUE);
const char log_tag_const_w_CLOCK AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(TRUE);
const char log_tag_const_e_CLOCK AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(TRUE);
const char log_tag_const_v_LP_TIMER AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(FALSE);
const char log_tag_const_i_LP_TIMER AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(FALSE);
const char log_tag_const_d_LP_TIMER AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(FALSE);
const char log_tag_const_w_LP_TIMER AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(TRUE);
const char log_tag_const_e_LP_TIMER AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(TRUE);
const char log_tag_const_v_LRC AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(FALSE);
const char log_tag_const_i_LRC AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(FALSE);
const char log_tag_const_d_LRC AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(FALSE);
const char log_tag_const_w_LRC AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(TRUE);
const char log_tag_const_e_LRC AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(TRUE);
const char log_tag_const_v_RCH AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(FALSE);
const char log_tag_const_i_RCH AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(FALSE);
const char log_tag_const_d_RCH AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(FALSE);
const char log_tag_const_w_RCH AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(TRUE);
const char log_tag_const_e_RCH AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(TRUE);
const char log_tag_const_v_P33_MISC AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(FALSE);
const char log_tag_const_i_P33_MISC AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(FALSE);
const char log_tag_const_d_P33_MISC AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(FALSE);
const char log_tag_const_w_P33_MISC AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(TRUE);
const char log_tag_const_e_P33_MISC AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(TRUE);
const char log_tag_const_v_P33 AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(FALSE);
const char log_tag_const_i_P33 AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(1);
const char log_tag_const_d_P33 AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(FALSE);
const char log_tag_const_w_P33 AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(TRUE);
const char log_tag_const_e_P33 AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(TRUE);
const char log_tag_const_v_PMU AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(FALSE);
const char log_tag_const_i_PMU AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(FALSE);
const char log_tag_const_d_PMU AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(FALSE);
const char log_tag_const_w_PMU AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(TRUE);
const char log_tag_const_e_PMU AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(TRUE);
const char log_tag_const_v_RTC AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(FALSE);
const char log_tag_const_i_RTC AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(TRUE);
const char log_tag_const_d_RTC AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(FALSE);
const char log_tag_const_w_RTC AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(TRUE);
const char log_tag_const_e_RTC AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(TRUE);
const char log_tag_const_v_WKUP AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(FALSE);
const char log_tag_const_i_WKUP AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(FALSE);
const char log_tag_const_d_WKUP AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(FALSE);
const char log_tag_const_w_WKUP AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(TRUE);
const char log_tag_const_e_WKUP AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(TRUE);
const char log_tag_const_v_SDFILE AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(FALSE);
const char log_tag_const_i_SDFILE AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(FALSE);
const char log_tag_const_d_SDFILE AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(FALSE);
const char log_tag_const_w_SDFILE AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(TRUE);
const char log_tag_const_e_SDFILE AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(TRUE);
const char log_tag_const_v_CHARGE AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(FALSE);
const char log_tag_const_i_CHARGE AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(FALSE);
const char log_tag_const_d_CHARGE AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(FALSE);
const char log_tag_const_w_CHARGE AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(TRUE);
const char log_tag_const_e_CHARGE AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(TRUE);
const char log_tag_const_v_DEBUG AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(FALSE);
const char log_tag_const_i_DEBUG AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(FALSE);
const char log_tag_const_d_DEBUG AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(FALSE);
const char log_tag_const_w_DEBUG AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(TRUE);
const char log_tag_const_e_DEBUG AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(TRUE);
const char log_tag_const_v_PWM_LED AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(FALSE);
const char log_tag_const_i_PWM_LED AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(FALSE);
const char log_tag_const_d_PWM_LED AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(FALSE);
const char log_tag_const_w_PWM_LED AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(TRUE);
const char log_tag_const_e_PWM_LED AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(TRUE);
const char log_tag_const_v_KEY AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(FALSE);
const char log_tag_const_i_KEY AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(FALSE);
const char log_tag_const_d_KEY AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(FALSE);
const char log_tag_const_w_KEY AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(TRUE);
const char log_tag_const_e_KEY AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(TRUE);
const char log_tag_const_v_TMR AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(FALSE);
const char log_tag_const_i_TMR AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(FALSE);
const char log_tag_const_d_TMR AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(0);
const char log_tag_const_w_TMR AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(TRUE);
const char log_tag_const_e_TMR AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(TRUE);
const char log_tag_const_v_VM AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(FALSE);
const char log_tag_const_i_VM AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(TRUE);
const char log_tag_const_d_VM AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(FALSE);
const char log_tag_const_w_VM AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(TRUE);
const char log_tag_const_e_VM AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(TRUE);
const char log_tag_const_v_TRIM_VDD AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(FALSE) ;
const char log_tag_const_i_TRIM_VDD AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(1);
const char log_tag_const_d_TRIM_VDD AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(1);
const char log_tag_const_w_TRIM_VDD AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(TRUE);
const char log_tag_const_e_TRIM_VDD AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(TRUE);
//audio dac
const char log_tag_const_v_SYS_DAC AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(FALSE);
const char log_tag_const_i_SYS_DAC AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(FALSE);
const char log_tag_const_d_SYS_DAC AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(FALSE);
const char log_tag_const_w_SYS_DAC AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(FALSE);
const char log_tag_const_e_SYS_DAC AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(FALSE);
const char log_tag_const_v_APP_EDET AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(FALSE);
const char log_tag_const_i_APP_EDET AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(FALSE);
const char log_tag_const_d_APP_EDET AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(FALSE);
const char log_tag_const_w_APP_EDET AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(FALSE);
const char log_tag_const_e_APP_EDET AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(FALSE);
const char log_tag_const_v_FM AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(FALSE);
const char log_tag_const_i_FM AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(FALSE);
const char log_tag_const_d_FM AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(FALSE);
const char log_tag_const_w_FM AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(FALSE);
const char log_tag_const_e_FM AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(FALSE);
const char log_tag_const_v_CORE AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(FALSE);
const char log_tag_const_i_CORE AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(1);
const char log_tag_const_d_CORE AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(FALSE);
const char log_tag_const_w_CORE AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(FALSE);
const char log_tag_const_e_CORE AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(FALSE);
const char log_tag_const_v_CACHE AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(FALSE);
const char log_tag_const_i_CACHE AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(1);
const char log_tag_const_d_CACHE AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(FALSE);
const char log_tag_const_w_CACHE AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(FALSE);
const char log_tag_const_e_CACHE AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(FALSE);
const char log_tag_const_v_LP_KEY AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(FALSE);
const char log_tag_const_i_LP_KEY AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(TRUE);
const char log_tag_const_d_LP_KEY AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(TRUE);
const char log_tag_const_w_LP_KEY AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(TRUE);
const char log_tag_const_e_LP_KEY AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(TRUE);
const char log_tag_const_v_SD AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(FALSE);
const char log_tag_const_i_SD AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(TRUE);
const char log_tag_const_d_SD AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(FALSE);
const char log_tag_const_w_SD AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(FALSE);
const char log_tag_const_e_SD AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(TRUE);
const char log_tag_const_v_EAR_DETECT AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(FALSE);
const char log_tag_const_i_EAR_DETECT AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(TRUE);
const char log_tag_const_d_EAR_DETECT AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(FALSE);
const char log_tag_const_w_EAR_DETECT AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(FALSE);
const char log_tag_const_e_EAR_DETECT AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(FALSE);
const char log_tag_const_v_TDM AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(FALSE);
const char log_tag_const_i_TDM AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(TRUE);
const char log_tag_const_d_TDM AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(TRUE);
const char log_tag_const_w_TDM AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(TRUE);
const char log_tag_const_e_TDM AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(TRUE);
const char log_tag_const_v_USB AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(FALSE);
const char log_tag_const_i_USB AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(FALSE);
const char log_tag_const_d_USB AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(TRUE);
const char log_tag_const_w_USB AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(TRUE);
const char log_tag_const_e_USB AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(TRUE);

View File

@ -0,0 +1,544 @@
/*********************************************************************************************
* Filename : lib_driver_config.c
* Description : Optimized Code & RAM (编译优化配置)
* Author : Bingquan
* Email : caibingquan@zh-jieli.com
* Last modifiled : 2019-03-18 14:58
* Copyright:(c)JIELI 2011-2019 @ , All Rights Reserved.
*********************************************************************************************/
#include "app_config.h"
#include "system/includes.h"
#include "media/includes.h"
#include "audio_adc.h"
#include "audio_config.h"
#include "media/hw_fft.h"
#if TCFG_AUDIO_ANC_ENABLE
#include "audio_anc.h"
#endif
#if (TCFG_AUDIO_DECODER_OCCUPY_TRACE)
const u8 audio_decoder_occupy_trace_enable = 1;
const u8 audio_decoder_occupy_trace_dump = 0;
#else
const u8 audio_decoder_occupy_trace_enable = 0;
const u8 audio_decoder_occupy_trace_dump = 0;
#endif/*TCFG_AUDIO_DECODER_OCCUPY_TRACE*/
const int JL_HW_FFT_V = FFT_EXT ; //FFT硬件版本
/* #if (TCFG_APP_MUSIC_EN && !TCFG_DEC2TWS_ENABLE) */
const int WMA_TWSDEC_EN = 0; // wma tws 解码控制
// 解码一次输出点数1代表32对点n就是n*32对点
// 超过1时解码需要使用malloc如config_mp3_dec_use_malloc=1
const int MP3_OUTPUT_LEN = 1;
const int WMA_OUTPUT_LEN = 1;
#define FAST_FREQ_restrict 0x01 //限制超过16k的频率不解【一般超出人耳听力范围但是仪器会测出来】
#define FAST_FILTER_restrict 0x02 //限制滤波器长度【子带滤波器旁瓣加大,边缘不够陡】
#define FAST_CHANNEL_restrict 0x04 //混合左右声道,再解码【如果是左右声道独立性较强的歌曲,会牺牲空间感,特别耳机听会听出来的话】
const int config_mp3_dec_speed_mode = 0;//FAST_FREQ_restrict | FAST_FILTER_restrict | FAST_CHANNEL_restrict; //3个开关都置上是最快的解码模式
/* #endif // (TCFG_APP_MUSIC_EN && !TCFG_DEC2TWS_ENABLE) */
const int WAV_MAX_BITRATEV = (48 * 2 * 32); // wav最大支持比特率单位kbps
// 解码一次输出点数,建议范围32到900,例如128代表128对点
// 超过128时解码需要使用malloc如config_wav_dec_use_malloc=1
const int WAV_DECODER_PCM_POINTS = 128;
// output超过128时如果不使用malloc需要增大对应buf
// 可以看打印中解码器需要的大小一般输出每增加1长度增加4个字节
int wav_mem_ext[(1336 + 3) / 4] SEC(.wav_mem); //超过128要增加这个数组的大小
const int OPUS_SRINDEX = 0; //选择opus解码文件的帧大小0代表一帧40字节1代表一帧80字节2代表一帧160字节
const int WTGV2_STACK2BUF = 0; //等于1时解码buf会加大760栈会减小
const int const_sel_adpcm_type = 0;//1使用imaen_adpcm, 0:msen_adpcm
#ifdef CONFIG_MIDI_DEC_ADDR
const int MIDI_TONE_MODE = 0;//0是地址访问(仅支持在内置flash,读数快消耗mips低)1 是文件访问(内置、外挂flash,sd,u盘均可,读数慢消耗mips较大)
#else
const int MIDI_TONE_MODE = 1;
#endif
const int MAINTRACK_USE_CHN = 0; //MAINTRACK_USE_CHN控制主通道区分方式 0用track号区分主通道 1用chn号区分主通道
const int MAX_PLAYER_CNT = 18; //控制可配置的最大同时发声的key数的BUF[1,32]
#if CONFIG_MEDIA_LIB_USE_MALLOC
const int config_mp3_dec_use_malloc = 1;
const int config_mp3pick_dec_use_malloc = 1;
const int config_wma_dec_use_malloc = 1;
const int config_wmapick_dec_use_malloc = 1;
const int config_m4a_dec_use_malloc = 1;
const int config_m4apick_dec_use_malloc = 1;
const int config_wav_dec_use_malloc = 1;
const int config_alac_dec_use_malloc = 1;
const int config_dts_dec_use_malloc = 1;
const int config_amr_dec_use_malloc = 1;
const int config_flac_dec_use_malloc = 1;
const int config_ape_dec_use_malloc = 1;
const int config_aac_dec_use_malloc = 1;
const int config_ldac_dec_use_malloc = 1;
const int config_aptx_dec_use_malloc = 1;
const int config_midi_dec_use_malloc = 1;
const int config_lc3_dec_use_malloc = 1;
const int config_speex_dec_use_malloc = 1;
const int config_opus_dec_use_malloc = 1;
#else
const int config_mp3_dec_use_malloc = 0;
const int config_mp3pick_dec_use_malloc = 0;
const int config_wma_dec_use_malloc = 0;
const int config_wmapick_dec_use_malloc = 0;
const int config_m4a_dec_use_malloc = 0;
const int config_m4apick_dec_use_malloc = 0;
const int config_wav_dec_use_malloc = 0;
const int config_alac_dec_use_malloc = 0;
const int config_dts_dec_use_malloc = 0;
const int config_amr_dec_use_malloc = 0;
const int config_flac_dec_use_malloc = 0;
const int config_ape_dec_use_malloc = 0;
const int config_aac_dec_use_malloc = 0;
const int config_ldac_dec_use_malloc = 0;
const int config_aptx_dec_use_malloc = 0;
const int config_midi_dec_use_malloc = 0;
const int config_lc3_dec_use_malloc = 0;
const int config_speex_dec_use_malloc = 0;
const int config_opus_dec_use_malloc = 0;
#endif
const int LC3_SUPPORT_CH = 2; //lc3解码输入通道数 1单声道输入 2:双声道输入(br30可支持2)
const int LC3_DMS_VAL = 25; //单位ms, 【只支持 25,50,100】
const int LC3_DMS_FSINDEX = 4; //配置采样率【只支持0到4】影响用哪组表以及一次的处理长度(<=8k的时候配0. <=16k的时候配1.<=24k的时候配2.<=32k的时候配3.<=48k的时候配4)
const int LC3_QUALTIY_CONFIG = 4;//【范围1到4 1需要的速度最少这个默认先配4】
//wts解码支持采样率可选择可以同时打开也可以单独打开
const int silk_fsN_enable = 1; //支持8-12k采样率
const int silk_fsW_enable = 1; //支持16-24k采样率
/*省电容mic使能配置*/
#if TCFG_SUPPORT_MIC_CAPLESS
const u8 const_mic_capless_en = 1;
#else
const u8 const_mic_capless_en = 0;
#endif/*TCFG_SUPPORT_MIC_CAPLESS*/
// 快进快退到文件end返回结束消息
const int config_decoder_ff_fr_end_return_event_end = 0;
const int config_audio_eq_en = 0
#if TCFG_EQ_ENABLE
| EQ_EN //eq使能
#if TCFG_EQ_ONLINE_ENABLE
| EQ_ONLINE_EN //在线调试使能
#endif/*TCFG_AUDIO_OUT_EQ_ENABLE*/
#if TCFG_USE_EQ_FILE
| EQ_FILE_EN //使用eq_cfg_hw.bin文件效果
#if TCFG_EQ_FILE_SWITCH_EN
| EQ_FILE_SWITCH_EN //使能eq_cfg_hw.bin多文件切换对应旧版config_audio_eq_file_sw_en
#endif
#endif/*TCFG_USE_EQ_FILE*/
#if TCFG_AUDIO_OUT_EQ_ENABLE
| EQ_HIGH_BASS_EN //高低音接口使能
| EQ_HIGH_BASS_FADE_EN //高低音接口数据更新使用淡入淡出,配合config_audio_eq_fade_step步进使用
#endif/*TCFG_AUDIO_OUT_EQ_ENABLE*/
#if (RCSP_ADV_EN)&&(JL_EARPHONE_APP_EN)&&(TCFG_DRC_ENABLE == 0)
/* |EQ_FILTER_COEFF_LIMITER_ZERO_EN */
#endif
#ifndef CONFIG_SOUNDBOX_FLASH_256K
| EQ_HW_UPDATE_COEFF_ONLY_EN
| EQ_HW_LR_ALONE
#endif/* CONFIG_SOUNDBOX_FLASH_256K */
#if defined(EQ_CORE_V1) && TCFG_DRC_ENABLE
| EQ_SUPPORT_MULIT_CHANNEL_EN //eq是否支持多声道3~8 打开:支持 否则仅支持1~2声道*/
| EQ_HW_CROSSOVER_TYPE0_EN //硬件分频器用序列进序列出
//|EQ_HW_CROSSOVER_TYPE1_EN //硬件分频器使用块出方式会增加mem(该方式仅支持单声道处理)
#endif/*(EQ_CORE_V1) && TCFG_DRC_ENABLE*/
#if defined(TCFG_EQ_DIVIDE_ENABLE) && TCFG_EQ_DIVIDE_ENABLE
| EQ_LR_DIVIDE_EN
#endif/*TCFG_EQ_DIVIDE_ENABLE*/
#if defined(EQ_LITE_CODE) && EQ_LITE_CODE
| EQ_LITE_VER_EN //不支持异步,不支持默认效果切换接口,仅支持文件解析
#if TCFG_DRC_ENABLE
| EQ_SUPPORT_32BIT_SYNC_EN //32bit同步方式eq使能,eq_lite_en后该宏需使能
#endif/*TCFG_DRC_ENABLE*/
#endif/* EQ_LITE_CODE */
| EQ_FILTER_COEFF_FADE_EN//默认系数切换更新时使用淡入淡出
#if defined(EQ_CORE_V1)
| EQ_SUPPORT_OLD_VER_EN //AC700N,或上BIT(1)支持版本0.7.1.0,0.7.1.1
#endif/*EQ_CORE_V1*/
#endif/* TCFG_EQ_ENABLE */
| 0; //end
const float config_audio_eq_fade_step = 0.1f;//播歌高低音增益调节步进
const int const_eq_debug = 0;
const int AUDIO_EQ_CLEAR_MEM_BY_MUTE_TIME_MS = 0;//300 //连续多长时间静音就清除EQ MEM
const int AUDIO_EQ_CLEAR_MEM_BY_MUTE_LIMIT = 0; //静音判断阀值
const int config_audio_drc_en = 0
#if TCFG_DRC_ENABLE
| DRC_EN //drc使能
#if ((defined(TCFG_AUDIO_HEARING_AID_ENABLE) && TCFG_AUDIO_HEARING_AID_ENABLE) || TCFG_CVP_UL_DRC_ENABLE || (defined(TCFG_AUDIO_BASS_BOOST)&&TCFG_AUDIO_BASS_BOOST) || defined(TCFG_AUDIO_MDRC_ENABLE) && TCFG_AUDIO_MDRC_ENABLE)
| WDRC_TYPE_EN
#endif
/* |DRC_COMPRESSOF_DIS //关闭压缩器 */
/* |DRC_NBAND_DIS //关闭多带压缩器,关闭多带限幅器 */
#endif /*TCFG_DRC_ENABLE*/
| 0; //end
#ifdef CONFIG_ANC_30C_ENABLE
const char config_audio_30c_en = 1;
#else
const char config_audio_30c_en = 0;
#endif
#if AUDIO_SURROUND_CONFIG
const int const_surround_en = BIT(2) | 1;//或上BIT(2)使能新的环绕音效
#else
const int const_surround_en = 0;
#endif
#if AUDIO_VBASS_CONFIG
const int const_vbass_en = 1;
#else
const int const_vbass_en = 0;
#endif
const int A2DP_AUDIO_PLC_ENABLE = 0;
const int LPC_JUST_FADE = 0; //播歌PLC仅淡入淡出配置, 0 - 补包运算(Ram 3660bytes, Code 1268bytes)1 - 仅淡出淡入(Ram 688bytes, Code 500bytes)
const char config_audio_mixer_ch_highlight_enable = 0; //混音器声音突出功能使能
#ifdef SBC_CUSTOM_DECODER_BUF_SIZE
const short config_sbc_decoder_buf_size = 512;
#endif
// tws音频解码自动设置输出声道。
// 单声道AUDIO_CH_L/AUDIO_CH_R。双声道AUDIO_CH_DUAL_L/AUDIO_CH_DUAL_R
// 关闭后按照output_ch_num和output_ch_type/ch_type设置输出声道
const int audio_tws_auto_channel = 1;
const int MP3_SEARCH_MAX = 200; //本地解码设成200 网络解码可以设成3
const int MP3_TGF_TWS_EN = 1; //tws解码使能
const int MP3_TGF_POSPLAY_EN = 1; //定点播放 获取ms级别时间 接口使能
const int MP3_TGF_AB_EN = 1; //AB点复读使能
const int MP3_TGF_FASTMO = 0; //快速解码使能【默认关闭之前给一个sdk单独加的配置是否解高频解双声道等】
#if (TCFG_MIC_EFFECT_ENABLE || TCFG_AUDIO_DAC_MIX_ENABLE)
const int config_audio_dac_mix_enable = 1;
#else
const int config_audio_dac_mix_enable = 0;
#endif
#if TCFG_AUDIO_DAC_MIX_ENABLE
const int config_audio_dac_noisefloor_optimize_enable = 0;
#else
const int config_audio_dac_noisefloor_optimize_enable = BIT(1);
#endif
// mixer在单独任务中输出
#if TCFG_MIXER_CYCLIC_TASK_EN
const int config_mixer_task = 1;
#else
const int config_mixer_task = 0;
#endif
// mixer各个通道拥有独立buf
const int config_mixer_ch_self_buf_en = 0;
#ifdef CONFIG_256K_FLASH
// mixer模块使能。不使能将关闭大部分功能mix为直通
const int config_mixer_en = 0;
// mixer变采样使能
const int config_mixer_src_en = 0;
// audio解码资源叠加功能使能。不使能如果配置了叠加方式将改成抢占方式
const int config_audio_dec_wait_protect_en = 0;
// audio数据流分支功能使能。
const int config_audio_stream_frame_copy_en = 0;
// audio dec app调用mixer相关函数控制。关闭后需上层设置数据流的输出节点
const int audio_dec_app_mix_en = 0;
#else
// mixer模块使能。不使能将关闭大部分功能mix为直通
const int config_mixer_en = 1;
// mixer变采样使能
const int config_mixer_src_en = 1;
// audio解码资源叠加功能使能。不使能如果配置了叠加方式将改成抢占方式
const int config_audio_dec_wait_protect_en = 1;
// audio数据流分支功能使能。
const int config_audio_stream_frame_copy_en = 1;
// audio dec app调用mixer相关函数控制。关闭后需上层设置数据流的输出节点
const int audio_dec_app_mix_en = 1;
#endif
// audio数据流分支cbuf大小控制
const int config_audio_stream_frame_copy_cbuf_min = 128;
const int config_audio_stream_frame_copy_cbuf_max = 1024;
// 超时等待其他解码unactive步骤完成
const int config_audio_dec_unactive_to = 0;
// audio数据流ioctrl使能
const int config_audio_stream_frame_ioctrl_en = 0;
// audio dec app tws同步使能
const int audio_dec_app_sync_en = 0;
// 解码使用单独任务做输出
#if TCFG_AUDIO_DEC_OUT_TASK
const int config_audio_dec_out_task_en = 1;
#else
const int config_audio_dec_out_task_en = 0;
#endif
#ifdef CONFIG_256K_FLASH
const char config_audio_mini_enable = 1;
#else
const char config_audio_mini_enable = 0;
#endif
enum {
PLATFORM_FREQSHIFT_CORDIC = 0,
PLATFORM_FREQSHIFT_CORDICV2 = 1
};
/* 备注: */
/* br23/br25/br30/br34/br40是PLATFORM_FREQSHIFT_CORDIC */
/* br36/br28/br27是PLATFORM_FREQSHIFT_CORDICV2 */
#if (CONFIG_CPU_BR28 || CONFIG_CPU_BR27 || CONFIG_CPU_BR36)
#define PLATFORM_PARM_SEL PLATFORM_FREQSHIFT_CORDICV2
#else
#define PLATFORM_PARM_SEL PLATFORM_FREQSHIFT_CORDIC
#endif
const int howling_freshift_PLATFORM = PLATFORM_PARM_SEL;
const int howling_freshift_highmode_flag = 0; //移频快速模式
const int howling_pitchshift_fastmode_flag = 1;//移频啸叫抑制快速模式使能
const int vc_pitchshift_fastmode_flag = 1; //变声快速模式使能
const int vc_pitchshift_downmode_flag = 0; //变声下采样处理使能
const int VC_KINDO_TVM = 1; //含义为EFFECT_VOICECHANGE_KIN0是否另一种算法 : 0表示跟原来一样1表示用另一种
const int RS_FAST_MODE_QUALITY = 2; //软件变采样 滤波阶数配置范围2到8 8代表16阶的变采样模式 ,速度跟它的大小呈正相关
const int config_howling_enable_pemafrow_mode = 0;
const int config_howling_enable_trap_mode = 1;//陷波啸叫抑制模式使能
const int config_howling_enable_pitchps_mode = 1; //移频啸叫抑制模式使能
const unsigned char config_audio_dac_underrun_protect = 1;
#if ((SYS_VOL_TYPE == VOL_TYPE_DIGITAL_HW) || (SYS_VOL_TYPE == VOL_TYPE_DIGITAL))
const char config_audio_dac_trim_enable = 1;
#else
const char config_audio_dac_trim_enable = 1;
#endif
#if TCFG_LOWPOWER_LOWPOWER_SEL
const int config_audio_dac_delay_off_ms = 300;
#else
const int config_audio_dac_delay_off_ms = 0;
#endif
const int config_audio_dac_vcm_chsel_delay = 1500;
// 解码任务测试
const int audio_decoder_test_en = 0;
// 当audio_decoder_test_en使能时需要实现以下接口
#if 0
void audio_decoder_test_out_before(struct audio_decoder *dec, void *buff, int len) {} ;
void audio_decoder_test_out_after(struct audio_decoder *dec, int wlen) {} ;
void audio_decoder_test_read_before(struct audio_decoder *dec, int len, u32 offset) {} ;
void audio_decoder_test_read_after(struct audio_decoder *dec, u8 *data, int rlen) {} ;
void audio_decoder_test_get_frame_before(struct audio_decoder *dec) {} ;
void audio_decoder_test_get_frame_after(struct audio_decoder *dec, u8 *frame, int rlen) {} ;
void audio_decoder_test_fetch_before(struct audio_decoder *dec) {} ;
void audio_decoder_test_fetch_after(struct audio_decoder *dec, u8 *frame, int rlen) {} ;
void audio_decoder_test_run_before(struct audio_decoder *dec) {} ;
void audio_decoder_test_run_after(struct audio_decoder *dec, int err) {} ;
#else
// 接口实现示例
#include "audio/demo/audio_decoder_test.c"
#endif
// 编码任务测试
const int audio_encoder_test_en = 0;
// 当audio_encoder_test_en使能时需要实现以下接口
#if 0
void audio_encoder_test_out_before(struct audio_encoder *enc, void *buff, int len) {} ;
void audio_encoder_test_out_after(struct audio_encoder *enc, int wlen) {} ;
void audio_encoder_test_get_frame_before(struct audio_encoder *enc, u16 frame_len) {} ;
void audio_encoder_test_get_frame_after(struct audio_encoder *enc, s16 *frame, int rlen) {} ;
void audio_encoder_test_run_before(struct audio_encoder *enc) {} ;
void audio_encoder_test_run_after(struct audio_encoder *enc, int err) {} ;
#else
// 接口实现示例
#include "audio/demo/audio_encoder_test.c"
#endif
//数字音量节点 是否使用汇编优化 不支持的芯片需置0
#if(CONFIG_CPU_BR18)
const int const_config_digvol_use_round = 0;
#else
const int const_config_digvol_use_round = 1;
#endif
/*杰理KWS关键词识别*/
#if TCFG_SMART_VOICE_ENABLE
const int CONFIG_KWS_WAKE_WORD_MODEL_ENABLE = 0;
const int CONFIG_KWS_MULTI_CMD_MODEL_ENABLE = 1;
#if TCFG_CALL_KWS_SWITCH_ENABLE
const int CONFIG_KWS_CALL_CMD_MODEL_ENABLE = 1;
#else
const int CONFIG_KWS_CALL_CMD_MODEL_ENABLE = 0;
#endif
#ifdef CONFIG_CPU_BR28
const int CONFIG_KWS_RAM_USE_ENABLE = 1;
#else
const int CONFIG_KWS_RAM_USE_ENABLE = 2;
#endif
const int CONFIG_KWS_ONLINE_MODEL = 1;
const float CONFIG_KWS_MULTI_CONFIDENCE[] = {
0.4, 0.4, 0.4, 0.4, //小杰小杰,小杰同学,播放音乐,停止播放
0.4, 0.4, 0.4, 0.3, //暂停播放,增大音量,减小音量,上一首
0.3, 0.35, 0.35, 0.35, //下一首,打开降噪,关闭降噪,打开通透
};
const float CONFIG_KWS_CALL_CONFIDENCE[] = {
0.4, 0.4, //接听电话,挂断电话
};
#else
const int CONFIG_KWS_WAKE_WORD_MODEL_ENABLE = 0;
const int CONFIG_KWS_MULTI_CMD_MODEL_ENABLE = 0;
const int CONFIG_KWS_CALL_CMD_MODEL_ENABLE = 0;
const int CONFIG_KWS_ONLINE_MODEL = 0;
#endif
#if (defined TCFG_AUDIO_ANC_ACOUSTIC_DETECTOR_EN) && TCFG_AUDIO_ANC_ACOUSTIC_DETECTOR_EN
const int config_resample_pcm_frame_buffer = 512;
#else
const int config_resample_pcm_frame_buffer = 128;
#endif
/*第二版串口写卡工具,支持写不定长度数据*/
u8 const_audio_pcm_debug_v2_en = 0;
/**
* @brief Log (Verbose/Info/Debug/Warn/Error)
*/
/*-----------------------------------------------------------*/
const char log_tag_const_v_EQ_CFG AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(FALSE);
const char log_tag_const_i_EQ_CFG AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(FALSE);
const char log_tag_const_d_EQ_CFG AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(FALSE);
const char log_tag_const_w_EQ_CFG AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(TRUE);
const char log_tag_const_e_EQ_CFG AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(TRUE);
const char log_tag_const_v_EQ_CFG_TOOL AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(FALSE);
const char log_tag_const_i_EQ_CFG_TOOL AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(FALSE);
const char log_tag_const_d_EQ_CFG_TOOL AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(FALSE);
const char log_tag_const_w_EQ_CFG_TOOL AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(TRUE);
const char log_tag_const_e_EQ_CFG_TOOL AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(TRUE);
const char log_tag_const_v_EQ_APPLY AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(0);
const char log_tag_const_i_EQ_APPLY AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(0);
const char log_tag_const_d_EQ_APPLY AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(0);
const char log_tag_const_w_EQ_APPLY AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(TRUE);
const char log_tag_const_e_EQ_APPLY AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(TRUE);
const char log_tag_const_v_DRC AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(0);
const char log_tag_const_i_DRC AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(0);
const char log_tag_const_d_DRC AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(0);
const char log_tag_const_w_DRC AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(TRUE);
const char log_tag_const_e_DRC AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(TRUE);
const char log_tag_const_v_APP_DRC AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(0);
const char log_tag_const_i_APP_DRC AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(0);
const char log_tag_const_d_APP_DRC AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(0);
const char log_tag_const_w_APP_DRC AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(TRUE);
const char log_tag_const_e_APP_DRC AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(TRUE);
const char log_tag_const_v_EQ AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(0);
const char log_tag_const_i_EQ AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(0);
const char log_tag_const_d_EQ AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(0);
const char log_tag_const_w_EQ AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(TRUE);
const char log_tag_const_e_EQ AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(TRUE);
const char log_tag_const_v_AUD_ADC AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(0);
const char log_tag_const_i_AUD_ADC AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(0);
const char log_tag_const_d_AUD_ADC AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(0);
const char log_tag_const_w_AUD_ADC AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(0);
const char log_tag_const_e_AUD_ADC AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(0);
const char log_tag_const_v_AUD_DAC AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(0);
const char log_tag_const_i_AUD_DAC AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(0);
const char log_tag_const_d_AUD_DAC AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(0);
const char log_tag_const_w_AUD_DAC AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(0);
const char log_tag_const_e_AUD_DAC AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(0);
const char log_tag_const_v_APP_DAC AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(0);
const char log_tag_const_i_APP_DAC AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(0);
const char log_tag_const_d_APP_DAC AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(0);
const char log_tag_const_w_APP_DAC AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(0);
const char log_tag_const_e_APP_DAC AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(0);
const char log_tag_const_v_AUD_AUX AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(0);
const char log_tag_const_i_AUD_AUX AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(0);
const char log_tag_const_d_AUD_AUX AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(0);
const char log_tag_const_w_AUD_AUX AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(0);
const char log_tag_const_e_AUD_AUX AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(0);
const char log_tag_const_v_MIXER AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(0);
const char log_tag_const_c_MIXER AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(0);
const char log_tag_const_i_MIXER AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(0);
const char log_tag_const_d_MIXER AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(TRUE);
const char log_tag_const_e_MIXER AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(TRUE);
const char log_tag_const_v_AUDIO_STREAM AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(0);
const char log_tag_const_c_AUDIO_STREAM AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(0);
const char log_tag_const_i_AUDIO_STREAM AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(0);
const char log_tag_const_d_AUDIO_STREAM AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(TRUE);
const char log_tag_const_e_AUDIO_STREAM AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(TRUE);
const char log_tag_const_v_AUDIO_DECODER AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(0);
const char log_tag_const_c_AUDIO_DECODER AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(0);
const char log_tag_const_i_AUDIO_DECODER AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(0);
const char log_tag_const_d_AUDIO_DECODER AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(TRUE);
const char log_tag_const_e_AUDIO_DECODER AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(TRUE);
const char log_tag_const_v_AUDIO_ENCODER AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(0);
const char log_tag_const_c_AUDIO_ENCODER AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(0);
const char log_tag_const_i_AUDIO_ENCODER AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(0);
const char log_tag_const_d_AUDIO_ENCODER AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(TRUE);
const char log_tag_const_e_AUDIO_ENCODER AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(TRUE);
const char log_tag_const_v_SYNCTS AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(0);
const char log_tag_const_c_SYNCTS AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(0);
const char log_tag_const_i_SYNCTS AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(0);
const char log_tag_const_d_SYNCTS AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(0);
const char log_tag_const_e_SYNCTS AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(TRUE);

View File

@ -0,0 +1,109 @@
/*********************************************************************************************
* Filename : lib_system_config.c
* Description : Optimized Code & RAM (编译优化配置)
* Author : Bingquan
* Email : caibingquan@zh-jieli.com
* Last modifiled : 2019-03-18 15:22
* Copyright:(c)JIELI 2011-2019 @ , All Rights Reserved.
*********************************************************************************************/
#include "app_config.h"
#include "system/includes.h"
///打印是否时间打印信息
const int config_printf_time = 1;
///异常中断asser打印开启
#ifdef CONFIG_RELEASE_ENABLE
const int config_asser = 1;//= 0;
#else
const int config_asser = 1;
#endif
const int config_system_info = 0;
//================================================//
// SDFILE 精简使能 //
//================================================//
const int SDFILE_VFS_REDUCE_ENABLE = 1;
//================================================//
// dev使用异步读使能 //
//================================================//
#ifdef TCFG_DEVICE_BULK_READ_ASYNC_ENABLE
const int device_bulk_read_async_enable = 1;
#else
const int device_bulk_read_async_enable = 0;
#endif
const int VIRFAT_FLASH_ENABLE = 0;
//================================================//
// UI //
//================================================//
const int ENABLE_LUA_VIRTUAL_MACHINE = 0;
//================================================//
// 不可屏蔽中断使能配置(unmask_irq) //
//================================================//
const int CONFIG_CPU_UNMASK_IRQ_ENABLE = 0;
/**
* @brief Log (Verbose/Info/Debug/Warn/Error)
*/
/*-----------------------------------------------------------*/
const char log_tag_const_v_SYS_TMR AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(FALSE);
const char log_tag_const_i_SYS_TMR AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(FALSE);
const char log_tag_const_d_SYS_TMR AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(FALSE);
const char log_tag_const_w_SYS_TMR AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(TRUE);
const char log_tag_const_e_SYS_TMR AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(TRUE);
const char log_tag_const_v_JLFS AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(FALSE);
const char log_tag_const_i_JLFS AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(FALSE);
const char log_tag_const_d_JLFS AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(FALSE);
const char log_tag_const_w_JLFS AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(TRUE);
const char log_tag_const_e_JLFS AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(TRUE);
//FreeRTOS
const char log_tag_const_v_PORT AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(FALSE);
const char log_tag_const_i_PORT AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(FALSE);
const char log_tag_const_d_PORT AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(FALSE);
const char log_tag_const_w_PORT AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(TRUE);
const char log_tag_const_e_PORT AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(TRUE);
const char log_tag_const_v_KTASK AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(FALSE);
const char log_tag_const_i_KTASK AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(FALSE);
const char log_tag_const_d_KTASK AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(FALSE);
const char log_tag_const_w_KTASK AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(TRUE);
const char log_tag_const_e_KTASK AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(TRUE);
const char log_tag_const_v_uECC AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(FALSE);
const char log_tag_const_i_uECC AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(FALSE);
const char log_tag_const_d_uECC AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(FALSE);
const char log_tag_const_w_uECC AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(TRUE);
const char log_tag_const_e_uECC AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(TRUE);
const char log_tag_const_v_HEAP_MEM AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(FALSE);
const char log_tag_const_i_HEAP_MEM AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(FALSE);
const char log_tag_const_d_HEAP_MEM AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(TRUE);
const char log_tag_const_w_HEAP_MEM AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(TRUE);
const char log_tag_const_e_HEAP_MEM AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(TRUE);
const char log_tag_const_v_V_MEM AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(FALSE);
const char log_tag_const_i_V_MEM AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(FALSE);
const char log_tag_const_d_V_MEM AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(FALSE);
const char log_tag_const_w_V_MEM AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(TRUE);
const char log_tag_const_e_V_MEM AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(TRUE);
const char log_tag_const_v_P_MEM AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(FALSE);
const char log_tag_const_i_P_MEM AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(FALSE);
const char log_tag_const_d_P_MEM AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(FALSE);
const char log_tag_const_w_P_MEM AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(TRUE);
const char log_tag_const_e_P_MEM AT(.LOG_TAG_CONST) = CONFIG_DEBUG_LIB(TRUE);

View File

@ -0,0 +1,48 @@
#include "app_config.h"
#include "system/includes.h"
#include "update_loader_download.h"
#ifdef CONFIG_256K_FLASH
const int config_update_mode = UPDATE_UART_EN;
#else
const int config_update_mode = UPDATE_BT_LMP_EN \
| UPDATE_STORAGE_DEV_EN | UPDATE_BLE_TEST_EN | UPDATE_APP_EN | UPDATE_UART_EN;
#endif
#ifndef CONFIG_APP_BT_ENABLE
//是否采用双备份升级方案:0-单备份;1-双备份
#if CONFIG_DOUBLE_BANK_ENABLE
const int support_dual_bank_update_en = 1;
#else
const int support_dual_bank_update_en = 0;
#endif //CONFIG_DOUBLE_BANK_ENABLE
#else
//是否采用双备份升级方案:0-单备份;1-双备份
#if CONFIG_DOUBLE_BANK_ENABLE
const int support_dual_bank_update_en = 1;
#else
const int support_dual_bank_update_en = 0;
#endif //CONFIG_DOUBLE_BANK_ENABLE
#endif
#if OTA_TWS_SAME_TIME_NEW //使用新的同步升级流程
const int support_ota_tws_same_time_new = 1;
#else
const int support_ota_tws_same_time_new = 0;
#endif
//是否支持升级之后保留vm数据
const int support_vm_data_keep = 0;
//是否支持外挂flash升级,需要打开Board.h中的TCFG_NOR_FS_ENABLE
const int support_norflash_update_en = 0;
//支持从外挂flash读取ufw文件升级使能
const int support_norflash_ufw_update_en = 0;
const char log_tag_const_v_UPDATE AT(.LOG_TAG_CONST) = LIB_DEBUG & FALSE;
const char log_tag_const_i_UPDATE AT(.LOG_TAG_CONST) = LIB_DEBUG & TRUE;
const char log_tag_const_d_UPDATE AT(.LOG_TAG_CONST) = LIB_DEBUG & FALSE;
const char log_tag_const_w_UPDATE AT(.LOG_TAG_CONST) = LIB_DEBUG & TRUE;
const char log_tag_const_e_UPDATE AT(.LOG_TAG_CONST) = LIB_DEBUG & TRUE;