uart: nrfx_uarte: Return error when re-enabling RX
Driver was not behaving according to API description and was not returning -EBUSY when uart_rx_enable() was called on already enabled receiver. Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
This commit is contained in:
parent
ea81b4b812
commit
11bbdb030d
1 changed files with 4 additions and 0 deletions
|
@ -853,6 +853,10 @@ static int uarte_nrfx_rx_enable(const struct device *dev, uint8_t *buf,
|
|||
return -ENOTSUP;
|
||||
}
|
||||
|
||||
if (data->async->rx_enabled) {
|
||||
return -EBUSY;
|
||||
}
|
||||
|
||||
data->async->rx_timeout = timeout;
|
||||
/* Set minimum interval to 3 RTC ticks. 3 is used due to RTC limitation
|
||||
* which cannot set timeout for next tick. Assuming delay in processing
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue