diff options
-rw-r--r-- | common/console_output.c | 11 | ||||
-rw-r--r-- | include/console.h | 10 |
2 files changed, 21 insertions, 0 deletions
diff --git a/common/console_output.c b/common/console_output.c index 6d883f7030..4b0c4ef71e 100644 --- a/common/console_output.c +++ b/common/console_output.c @@ -18,6 +18,17 @@ uint32_t channel_mask = CC_DEFAULT; static uint32_t channel_mask_saved = CC_DEFAULT; +void console_disable_output(void) +{ + channel_mask_saved = channel_mask; + channel_mask = 0; +} + +void console_enable_output(void) +{ + channel_mask = channel_mask_saved; +} + /* * List of channel names; * diff --git a/include/console.h b/include/console.h index f0367f7ffe..1bc46c1fd0 100644 --- a/include/console.h +++ b/include/console.h @@ -151,6 +151,16 @@ void cflush(void); void console_has_input(void); /** + * Disable console output by disabling all channels + */ +void console_disable_output(void); + +/** + * Enable console output to default channels + */ +void console_enable_output(void); + +/** * Register a console command handler. * * @param name Command name; must not be the beginning of another |