mirror of
https://github.com/apache/nuttx.git
synced 2026-05-23 06:39:01 +08: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:
committed by
Alan C. Assis
parent
9e063b1784
commit
be66d39552
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user