shell: Make shell UART backend initialization priority configurable
Closes: #28331 Configurable initialization priority is useful when using CDC ACM serial device, for example. Signed-off-by: Ievgenii Meshcheriakov <ievgenii.meshcheriakov@nordicsemi.no>
This commit is contained in:
parent
c54a6a0d6e
commit
b00170436b
2 changed files with 10 additions and 1 deletions
|
@ -21,6 +21,14 @@ config SHELL_BACKEND_SERIAL
|
|||
|
||||
if SHELL_BACKEND_SERIAL
|
||||
|
||||
config SHELL_BACKEND_SERIAL_INIT_PRIORITY
|
||||
int "Initialization priority"
|
||||
default 0
|
||||
range 0 99
|
||||
help
|
||||
Initialization priority for UART backend. This must be bigger than
|
||||
the initialization priority of the used serial device.
|
||||
|
||||
config SHELL_PROMPT_UART
|
||||
string "Displayed prompt name"
|
||||
default "uart:~$ "
|
||||
|
|
|
@ -297,7 +297,8 @@ static int enable_shell_uart(const struct device *arg)
|
|||
|
||||
return 0;
|
||||
}
|
||||
SYS_INIT(enable_shell_uart, POST_KERNEL, 0);
|
||||
SYS_INIT(enable_shell_uart, POST_KERNEL,
|
||||
CONFIG_SHELL_BACKEND_SERIAL_INIT_PRIORITY);
|
||||
|
||||
const struct shell *shell_backend_uart_get_ptr(void)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue