1 // Copyright 2019 Espressif Systems (Shanghai) PTE LTD 2 // 3 // Licensed under the Apache License, Version 2.0 (the "License"); 4 // you may not use this file except in compliance with the License. 5 // You may obtain a copy of the License at 6 7 // http://www.apache.org/licenses/LICENSE-2.0 8 // 9 // Unless required by applicable law or agreed to in writing, software 10 // distributed under the License is distributed on an "AS IS" BASIS, 11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 // See the License for the specific language governing permissions and 13 // limitations under the License. 14 15 #ifndef __BT_USER_CONFIG_H__ 16 #define __BT_USER_CONFIG_H__ 17 #include "sdkconfig.h" 18 19 #define UC_TRACE_LEVEL_NONE 0 /* No trace messages to be generated */ 20 #define UC_TRACE_LEVEL_ERROR 1 /* Error condition trace messages */ 21 #define UC_TRACE_LEVEL_WARNING 2 /* Warning condition trace messages */ 22 #define UC_TRACE_LEVEL_API 3 /* API traces */ 23 #define UC_TRACE_LEVEL_EVENT 4 /* Debug messages for events */ 24 #define UC_TRACE_LEVEL_DEBUG 5 /* Full debug messages */ 25 #define UC_TRACE_LEVEL_VERBOSE 6 /* Verbose debug messages */ 26 27 //DYNAMIC ENV ALLOCATOR 28 #ifdef CONFIG_BT_BLE_DYNAMIC_ENV_MEMORY 29 #define UC_BT_BLE_DYNAMIC_ENV_MEMORY CONFIG_BT_BLE_DYNAMIC_ENV_MEMORY 30 #else 31 #define UC_BT_BLE_DYNAMIC_ENV_MEMORY FALSE 32 #endif 33 34 #ifdef CONFIG_BT_STACK_NO_LOG 35 #define UC_BT_STACK_NO_LOG CONFIG_BT_STACK_NO_LOG 36 #else 37 #define UC_BT_STACK_NO_LOG FALSE 38 #endif 39 40 /********************************************************** 41 * Thread/Task reference 42 **********************************************************/ 43 #ifdef CONFIG_BT_BLUEDROID_PINNED_TO_CORE 44 #define UC_TASK_PINNED_TO_CORE (CONFIG_BT_BLUEDROID_PINNED_TO_CORE < portNUM_PROCESSORS ? CONFIG_BT_BLUEDROID_PINNED_TO_CORE : tskNO_AFFINITY) 45 #else 46 #define UC_TASK_PINNED_TO_CORE (0) 47 #endif 48 49 #ifdef CONFIG_BT_BTC_TASK_STACK_SIZE 50 #define UC_BTC_TASK_STACK_SIZE CONFIG_BT_BTC_TASK_STACK_SIZE 51 #else 52 #define UC_BTC_TASK_STACK_SIZE 4096 53 #endif 54 55 /********************************************************** 56 * Trace reference 57 **********************************************************/ 58 59 #ifdef CONFIG_LOG_DEFAULT_LEVEL 60 #define UC_LOG_DEFAULT_LEVEL CONFIG_LOG_DEFAULT_LEVEL 61 #else 62 #define UC_LOG_DEFAULT_LEVEL 3 63 #endif 64 65 #ifdef CONFIG_BOOTLOADER_LOG_LEVEL 66 #define UC_BOOTLOADER_LOG_LEVEL CONFIG_BOOTLOADER_LOG_LEVEL 67 #else 68 #define UC_BOOTLOADER_LOG_LEVEL 3 69 #endif 70 71 #ifdef CONFIG_BT_LOG_BTC_TRACE_LEVEL 72 #define UC_BT_LOG_BTC_TRACE_LEVEL CONFIG_BT_LOG_BTC_TRACE_LEVEL 73 #else 74 #define UC_BT_LOG_BTC_TRACE_LEVEL UC_TRACE_LEVEL_WARNING 75 #endif 76 77 #ifdef CONFIG_BT_LOG_OSI_TRACE_LEVEL 78 #define UC_BT_LOG_OSI_TRACE_LEVEL CONFIG_BT_LOG_OSI_TRACE_LEVEL 79 #else 80 #define UC_BT_LOG_OSI_TRACE_LEVEL UC_TRACE_LEVEL_WARNING 81 #endif 82 83 #ifdef CONFIG_BT_LOG_BLUFI_TRACE_LEVEL 84 #define UC_BT_LOG_BLUFI_TRACE_LEVEL CONFIG_BT_LOG_BLUFI_TRACE_LEVEL 85 #else 86 #define UC_BT_LOG_BLUFI_TRACE_LEVEL UC_TRACE_LEVEL_WARNING 87 #endif 88 89 //BLUFI 90 #if defined(CONFIG_BT_BLE_BLUFI_ENABLE) || defined(CONFIG_BT_NIMBLE_BLUFI_ENABLE) 91 #define UC_BT_BLUFI_ENABLE TRUE 92 #else 93 #define UC_BT_BLUFI_ENABLE FALSE 94 #endif 95 96 #endif /* __BT_USER_CONFIG_H__ */ 97