diff options
author | Suren A. Chilingaryan <csa@dside.dyndns.org> | 2011-07-12 09:53:45 +0200 |
---|---|---|
committer | Suren A. Chilingaryan <csa@dside.dyndns.org> | 2011-07-12 09:53:45 +0200 |
commit | de984f8b9706cfac79f7658e5b3863e78b052458 (patch) | |
tree | f989701212bb2de4d224387344929853e4055d27 /dma.c | |
parent | 5b4fbcc62d4544aee7adf0a92a2db31197bae305 (diff) | |
download | pcitool-de984f8b9706cfac79f7658e5b3863e78b052458.tar.gz pcitool-de984f8b9706cfac79f7658e5b3863e78b052458.tar.bz2 pcitool-de984f8b9706cfac79f7658e5b3863e78b052458.tar.xz pcitool-de984f8b9706cfac79f7658e5b3863e78b052458.zip |
Suppport DMA modes in console application (not functional yet)
Diffstat (limited to 'dma.c')
-rw-r--r-- | dma.c | 19 |
1 files changed, 16 insertions, 3 deletions
@@ -47,13 +47,26 @@ pcilib_dma_engine_t pcilib_find_dma_by_addr(pcilib_t *ctx, pcilib_dma_direction_ } if (info->engines[i]) return i; - return PCILIB_DMA_INVALID; + return PCILIB_DMA_ENGINE_INVALID; } int pcilib_set_dma_engine_description(pcilib_t *ctx, pcilib_dma_engine_t engine, pcilib_dma_engine_description_t *desc) { ctx->dma_info.engines[engine] = desc; } +int pcilib_start_dma(pcilib_t *ctx, pcilib_dma_engine_t dma, pcilib_dma_flags_t flags) { +} + +int pcilib_stop_dma(pcilib_t *ctx, pcilib_dma_engine_t dma, pcilib_dma_flags_t flags) { +} + +int pcilib_enable_irq(pcilib_t *ctx, pcilib_dma_flags_t flags) { +} + +int pcilib_disable_irq(pcilib_t *ctx, pcilib_dma_flags_t flags) { +} + + typedef struct { size_t size; void *data; @@ -79,7 +92,7 @@ static int pcilib_dma_skip_callback(void *arg, pcilib_dma_flags_t flags, size_t return 1; } -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_stream_dma(pcilib_t *ctx, pcilib_dma_engine_t dma, uintptr_t addr, size_t size, pcilib_dma_flags_t flags, pcilib_timeout_t timeout, pcilib_dma_callback_t cb, void *cbattr) { int err; const pcilib_dma_info_t *info = pcilib_get_dma_info(ctx); @@ -135,7 +148,7 @@ int pcilib_skip_dma(pcilib_t *ctx, pcilib_dma_engine_t dma) { } -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) { +int pcilib_push_dma(pcilib_t *ctx, pcilib_dma_engine_t dma, uintptr_t addr, size_t size, pcilib_dma_flags_t flags, pcilib_timeout_t timeout, void *buf, size_t *written) { int err; const pcilib_dma_info_t *info = pcilib_get_dma_info(ctx); |