Skip to content

Commit

Permalink
[posix] Use new radio URL parameter "uart-init-deassert" to deassert …
Browse files Browse the repository at this point in the history
…DTR and RTS on init when flow control is disabled.

This lets us preserve legacy behavior where "uart-flow-control" was not required even with hardware flow control enabled.
  • Loading branch information
suveshpratapa committed Aug 27, 2024
1 parent a30cbda commit 949076e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/posix/platform/hdlc_interface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -600,8 +600,9 @@ int HdlcInterface::OpenFile(const Url::Url &aRadioUrl)
{
tios.c_cflag |= CRTSCTS;
}
else
else if (aRadioUrl.HasParam("uart-init-deassert"))
{
// When flow control is disabled, deassert DTR and RTS on init
#ifndef __APPLE__
int flags;
#endif
Expand Down
1 change: 1 addition & 0 deletions src/posix/platform/radio_url.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ const char *otSysGetRadioUrlHelpString(void)
" uart-stop[=number-of-bits] Uart stop bit, default is 1.\n" \
" uart-baudrate[=baudrate] Uart baud rate, default is 115200.\n" \
" uart-flow-control Enable flow control, disabled by default.\n" \
" uart-init-deassert Deassert lines on init when flow control is disabled.\n" \
" uart-reset Reset connection after hard resetting RCP(USB CDC ACM).\n" \
"\n"
#else
Expand Down

0 comments on commit 949076e

Please sign in to comment.