bt_user_config.h 3.5 KB

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