dma: use user data in callback

Use user data to replace DMA's device pointer in
the callback function so that the user can retrieve
its context by that private data.

Signed-off-by: Jun Li <jun.r.li@intel.com>
This commit is contained in:
Jun Li 2018-07-18 01:17:57 -07:00 committed by Anas Nashif
commit 4982fa9858
8 changed files with 27 additions and 15 deletions

View file

@ -18,7 +18,7 @@ extern "C" {
#endif
/** DMA transfer callback */
typedef void (*dma_callback)(struct device *dev, u32_t channel, int error_code);
typedef void (*dma_callback)(void *arg, u32_t channel, int error_code);
/* XDMA_MBR_UBC */
#define XDMA_UBC_NDE (0x1u << 24)