From 32b3549cce7a965d92a81db02c7adc973f08d74c Mon Sep 17 00:00:00 2001 From: Dave Curtis Date: Sat, 31 Oct 2015 10:44:20 -0700 Subject: stmhal: Add symbolic #defines for interrupt levels in irq.h. --- stmhal/dma.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'stmhal/dma.c') diff --git a/stmhal/dma.c b/stmhal/dma.c index 674e4a937..37c553231 100644 --- a/stmhal/dma.c +++ b/stmhal/dma.c @@ -30,6 +30,8 @@ #include STM32_HAL_H #include "dma.h" +#include "py/obj.h" +#include "irq.h" #define NSTREAM (16) @@ -134,7 +136,7 @@ void dma_init(DMA_HandleTypeDef *dma, DMA_Stream_TypeDef *dma_stream, const DMA_ // reset and configure DMA peripheral HAL_DMA_DeInit(dma); HAL_DMA_Init(dma); - HAL_NVIC_SetPriority(dma_irqn[dma_id], 6, 0); + HAL_NVIC_SetPriority(dma_irqn[dma_id], IRQ_PRI_DMA, IRQ_SUBPRI_DMA); same_channel: HAL_NVIC_EnableIRQ(dma_irqn[dma_id]); -- cgit v1.2.3