summaryrefslogtreecommitdiff
path: root/include/dma.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/dma.h')
-rw-r--r--include/dma.h16
1 files changed, 15 insertions, 1 deletions
diff --git a/include/dma.h b/include/dma.h
index 5e5553a794..3ecef70361 100644
--- a/include/dma.h
+++ b/include/dma.h
@@ -118,13 +118,27 @@ void dma_test(void);
void dma_clear_isr(enum dma_channel channel);
/**
- * Enable "Transfer Complete" interrupt for a DMA channel
+ * Enable "Transfer Complete" interrupt for a DMA channel.
+ * Will Wake up calling task when complete.
*
* @param channel Which channel's interrupts to change
*/
void dma_enable_tc_interrupt(enum dma_channel channel);
/**
+ * Enable "Transfer Complete" interrupt for a DMA channel with callback
+ * NOTE: The callback is run at highest interrupt priority so should be
+ * fast and not depend on get_time().
+ *
+ * @param channel Which channel's interrupts to change
+ * @param callback Pointer to callback function to call on interrupt
+ * @param callback_data Data to pass through to callback function
+ */
+void dma_enable_tc_interrupt_callback(enum dma_channel channel,
+ void (*callback)(void *),
+ void *callback_data);
+
+/**
* Disable "Transfer Complete" interrupt for a DMA channel
*
* @param channel Which channel's interrupts to change