1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-26 09:45:37 +03:00

Unify DMA stream and channel handling

This commit is contained in:
jflyper 2019-07-14 15:59:07 +09:00
parent e8125e57c9
commit 7ddfd7dea6
40 changed files with 421 additions and 446 deletions

View file

@ -85,10 +85,10 @@ void transponderIrHardwareInit(ioTag_t ioTag, transponder_t *transponder)
return;
}
dmaStream_t *dmaRef = dmaSpec->ref;
dmaResource_t *dmaRef = dmaSpec->ref;
uint32_t dmaChannel = dmaSpec->channel;
#else
dmaStream_t *dmaRef = timerHardware->dmaRef;
dmaResource_t *dmaRef = timerHardware->dmaRef;
uint32_t dmaChannel = timerHardware->dmaChannel;
#endif
@ -144,7 +144,7 @@ void transponderIrHardwareInit(ioTag_t ioTag, transponder_t *transponder)
hdma_tim.Init.PeriphBurst = DMA_PBURST_SINGLE;
/* Set hdma_tim instance */
hdma_tim.Instance = dmaRef;
hdma_tim.Instance = (DMA_ARCH_TYPE *)dmaRef;
uint16_t dmaIndex = timerDmaIndex(timerChannel);