mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2026-03-24 01:09:47 +08:00
feat(console): Add console output enable switch
- rt_console_output_enabled()/rt_console_output_is_enabled() gate rt_kprintf/rt_kputs output with the switch
This commit is contained in:
@@ -783,6 +783,13 @@ void rt_components_board_init(void);
|
||||
#else
|
||||
int rt_kprintf(const char *fmt, ...);
|
||||
void rt_kputs(const char *str);
|
||||
#ifdef RT_USING_CONSOLE_OUTPUT_CTL
|
||||
void rt_console_output_set_enabled(rt_bool_t enabled);
|
||||
rt_bool_t rt_console_output_get_enabled(void);
|
||||
#else
|
||||
#define rt_console_output_set_enabled(enabled) ((void)0)
|
||||
#define rt_console_output_get_enabled() (RT_TRUE)
|
||||
#endif /* RT_USING_CONSOLE_OUTPUT_CTL */
|
||||
#endif /* RT_USING_CONSOLE */
|
||||
|
||||
rt_err_t rt_backtrace(void);
|
||||
|
||||
Reference in New Issue
Block a user