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:
parent
e092fe2b3d
commit
4982fa9858
8 changed files with 27 additions and 15 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue