diff options
author | Suren A. Chilingaryan <csa@dside.dyndns.org> | 2011-07-11 03:48:13 +0200 |
---|---|---|
committer | Suren A. Chilingaryan <csa@dside.dyndns.org> | 2011-07-11 03:48:13 +0200 |
commit | 40c61a3b927ce31e05a6eb0d7b36e09e67c6ca97 (patch) | |
tree | baf559a19f5dd348856012d469935b2b29a86de1 /pcilib.h | |
parent | 82167742d62f1cd583d7eb99b356864df70afd8b (diff) | |
download | pcitool-40c61a3b927ce31e05a6eb0d7b36e09e67c6ca97.tar.gz pcitool-40c61a3b927ce31e05a6eb0d7b36e09e67c6ca97.tar.bz2 pcitool-40c61a3b927ce31e05a6eb0d7b36e09e67c6ca97.tar.xz pcitool-40c61a3b927ce31e05a6eb0d7b36e09e67c6ca97.zip |
Wait for the completion of DMA operations during writes
Diffstat (limited to 'pcilib.h')
-rw-r--r-- | pcilib.h | 11 |
1 files changed, 6 insertions, 5 deletions
@@ -69,7 +69,8 @@ typedef enum { typedef enum { PCILIB_DMA_FLAGS_DEFAULT = 0, - PCILIB_DMA_FLAG_EOP = 1 + PCILIB_DMA_FLAG_EOP = 1, + PCILIB_DMA_FLAG_WAIT = 2 } pcilib_dma_flags_t; typedef enum { @@ -219,10 +220,10 @@ int pcilib_write_fifo(pcilib_t *ctx, pcilib_bar_t bar, uintptr_t addr, uint8_t f int pcilib_read_fifo(pcilib_t *ctx, pcilib_bar_t bar, uintptr_t addr, uint8_t fifo_size, size_t n, void *buf); int pcilib_skip_dma(pcilib_t *ctx, pcilib_dma_engine_t dma); -size_t pcilib_stream_dma(pcilib_t *ctx, 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); -size_t pcilib_push_dma(pcilib_t *ctx, pcilib_dma_engine_t dma, uintptr_t addr, size_t size, pcilib_dma_flags_t flags, size_t timeout, void *buf); -size_t pcilib_read_dma(pcilib_t *ctx, pcilib_dma_engine_t dma, uintptr_t addr, size_t size, void *buf); -size_t pcilib_write_dma(pcilib_t *ctx, pcilib_dma_engine_t dma, uintptr_t addr, size_t size, void *buf); +int pcilib_stream_dma(pcilib_t *ctx, 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); +int pcilib_push_dma(pcilib_t *ctx, pcilib_dma_engine_t dma, uintptr_t addr, size_t size, pcilib_dma_flags_t flags, size_t timeout, void *buf, size_t *written_bytes); +int pcilib_read_dma(pcilib_t *ctx, pcilib_dma_engine_t dma, uintptr_t addr, size_t size, void *buf, size_t *read_bytes); +int pcilib_write_dma(pcilib_t *ctx, pcilib_dma_engine_t dma, uintptr_t addr, size_t size, void *buf, size_t *written_bytes); double pcilib_benchmark_dma(pcilib_t *ctx, pcilib_dma_engine_addr_t dma, uintptr_t addr, size_t size, size_t iterations, pcilib_dma_direction_t direction); int pcilib_read_register_space(pcilib_t *ctx, const char *bank, pcilib_register_addr_t addr, size_t n, pcilib_register_value_t *buf); |