summaryrefslogtreecommitdiffstats
path: root/dma.h
diff options
context:
space:
mode:
authorroot <root@iss-tomyspiel-l>2011-07-04 16:21:23 +0200
committerroot <root@iss-tomyspiel-l>2011-07-04 16:21:23 +0200
commit2e7a7a3534bcf591c0d6c65105b2d845f293112f (patch)
treed0e5d2f9ea246ff55134205f7ac3af0d9599e641 /dma.h
parent70937611e34577151a6607640050e8b164a54e70 (diff)
downloadipecamera-2e7a7a3534bcf591c0d6c65105b2d845f293112f.tar.gz
ipecamera-2e7a7a3534bcf591c0d6c65105b2d845f293112f.tar.bz2
ipecamera-2e7a7a3534bcf591c0d6c65105b2d845f293112f.tar.xz
ipecamera-2e7a7a3534bcf591c0d6c65105b2d845f293112f.zip
North West Logick DMA implementation
Diffstat (limited to 'dma.h')
-rw-r--r--dma.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/dma.h b/dma.h
new file mode 100644
index 0000000..8025089
--- /dev/null
+++ b/dma.h
@@ -0,0 +1,18 @@
+#ifndef _PCILIB_DMA_H
+#define _PCILIB_DMA_H
+
+#define PCILIB_DMA_BUFFER_INVALID ((size_t)-1)
+
+struct pcilib_dma_api_description_s {
+ pcilib_dma_context_t *(*init)(pcilib_t *ctx);
+ void (*free)(pcilib_dma_context_t *ctx);
+
+ size_t (*push)(pcilib_dma_context_t *ctx, pcilib_dma_t dma, uintptr_t addr, size_t size, pcilib_dma_flags_t flags, size_t timeout, void *buf);
+ size_t (*stream)(pcilib_dma_context_t *ctx, pcilib_dma_t dma, uintptr_t addr, size_t size, pcilib_dma_flags_t flags, size_t timeout, pcilib_dma_callback_t cb, void *cbattr);
+
+ double (*benchmark)(pcilib_dma_context_t *ctx, pcilib_dma_addr_t dma, uintptr_t addr, size_t size, size_t iterations, pcilib_dma_direction_t direction);
+};
+
+int pcilib_set_dma_engine_description(pcilib_t *ctx, pcilib_dma_t engine, pcilib_dma_engine_description_t *desc);
+
+#endif /* _PCILIB_DMA_H */