2 * Copyright (c) 2009 Janosch Gräf
4 * This program is free software. It comes without any warranty, to
5 * the extent permitted by applicable law. You can redistribute it
6 * and/or modify it under the terms of the Do What The Fuck You Want
7 * To Public License, Version 2, as published by Sam Hocevar. See
8 * http://sam.zoy.org/projects/COPYING.WTFPL for more details.
14 #include <sys/types.h>
20 #define CDI_DMA_MODE_READ DMA_MODE_READ
22 #define CDI_DMA_MODE_WRITE DMA_MODE_WRITE
23 #define CDI_DMA_MODE_ON_DEMAND DMA_MODE_ON_DEMAND
24 #define CDI_DMA_MODE_SINGLE DMA_MODE_SINGLE
25 #define CDI_DMA_MODE_BLOCK DMA_MODE_BLOCK
27 struct cdi_dma_handle
{
32 void *dmabuf
; ///< @note meinOS specific
35 int cdi_dma_read(struct cdi_dma_handle
*handle
);
36 int cdi_dma_write(struct cdi_dma_handle
*handle
);
37 int cdi_dma_close(struct cdi_dma_handle
*handle
);
39 int cdi_dma_open(struct cdi_dma_handle
*handle
,uint8_t channel
,uint8_t mode
,size_t length
,void* buffer
);