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

@ -482,7 +482,7 @@ static void dma_callback(const struct device *dma_dev, void *callback_arg,
LOG_DBG("=dma call back @channel %d=", channel);
if (error_code) {
if (error_code < 0) {
LOG_ERR("error happened no callback process %d", error_code);
return;
}