Fix typo - replace rrc by rcc
This commit is contained in:
parent
801add3ce3
commit
325f4297cc
|
@ -75,7 +75,7 @@ void dmaSetHandler(dmaHandlerIdentifier_e identifier, dmaCallbackHandlerFuncPtr
|
||||||
{
|
{
|
||||||
NVIC_InitTypeDef NVIC_InitStructure;
|
NVIC_InitTypeDef NVIC_InitStructure;
|
||||||
|
|
||||||
RCC_AHBPeriphClockCmd(dmaDescriptors[identifier].rrc, ENABLE);
|
RCC_AHBPeriphClockCmd(dmaDescriptors[identifier].rcc, ENABLE);
|
||||||
dmaDescriptors[identifier].irqHandlerCallback = callback;
|
dmaDescriptors[identifier].irqHandlerCallback = callback;
|
||||||
dmaDescriptors[identifier].userParam = userParam;
|
dmaDescriptors[identifier].userParam = userParam;
|
||||||
|
|
||||||
|
|
|
@ -44,11 +44,11 @@ typedef struct dmaChannelDescriptor_s {
|
||||||
dmaCallbackHandlerFuncPtr irqHandlerCallback;
|
dmaCallbackHandlerFuncPtr irqHandlerCallback;
|
||||||
uint8_t flagsShift;
|
uint8_t flagsShift;
|
||||||
IRQn_Type irqN;
|
IRQn_Type irqN;
|
||||||
uint32_t rrc;
|
uint32_t rcc;
|
||||||
uint32_t userParam;
|
uint32_t userParam;
|
||||||
} dmaChannelDescriptor_t;
|
} dmaChannelDescriptor_t;
|
||||||
|
|
||||||
#define DEFINE_DMA_CHANNEL(d, s, f, i, r) {.dma = d, .stream = s, .irqHandlerCallback = NULL, .flagsShift = f, .irqN = i, .rrc = r, .userParam = 0}
|
#define DEFINE_DMA_CHANNEL(d, s, f, i, r) {.dma = d, .stream = s, .irqHandlerCallback = NULL, .flagsShift = f, .irqN = i, .rcc = r, .userParam = 0}
|
||||||
#define DEFINE_DMA_IRQ_HANDLER(d, s, i) void DMA ## d ## _Stream ## s ## _IRQHandler(void) {\
|
#define DEFINE_DMA_IRQ_HANDLER(d, s, i) void DMA ## d ## _Stream ## s ## _IRQHandler(void) {\
|
||||||
if (dmaDescriptors[i].irqHandlerCallback)\
|
if (dmaDescriptors[i].irqHandlerCallback)\
|
||||||
dmaDescriptors[i].irqHandlerCallback(&dmaDescriptors[i]);\
|
dmaDescriptors[i].irqHandlerCallback(&dmaDescriptors[i]);\
|
||||||
|
@ -87,11 +87,11 @@ typedef struct dmaChannelDescriptor_s {
|
||||||
dmaCallbackHandlerFuncPtr irqHandlerCallback;
|
dmaCallbackHandlerFuncPtr irqHandlerCallback;
|
||||||
uint8_t flagsShift;
|
uint8_t flagsShift;
|
||||||
IRQn_Type irqN;
|
IRQn_Type irqN;
|
||||||
uint32_t rrc;
|
uint32_t rcc;
|
||||||
uint32_t userParam;
|
uint32_t userParam;
|
||||||
} dmaChannelDescriptor_t;
|
} dmaChannelDescriptor_t;
|
||||||
|
|
||||||
#define DEFINE_DMA_CHANNEL(d, c, f, i, r) {.dma = d, .channel = c, .irqHandlerCallback = NULL, .flagsShift = f, .irqN = i, .rrc = r, .userParam = 0}
|
#define DEFINE_DMA_CHANNEL(d, c, f, i, r) {.dma = d, .channel = c, .irqHandlerCallback = NULL, .flagsShift = f, .irqN = i, .rcc = r, .userParam = 0}
|
||||||
#define DEFINE_DMA_IRQ_HANDLER(d, c, i) void DMA ## d ## _Channel ## c ## _IRQHandler(void) {\
|
#define DEFINE_DMA_IRQ_HANDLER(d, c, i) void DMA ## d ## _Channel ## c ## _IRQHandler(void) {\
|
||||||
if (dmaDescriptors[i].irqHandlerCallback)\
|
if (dmaDescriptors[i].irqHandlerCallback)\
|
||||||
dmaDescriptors[i].irqHandlerCallback(&dmaDescriptors[i]);\
|
dmaDescriptors[i].irqHandlerCallback(&dmaDescriptors[i]);\
|
||||||
|
|
|
@ -76,7 +76,7 @@ void dmaSetHandler(dmaHandlerIdentifier_e identifier, dmaCallbackHandlerFuncPtr
|
||||||
{
|
{
|
||||||
NVIC_InitTypeDef NVIC_InitStructure;
|
NVIC_InitTypeDef NVIC_InitStructure;
|
||||||
|
|
||||||
RCC_AHB1PeriphClockCmd(dmaDescriptors[identifier].rrc, ENABLE);
|
RCC_AHB1PeriphClockCmd(dmaDescriptors[identifier].rcc, ENABLE);
|
||||||
dmaDescriptors[identifier].irqHandlerCallback = callback;
|
dmaDescriptors[identifier].irqHandlerCallback = callback;
|
||||||
dmaDescriptors[identifier].userParam = userParam;
|
dmaDescriptors[identifier].userParam = userParam;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue