dma: callback with 2 status codes for successful transfers

Make use of positive status values in the DMA callback to pass
info to the DMA client after a successful DMA operation.
A completed DMA transfer uses the status 0 while a reached
water mark uses the status 1.

Signed-off-by: Cyril Fougeray <cyril.fougeray@worldcoin.org>
This commit is contained in:
Cyril Fougeray 2023-03-26 17:26:23 +02:00 committed by Carles Cufí
commit 1be72d9888
25 changed files with 60 additions and 52 deletions

View file

@ -1227,7 +1227,7 @@ void uart_stm32_dma_rx_cb(const struct device *dma_dev, void *user_data,
const struct device *uart_dev = user_data;
struct uart_stm32_data *data = uart_dev->data;
if (status != 0) {
if (status < 0) {
async_evt_rx_err(data, status);
return;
}