i broke it
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
#include "spi_dma.h"
|
||||
|
||||
#include "ch32v003fun.h"
|
||||
#include "debug.h"
|
||||
|
||||
volatile transfer_state_t tx_state = IDLE;
|
||||
volatile transfer_state_t rx_state = IDLE;
|
||||
@@ -158,6 +159,8 @@ void init_spidma(void) {
|
||||
DMA_MemoryInc_Enable | DMA_PeripheralInc_Disable |
|
||||
DMA_Mode_Normal | DMA_DIR_PeripheralSRC | DMA_IT_TC;
|
||||
|
||||
NVIC_SetPriority(DMA1_Channel2_IRQn, 0);
|
||||
NVIC_SetPriority(DMA1_Channel3_IRQn, 0);
|
||||
NVIC_EnableIRQ(DMA1_Channel3_IRQn);
|
||||
NVIC_EnableIRQ(DMA1_Channel2_IRQn);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user