aboutsummaryrefslogtreecommitdiff
path: root/lib/chibios-contrib/ext/mcux-sdk/components/log/fsl_component_log_config.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/chibios-contrib/ext/mcux-sdk/components/log/fsl_component_log_config.h')
-rw-r--r--lib/chibios-contrib/ext/mcux-sdk/components/log/fsl_component_log_config.h111
1 files changed, 111 insertions, 0 deletions
diff --git a/lib/chibios-contrib/ext/mcux-sdk/components/log/fsl_component_log_config.h b/lib/chibios-contrib/ext/mcux-sdk/components/log/fsl_component_log_config.h
new file mode 100644
index 000000000..536b4eb30
--- /dev/null
+++ b/lib/chibios-contrib/ext/mcux-sdk/components/log/fsl_component_log_config.h
@@ -0,0 +1,111 @@
1/*
2 * Copyright 2020 NXP
3 * All rights reserved.
4 *
5 *
6 * SPDX-License-Identifier: BSD-3-Clause
7 *
8 */
9
10#ifndef __FSL_COMPONENT_LOG_CONFIG_H__
11#define __FSL_COMPONENT_LOG_CONFIG_H__
12
13/*!
14 * @addtogroup fsl_component_log_config
15 * @ingroup fsl_component_log
16 * @{
17 */
18
19/*!
20 * @brief Whether to enable the log feature in the specific module, 1 - enable, 0 - disable.
21 * @details The feature is used to configure the log feature for the specific module.
22 * There are three steps should be followed to use the log component in specfic module,
23 *
24 * step 1, define the macro LOG_ENABLE, likes as,
25 * @code
26 * #define LOG_ENABLE 1
27 * @endcode
28 * @note LOG_ENABLE could be re-defined as a MODULE enabled flag such as,
29 * @code
30 * #define LOG_ENABLE module_LOG_ENABLED_FLAG
31 * @endcode
32 *
33 * step 2, include the log component header file, likes as,
34 * @code
35 * #include "fsl_component_log.h"
36 * @endcode
37 * step 3, define the log module by using macro LOG_MODULE_DEFINE, likes as,
38 * @code
39 * LOG_MODULE_DEFINE(<module name>, <module log level>);
40 * @endcode
41 *
42 * @note The code block should be placed at the end of the header file including of the source code.
43 *
44 * For example,
45 * In source file 1,
46 * @code
47 * #define LOG_ENABLE MODULE1_CONFIG_LOG_ENABLE
48 * #include "fsl_component_log.h"
49 * LOG_MODULE_DEFINE(module1, kLOG_LevelTrace);
50 * @endcode
51 * In source file 2,
52 * @code
53 * #define LOG_ENABLE MODULE2_CONFIG_LOG_ENABLE
54 * #include "fsl_component_log.h"
55 * LOG_MODULE_DEFINE(module2, kLOG_LevelDebug);
56 * @endcode
57 */
58#ifndef LOG_ENABLE
59#define LOG_ENABLE 0
60#endif
61
62/*! @brief Whether enable log color global feature, 1 - enable, 0 - disable.
63 * @details The feature is used to configure the log color feature for all of log component.@n
64 * The feature should be defined in project setting.@n
65 * Below shows how to configure in your project if you want to disable the feature.@n
66 * For IAR, right click project and select "Options", define it in "C/C++ Compiler->Preprocessor->Defined symbols".@n
67 * For KEIL, click "Options for Target...", define it in "C/C++->Preprocessor Symbols->Define".@n
68 * For ARMGCC, open CmakeLists.txt and add the following lines,@n
69 * "SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DLOG_ENABLE_COLOR=0")" for debug target.@n
70 * "SET(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -DLOG_ENABLE_COLOR=0")" for release target.@n
71 * For MCUxpresso, right click project and select "Properties", define it in "C/C++ Build->Settings->MCU C
72 * Complier->Preprocessor".@n
73 */
74#ifndef LOG_ENABLE_COLOR
75#define LOG_ENABLE_COLOR 1
76#endif
77
78/*! @brief Whether enable timestamp global feature for log, 1 - enable, 0 - disable.
79 * @details The feature is used to configure the log timestamp feature for all of log component.@n
80 * The feature should be defined in project setting.@n
81 * Below shows how to configure in your project if you want to disable the feature.@n
82 * For IAR, right click project and select "Options", define it in "C/C++ Compiler->Preprocessor->Defined symbols".@n
83 * For KEIL, click "Options for Target...", define it in "C/C++->Preprocessor Symbols->Define".@n
84 * For ARMGCC, open CmakeLists.txt and add the following lines,@n
85 * "SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DLOG_ENABLE_TIMESTAMP=0")" for debug target.@n
86 * "SET(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -DLOG_ENABLE_TIMESTAMP=0")" for release target.@n
87 * For MCUxpresso, right click project and select "Properties", define it in "C/C++ Build->Settings->MCU C
88 * Complier->Preprocessor".@n
89 */
90#ifndef LOG_ENABLE_TIMESTAMP
91#define LOG_ENABLE_TIMESTAMP 1
92#endif
93
94/*! @brief Whether enable source file name with path information global feature, 1 - enable, 0 - disable.
95 * @details The feature is used to configure the source file name with path information feature for all of log
96 * component.@n The feature should be defined in project setting.@n Below shows how to configure in your project if you
97 * want to enable the feature.@n For IAR, right click project and select "Options", define it in "C/C++
98 * Compiler->Preprocessor->Defined symbols".@n For KEIL, click "Options for Target...", define it in
99 * "C/C++->Preprocessor Symbols->Define".@n For ARMGCC, open CmakeLists.txt and add the following lines,@n
100 * "SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DLOG_ENABLE_FILE_WITH_PATH=1")" for debug target.@n
101 * "SET(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -DLOG_ENABLE_FILE_WITH_PATH=1")" for release target.@n
102 * For MCUxpresso, right click project and select "Properties", define it in "C/C++ Build->Settings->MCU C
103 * Complier->Preprocessor".@n
104 */
105#ifndef LOG_ENABLE_FILE_WITH_PATH
106#define LOG_ENABLE_FILE_WITH_PATH 0
107#endif
108
109/*! @} */
110
111#endif /* __FSL_COMPONENT_LOG_CONFIG_H__ */