mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-16 21:05:35 +03:00
[G4] LED_STRIP support
This commit is contained in:
parent
be016dc794
commit
a4483b4fe9
1 changed files with 3 additions and 1 deletions
|
@ -111,7 +111,7 @@ bool ws2811LedStripHardwareInit(ioTag_t ioTag)
|
|||
__DMA2_CLK_ENABLE();
|
||||
|
||||
/* Set the parameters to be configured */
|
||||
#ifdef STM32H7
|
||||
#if defined(STM32H7) || defined(STM32G4)
|
||||
hdma_tim.Init.Request = dmaChannel;
|
||||
#else
|
||||
hdma_tim.Init.Channel = dmaChannel;
|
||||
|
@ -123,10 +123,12 @@ bool ws2811LedStripHardwareInit(ioTag_t ioTag)
|
|||
hdma_tim.Init.MemDataAlignment = DMA_MDATAALIGN_WORD;
|
||||
hdma_tim.Init.Mode = DMA_NORMAL;
|
||||
hdma_tim.Init.Priority = DMA_PRIORITY_HIGH;
|
||||
#if !defined(STM32G4)
|
||||
hdma_tim.Init.FIFOMode = DMA_FIFOMODE_DISABLE;
|
||||
hdma_tim.Init.FIFOThreshold = DMA_FIFO_THRESHOLD_FULL;
|
||||
hdma_tim.Init.MemBurst = DMA_MBURST_SINGLE;
|
||||
hdma_tim.Init.PeriphBurst = DMA_PBURST_SINGLE;
|
||||
#endif
|
||||
|
||||
/* Set hdma_tim instance */
|
||||
hdma_tim.Instance = (DMA_ARCH_TYPE *)dmaRef;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue