#include <bm_lpuarte.h>
Abort any ongoing reception.
- Note
- NRFX_UARTE_EVT_RX_DONE event will be generated in non-blocking mode. It will contain number of bytes received until the abort was called. The event handler will be called from the UARTE interrupt context.
- Warning
- When the double-buffering feature is used and the UARTE interrupt is processed with a delay (for example, due to a higher priority interrupt) long enough for the first buffer to be filled completely, the event handler will be supplied with the pointer to the first buffer and the number of bytes received in the second buffer. This is because from hardware perspective it is impossible to deduce the reception of which buffer has been aborted. To prevent this from happening, keep the UARTE interrupt latency low or use large enough reception buffers.
- Parameters
-
| [in] | lpu | Low Power UARTE driver instance structure. |
| [in] | sync | If true, receiver is disabled synchronously. |
- Return values
-
| 0 | Successfully initiate disabling or disabled (synchronous mode). |
| -EINPROGRESS | Receiver was not enabled. |