diff options
author | Suren A. Chilingaryan <csa@dside.dyndns.org> | 2011-07-11 01:37:54 +0200 |
---|---|---|
committer | Suren A. Chilingaryan <csa@dside.dyndns.org> | 2011-07-11 01:37:54 +0200 |
commit | c095f06560a0efacc7a34ea4e7f1e69c1faab0cf (patch) | |
tree | c005686153325eadb3d5c97617154f0acba75fbb /dma/nwl_dma.h | |
parent | 02924fc49641ca9c000054a7a540b6f1eaa0e8f8 (diff) | |
download | ipecamera-c095f06560a0efacc7a34ea4e7f1e69c1faab0cf.tar.gz ipecamera-c095f06560a0efacc7a34ea4e7f1e69c1faab0cf.tar.bz2 ipecamera-c095f06560a0efacc7a34ea4e7f1e69c1faab0cf.tar.xz ipecamera-c095f06560a0efacc7a34ea4e7f1e69c1faab0cf.zip |
IRQ support in NWL DMA engine
Diffstat (limited to 'dma/nwl_dma.h')
-rw-r--r-- | dma/nwl_dma.h | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/dma/nwl_dma.h b/dma/nwl_dma.h new file mode 100644 index 0000000..8468f52 --- /dev/null +++ b/dma/nwl_dma.h @@ -0,0 +1,32 @@ +#ifndef _PCILIB_DMA_NWL_H +#define _PCILIB_DMA_NWL_H + +#include <stdio.h> +#include "pcilib.h" + +#define NWL_DMA_IRQ_SOURCE 0 + +typedef struct nwl_dma_s nwl_dma_t; + +pcilib_dma_context_t *dma_nwl_init(pcilib_t *ctx); +void dma_nwl_free(pcilib_dma_context_t *vctx); + +size_t dma_nwl_write_fragment(pcilib_dma_context_t *vctx, pcilib_dma_engine_t dma, uintptr_t addr, size_t size, pcilib_dma_flags_t flags, size_t timeout, void *data); +size_t dma_nwl_stream_read(pcilib_dma_context_t *vctx, pcilib_dma_engine_t dma, uintptr_t addr, size_t size, pcilib_dma_flags_t flags, size_t timeout, pcilib_dma_callback_t cb, void *cbattr); +double dma_nwl_benchmark(pcilib_dma_context_t *vctx, pcilib_dma_engine_addr_t dma, uintptr_t addr, size_t size, size_t iterations, pcilib_dma_direction_t direction); + + +#ifdef _PCILIB_DMA_NWL_C +pcilib_dma_api_description_t nwl_dma_api = { + dma_nwl_init, + dma_nwl_free, + dma_nwl_write_fragment, + dma_nwl_stream_read, + dma_nwl_benchmark +}; +#else +extern pcilib_dma_api_description_t nwl_dma_api; +#endif + + +#endif /* _PCILIB_DMA_NWL_H */ |