mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-24 16:55:36 +03:00
Merge pull request #7720 from klutvott123/led-strip-dma-fix
LED STRIP Use circular DMA for single colour mode only
This commit is contained in:
commit
6792e4d166
1 changed files with 5 additions and 0 deletions
|
@ -197,7 +197,12 @@ bool ws2811LedStripHardwareInit(ioTag_t ioTag)
|
|||
DMA_InitStructure.DMA_Priority = DMA_Priority_High;
|
||||
DMA_InitStructure.DMA_M2M = DMA_M2M_Disable;
|
||||
#endif
|
||||
|
||||
#if defined(USE_WS2811_SINGLE_COLOUR)
|
||||
DMA_InitStructure.DMA_Mode = DMA_Mode_Circular;
|
||||
#else
|
||||
DMA_InitStructure.DMA_Mode = DMA_Mode_Normal;
|
||||
#endif
|
||||
|
||||
DMA_Init(dmaRef, &DMA_InitStructure);
|
||||
TIM_DMACmd(timer, timerDmaSource(timerHardware->channel), ENABLE);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue