mirror of
https://github.com/apache/nuttx.git
synced 2026-10-11 16:20:21 +00:00
drivers/rpmsg_port_uart: switch the uart IO to GPIO when peer poweroff
Use the TIOCVHANGUP to notify the driver to switch the uart io to gpio mode to avoid the current leak caused by the uart io because peer core may already poweroff so the io can be in high voltage state. Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
This commit is contained in:
parent
579cf47299
commit
ee02d0c769
1 changed files with 1 additions and 0 deletions
|
|
@ -400,6 +400,7 @@ static int rpmsg_port_uart_rx_thread(int argc, FAR char *argv[])
|
|||
rpmsgdbg("Received poweroff command\n");
|
||||
rpmsg_port_drop_packets(&rpuart->port, RPMSG_PORT_DROP_TXQ);
|
||||
rpmsg_port_unregister(&rpuart->port);
|
||||
DEBUGVERIFY(file_ioctl(&rpuart->file, TIOCVHANGUP, 0) >= 0);
|
||||
rpuart->connected = false;
|
||||
continue;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue