aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--libmaple/dma.c2
-rw-r--r--libmaple/dma.h7
2 files changed, 5 insertions, 4 deletions
diff --git a/libmaple/dma.c b/libmaple/dma.c
index 57baa13..ff978de 100644
--- a/libmaple/dma.c
+++ b/libmaple/dma.c
@@ -48,6 +48,7 @@ static dma_dev dma1 = {
{ .handler = NULL, .irq_line = NVIC_DMA_CH6 },
{ .handler = NULL, .irq_line = NVIC_DMA_CH7 }}
};
+/** DMA1 device */
dma_dev *DMA1 = &dma1;
#ifdef STM32_HIGH_DENSITY
@@ -60,6 +61,7 @@ static dma_dev dma2 = {
{ .handler = NULL, .irq_line = NVIC_DMA2_CH_4_5 },
{ .handler = NULL, .irq_line = NVIC_DMA2_CH_4_5 }} /* !@#$ */
};
+/** DMA2 device */
dma_dev *DMA2 = &dma2;
#endif
diff --git a/libmaple/dma.h b/libmaple/dma.h
index 7c380d0..e724e98 100644
--- a/libmaple/dma.h
+++ b/libmaple/dma.h
@@ -269,8 +269,9 @@ typedef struct dma_reg_map {
/** Encapsulates state related to a DMA channel interrupt. */
typedef struct dma_handler_config {
- void (*handler)(void);
- nvic_irq_num irq_line;
+ void (*handler)(void); /**< User-specified channel interrupt
+ handler */
+ nvic_irq_num irq_line; /**< Channel's NVIC interrupt number */
} dma_handler_config;
/** DMA device type */
@@ -280,10 +281,8 @@ typedef struct dma_dev {
dma_handler_config handlers[]; /**< IRQ handlers and NVIC numbers. */
} dma_dev;
-/** DMA1 device */
extern dma_dev *DMA1;
#ifdef STM32_HIGH_DENSITY
-/** DMA2 device */
extern dma_dev *DMA2;
#endif