bt_user_config.h 3.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. /*
  2. * SPDX-FileCopyrightText: 2015-2021 Espressif Systems (Shanghai) CO LTD
  3. *
  4. * SPDX-License-Identifier: Apache-2.0
  5. */
  6. #ifndef __BT_USER_CONFIG_H__
  7. #define __BT_USER_CONFIG_H__
  8. #include "sdkconfig.h"
  9. #define UC_TRACE_LEVEL_NONE 0 /* No trace messages to be generated */
  10. #define UC_TRACE_LEVEL_ERROR 1 /* Error condition trace messages */
  11. #define UC_TRACE_LEVEL_WARNING 2 /* Warning condition trace messages */
  12. #define UC_TRACE_LEVEL_API 3 /* API traces */
  13. #define UC_TRACE_LEVEL_EVENT 4 /* Debug messages for events */
  14. #define UC_TRACE_LEVEL_DEBUG 5 /* Full debug messages */
  15. #define UC_TRACE_LEVEL_VERBOSE 6 /* Verbose debug messages */
  16. //DYNAMIC ENV ALLOCATOR
  17. #ifdef CONFIG_BT_BLE_DYNAMIC_ENV_MEMORY
  18. #define UC_BT_BLE_DYNAMIC_ENV_MEMORY CONFIG_BT_BLE_DYNAMIC_ENV_MEMORY
  19. #else
  20. #define UC_BT_BLE_DYNAMIC_ENV_MEMORY FALSE
  21. #endif
  22. #ifdef CONFIG_BT_STACK_NO_LOG
  23. #define UC_BT_STACK_NO_LOG CONFIG_BT_STACK_NO_LOG
  24. #else
  25. #define UC_BT_STACK_NO_LOG FALSE
  26. #endif
  27. /**********************************************************
  28. * Thread/Task reference
  29. **********************************************************/
  30. #ifdef CONFIG_BT_BLUEDROID_PINNED_TO_CORE
  31. #define UC_TASK_PINNED_TO_CORE (CONFIG_BT_BLUEDROID_PINNED_TO_CORE < portNUM_PROCESSORS ? CONFIG_BT_BLUEDROID_PINNED_TO_CORE : tskNO_AFFINITY)
  32. #else
  33. #define UC_TASK_PINNED_TO_CORE (0)
  34. #endif
  35. #ifdef CONFIG_BT_BTC_TASK_STACK_SIZE
  36. #define UC_BTC_TASK_STACK_SIZE CONFIG_BT_BTC_TASK_STACK_SIZE
  37. #else
  38. #define UC_BTC_TASK_STACK_SIZE 4096
  39. #endif
  40. /**********************************************************
  41. * Trace reference
  42. **********************************************************/
  43. #ifdef CONFIG_LOG_DEFAULT_LEVEL
  44. #define UC_LOG_DEFAULT_LEVEL CONFIG_LOG_DEFAULT_LEVEL
  45. #else
  46. #define UC_LOG_DEFAULT_LEVEL 3
  47. #endif
  48. #ifdef CONFIG_BOOTLOADER_LOG_LEVEL
  49. #define UC_BOOTLOADER_LOG_LEVEL CONFIG_BOOTLOADER_LOG_LEVEL
  50. #else
  51. #define UC_BOOTLOADER_LOG_LEVEL 3
  52. #endif
  53. #ifdef CONFIG_BT_LOG_BTC_TRACE_LEVEL
  54. #define UC_BT_LOG_BTC_TRACE_LEVEL CONFIG_BT_LOG_BTC_TRACE_LEVEL
  55. #else
  56. #define UC_BT_LOG_BTC_TRACE_LEVEL UC_TRACE_LEVEL_WARNING
  57. #endif
  58. #ifdef CONFIG_BT_LOG_OSI_TRACE_LEVEL
  59. #define UC_BT_LOG_OSI_TRACE_LEVEL CONFIG_BT_LOG_OSI_TRACE_LEVEL
  60. #else
  61. #define UC_BT_LOG_OSI_TRACE_LEVEL UC_TRACE_LEVEL_WARNING
  62. #endif
  63. #ifdef CONFIG_BT_LOG_BLUFI_TRACE_LEVEL
  64. #define UC_BT_LOG_BLUFI_TRACE_LEVEL CONFIG_BT_LOG_BLUFI_TRACE_LEVEL
  65. #else
  66. #define UC_BT_LOG_BLUFI_TRACE_LEVEL UC_TRACE_LEVEL_WARNING
  67. #endif
  68. //BLUFI
  69. #if defined(CONFIG_BT_BLE_BLUFI_ENABLE) || defined(CONFIG_BT_NIMBLE_BLUFI_ENABLE)
  70. #define UC_BT_BLUFI_ENABLE TRUE
  71. #else
  72. #define UC_BT_BLUFI_ENABLE FALSE
  73. #endif
  74. //MEMORY DEBUG
  75. #ifdef CONFIG_BT_BLUEDROID_MEM_DEBUG
  76. #define UC_BT_BLUEDROID_MEM_DEBUG TRUE
  77. #else
  78. #define UC_BT_BLUEDROID_MEM_DEBUG FALSE
  79. #endif
  80. #endif /* __BT_USER_CONFIG_H__ */