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:
parent
426bc4545a
commit
1be72d9888
25 changed files with 60 additions and 52 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue