summaryrefslogtreecommitdiff
path: root/src/Kconfig
diff options
context:
space:
mode:
authorwdfk-prog <[email protected]>2026-02-12 08:57:46 +0800
committerRbb666 <[email protected]>2026-02-12 09:24:18 +0800
commitdb6c0ddbf333be65f5ddc990ee63a200f768a9f7 (patch)
tree0df5392754915d89a5bc1dbfc04d628af5deaa76 /src/Kconfig
parent9412a2899d08c3ef806accf0335bda2397c326de (diff)
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
Diffstat (limited to 'src/Kconfig')
-rw-r--r--src/Kconfig12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/Kconfig b/src/Kconfig
index f57b305ca2..d278169da0 100644
--- a/src/Kconfig
+++ b/src/Kconfig
@@ -430,6 +430,18 @@ if RT_USING_CONSOLE
string "the device name for console"
default "uart1"
+ config RT_USING_CONSOLE_OUTPUT_CTL
+ bool "Enable runtime console output control"
+ default y
+ help
+ Enable runtime control for console output.
+ When enabled, rt_console_output_set_enabled() and
+ rt_console_output_get_enabled() can be used to switch
+ rt_kputs()/rt_kprintf() output on or off dynamically.
+
+ When disabled, these APIs are not compiled as real symbols and
+ output path has no runtime check, so console output stays enabled.
+
endif
config RT_VER_NUM