mirror of
https://github.com/apache/nuttx.git
synced 2026-10-03 20:27:53 +00:00
arch/risc-v/espressif: Fix dangling else in esp_setup() for RS-485.
The RS-485 tx_idle_num block in esp_setup() ends in a bare "else" that binds to the next statement, which is now leave_critical_section(). On an RS-485 port esp_setup() therefore returns with interrupts disabled. uart_open() hides this behind its own critical section, but a tcsetattr() that changes the line settings calls esp_setup() through TCSETS and leaves the calling task running with interrupts off. On an ESP32-C3 the system tick stops advancing in that task. Assisted-by: Claude:claude-opus-5-5 Signed-off-by: Erik Englund <erik.englund@gmail.com>
This commit is contained in:
parent
fe7eff404e
commit
5dd13b578d
1 changed files with 0 additions and 1 deletions
|
|
@ -579,7 +579,6 @@ static int esp_setup(uart_dev_t *dev)
|
|||
{
|
||||
uart_hal_set_tx_idle_num(priv->hal, 1);
|
||||
}
|
||||
else
|
||||
#endif
|
||||
|
||||
leave_critical_section(flags);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue