mirror of
https://github.com/espressif/openthread.git
synced 2026-08-22 10:29:52 +00:00
[posix] move core config options from cmake file to the header file (#4713)
This commit moves the OpenThread core config definitions (like `OPENTHREAD_CONFIG_LOG_OUTPUT`) from the `CMakeLists.txt` file into the `openthread-core-posix-config.h`. This help allow a project/user specific config header file to override the default config definition (e.g., toranj config for posix).
This commit is contained in:
@@ -44,9 +44,6 @@ if(NOT OT_CONFIG)
|
||||
endif()
|
||||
|
||||
list(APPEND OT_PLATFORM_DEFINES
|
||||
"OPENTHREAD_CONFIG_LOG_LEVEL_DYNAMIC_ENABLE=1"
|
||||
"OPENTHREAD_CONFIG_LOG_OUTPUT=OPENTHREAD_CONFIG_LOG_OUTPUT_PLATFORM_DEFINED"
|
||||
"OPENTHREAD_CONFIG_NCP_UART_ENABLE=1"
|
||||
"OPENTHREAD_POSIX=1"
|
||||
"OPENTHREAD_POSIX_CONFIG_RCP_UART_ENABLE=1"
|
||||
)
|
||||
|
||||
@@ -44,6 +44,30 @@
|
||||
#define OPENTHREAD_CONFIG_LOG_PLATFORM 1
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @def OPENTHREAD_CONFIG_LOG_OUTPUT
|
||||
*
|
||||
* Select the log output.
|
||||
*
|
||||
*/
|
||||
#ifndef OPENTHREAD_CONFIG_LOG_OUTPUT
|
||||
#define OPENTHREAD_CONFIG_LOG_OUTPUT OPENTHREAD_CONFIG_LOG_OUTPUT_PLATFORM_DEFINED
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @def OPENTHREAD_CONFIG_LOG_LEVEL_DYNAMIC_ENABLE
|
||||
*
|
||||
* Define as 1 to enable dynamic log level control.
|
||||
*
|
||||
* Note that the OPENTHREAD_CONFIG_LOG_LEVEL determines the log level at
|
||||
* compile time. The dynamic log level control (if enabled) only allows
|
||||
* decreasing the log level from the compile time value.
|
||||
*
|
||||
*/
|
||||
#ifndef OPENTHREAD_CONFIG_LOG_LEVEL_DYNAMIC_ENABLE
|
||||
#define OPENTHREAD_CONFIG_LOG_LEVEL_DYNAMIC_ENABLE 1
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @def OPENTHREAD_CONFIG_PLATFORM_INFO
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user