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:
Michael Keller 2019-03-07 03:52:54 +13:00 committed by GitHub
commit 6792e4d166
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 0 deletions

View File

@ -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);