Skip to content
Commit 345dd11e authored by Krzysztof Chruściński's avatar Krzysztof Chruściński Committed by Anas Nashif
Browse files

drivers: serial: uart_nrfx_uarte: Fix dropping flushed data



When rx_flush() was called with NULL buffer it was an indication to
drop data from the FIFO. However, it is still important to get the
correct amount of dropped data because when PPI+TIMER are used to
count bytes those flushed bytes are also counted (because each
byte generates RXDRDY event). If those bytes are not counted then
total amount of reported bytes is not correctly aligned with bytes
counted by TIMER.

Reworking rx_flush() to correctly count number of dropped bytes and
then add this flushed bytes to the total amount of RX bytes
reported to the user in RXTO event handler.

Signed-off-by: default avatarKrzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
parent 282bc783
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment