diff options
| author | seteiro <[email protected]> | 2026-10-17 22:35:25 +0800 |
|---|---|---|
| committer | Rbb666 <[email protected]> | 2026-10-19 16:53:09 +0800 |
| commit | 54f5cac5b4cc81f7d28ff783791950ed7e8f1d53 (patch) | |
| tree | 93e2d70b810640b95e9e126b192660bb8a9e0a7e /components/drivers/misc/rt_null.c | |
| parent | 8159dc81b773bd82f191696b672c69dec2742328 (diff) | |
drivers/misc: register rt_null at BOARD init for default console (#11472)
rt_console_set_device() is typically called in rt_hw_board_init() right
after rt_components_board_init(). null was INIT_DEVICE (level 3), so it
was not registered yet and could not be RT_CONSOLE_DEVICE_NAME.
Raise to INIT_BOARD_EXPORT; null is a pure software sink with no HW deps.
Co-Authored-By: Grok <[email protected]>
Diffstat (limited to 'components/drivers/misc/rt_null.c')
| -rw-r--r-- | components/drivers/misc/rt_null.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/components/drivers/misc/rt_null.c b/components/drivers/misc/rt_null.c index 4cbc6e8e94..1dd6f25e7c 100644 --- a/components/drivers/misc/rt_null.c +++ b/components/drivers/misc/rt_null.c @@ -4,6 +4,7 @@ * Change Logs: * Date Author Notes * 2020-12-03 quanzhao the first version + * 2026-10-17 seteiro raise init to BOARD so null can be default console (#11472) */ #include <time.h> @@ -70,5 +71,7 @@ int null_device_init(void) return 0; } -INIT_DEVICE_EXPORT(null_device_init); +/* Register at BOARD level so rt_console_set_device("null") in board init can find it. + * null is a pure software sink; no hardware dependency. See #11472. */ +INIT_BOARD_EXPORT(null_device_init); |
