modbus: do not loop in UART IRQ handler
On some platforms, if there are multiple MODBUS interfaces, receiving of RTU frames may fail. Replacing while loop with just "if" fixes this problem. Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
This commit is contained in:
parent
8e70d04193
commit
da47f41e42
1 changed files with 1 additions and 1 deletions
|
@ -389,7 +389,7 @@ static void uart_cb_handler(const struct device *dev, void *app_data)
|
|||
|
||||
cfg = ctx->cfg;
|
||||
|
||||
while (uart_irq_update(cfg->dev) && uart_irq_is_pending(cfg->dev)) {
|
||||
if (uart_irq_update(cfg->dev) && uart_irq_is_pending(cfg->dev)) {
|
||||
|
||||
if (uart_irq_rx_ready(cfg->dev)) {
|
||||
cb_handler_rx(ctx);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue