mirror of
https://github.com/apache/nuttx.git
synced 2026-08-01 20:28:58 +00:00
serial/uart_rpmsg: use config option for console registration
Parameter isconsole in uart_rpmsg_init() has two effects: set uart terminal flags for typical console use and register the device as /dev/console. These are separate things. The latter might not be wanted in all cases. Use the already existing config option CONFIG_RPMSG_UART_CONSOLE to conditionally register the uart as console device. Signed-off-by: Maarten Zanders <maarten@zanders.be>
This commit is contained in:
parent
9e063b1784
commit
be66d39552
1 changed files with 2 additions and 0 deletions
|
|
@ -458,10 +458,12 @@ int uart_rpmsg_init(FAR const char *cpuname, FAR const char *devname,
|
|||
UART_RPMSG_DEV_PREFIX, devname);
|
||||
uart_register(name, dev);
|
||||
|
||||
#ifdef CONFIG_RPMSG_UART_CONSOLE
|
||||
if (dev->isconsole)
|
||||
{
|
||||
uart_register(UART_RPMSG_DEV_CONSOLE, dev);
|
||||
}
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue