Fix F4 ledstip
This commit is contained in:
parent
7f8758ddd2
commit
00692145ef
|
@ -39,7 +39,11 @@
|
|||
#include "drivers/dma.h"
|
||||
#include "drivers/light_ws2811strip.h"
|
||||
|
||||
#if defined(STM32F4)
|
||||
uint32_t ledStripDMABuffer[WS2811_DMA_BUFFER_SIZE];
|
||||
#else
|
||||
uint8_t ledStripDMABuffer[WS2811_DMA_BUFFER_SIZE];
|
||||
#endif
|
||||
volatile uint8_t ws2811LedDataTransferInProgress = 0;
|
||||
|
||||
static hsvColor_t ledColorBuffer[WS2811_LED_STRIP_LENGTH];
|
||||
|
|
|
@ -51,5 +51,9 @@ void setStripColors(const hsvColor_t *colors);
|
|||
|
||||
bool isWS2811LedStripReady(void);
|
||||
|
||||
#if defined(STM32F4)
|
||||
extern uint32_t ledStripDMABuffer[WS2811_DMA_BUFFER_SIZE];
|
||||
#else
|
||||
extern uint8_t ledStripDMABuffer[WS2811_DMA_BUFFER_SIZE];
|
||||
#endif
|
||||
extern volatile uint8_t ws2811LedDataTransferInProgress;
|
||||
|
|
|
@ -50,7 +50,7 @@ static void WS2811_DMA_IRQHandler(dmaChannelDescriptor_t *descriptor)
|
|||
if (DMA_GET_FLAG_STATUS(descriptor, DMA_IT_TCIF)) {
|
||||
ws2811LedDataTransferInProgress = 0;
|
||||
DMA_Cmd(descriptor->stream, DISABLE);
|
||||
TIM_DMACmd(TIM5, TIM_DMA_CC1, DISABLE);
|
||||
TIM_DMACmd(WS2811_TIMER, timDMASource, DISABLE);
|
||||
DMA_CLEAR_FLAG(descriptor, DMA_IT_TCIF);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue