aboutsummaryrefslogtreecommitdiffstats
path: root/libmaple/dma.h
diff options
context:
space:
mode:
authorMarti Bolivar <mbolivar@leaflabs.com>2011-01-03 15:19:19 -0500
committerMarti Bolivar <mbolivar@leaflabs.com>2011-01-03 15:19:19 -0500
commite9af9d951a0341ea68ce88d7b5ee3b42b68494b6 (patch)
tree4ba9cf5dacfd724b82c734026e3cb510eb485684 /libmaple/dma.h
parentfc727d99ac3f3d98eeba925fbbfee5cae2e7f8a4 (diff)
downloadlibrambutan-e9af9d951a0341ea68ce88d7b5ee3b42b68494b6.tar.gz
librambutan-e9af9d951a0341ea68ce88d7b5ee3b42b68494b6.zip
Documentation improvements, DMA IRQ table volatile bugfix.
Diffstat (limited to 'libmaple/dma.h')
-rw-r--r--libmaple/dma.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/libmaple/dma.h b/libmaple/dma.h
index aabbfb8..3417f02 100644
--- a/libmaple/dma.h
+++ b/libmaple/dma.h
@@ -67,6 +67,7 @@ typedef enum dma_mode_flags {
DMA_TRNS_CMPLT = 1 << 1 /**< Interrupt on transfer completion */
} dma_mode_flags;
+/** Source and destination transfer sizes. */
typedef enum dma_transfer_size {
DMA_SIZE_8BITS = 0,
DMA_SIZE_16BITS = 1,
@@ -102,7 +103,16 @@ void dma_init(uint8 channel, volatile void *paddr,
* @see dma_init() */
void dma_start(uint8 channel, volatile void *buffer, uint16 count);
+/**
+ * Attach an interrupt handler for the given DMA channel.
+ * @param channel DMA channel (1..7)
+ * @param handler Interrupt handler to attach
+ * @see voidFuncPtr */
void dma_attach_interrupt(uint8 channel, voidFuncPtr handler);
+
+/**
+ * Detach any handler associated with the given DMA channel.
+ * @param channel Channel whose interrupt handler to detach. */
void dma_detach_interrupt(uint8 channel);
#ifdef __cplusplus