mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-23 16:25:31 +03:00
Merge pull request #1500 from blckmn/led_tidy
Small Led tidy & fix NAZE hardfault
This commit is contained in:
commit
c9330f75b0
7 changed files with 31 additions and 35 deletions
|
@ -30,9 +30,6 @@
|
|||
#include "rcc.h"
|
||||
#include "timer.h"
|
||||
|
||||
#define WS2811_TIMER_HZ 24000000
|
||||
#define WS2811_TIMER_PERIOD 29
|
||||
|
||||
static IO_t ws2811IO = IO_NONE;
|
||||
bool ws2811Initialised = false;
|
||||
static DMA_Channel_TypeDef *dmaChannel = NULL;
|
||||
|
@ -93,6 +90,7 @@ void ws2811LedStripHardwareInit(ioTag_t ioTag)
|
|||
|
||||
/* configure DMA */
|
||||
/* DMA1 Channel6 Config */
|
||||
dmaChannel = timerHardware->dmaChannel;
|
||||
DMA_DeInit(dmaChannel);
|
||||
|
||||
DMA_StructInit(&DMA_InitStructure);
|
||||
|
@ -118,10 +116,7 @@ void ws2811LedStripHardwareInit(ioTag_t ioTag)
|
|||
dmaInit(timerHardware->dmaIrqHandler, OWNER_LED_STRIP, 0);
|
||||
dmaSetHandler(timerHardware->dmaIrqHandler, WS2811_DMA_IRQHandler, NVIC_PRIO_WS2811_DMA, 0);
|
||||
|
||||
const hsvColor_t hsv_white = { 0, 255, 255};
|
||||
ws2811Initialised = true;
|
||||
setStripColor(&hsv_white);
|
||||
ws2811UpdateStrip();
|
||||
}
|
||||
|
||||
void ws2811LedStripDMAEnable(void)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue