mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-23 08:15:30 +03:00
Revert "Remove superfluous timerHardware properties"
This reverts commit 4924894f41
.
Just too many combinations on the F3 for using a simple mapping table - wastes too much memory.
Will move LED Strip to allocation based on timerHardware_t array once DSHOT is merged (uses same dma requirements).
This commit is contained in:
parent
c96bb34fda
commit
e840bbe83c
80 changed files with 564 additions and 581 deletions
|
@ -36,6 +36,7 @@
|
|||
#define WS2811_TIMER TIM16
|
||||
#define WS2811_DMA_CHANNEL DMA1_Channel3
|
||||
#define WS2811_DMA_HANDLER_IDENTIFER DMA1_CH3_HANDLER
|
||||
#define WS2811_TIMER_GPIO_AF GPIO_AF_1
|
||||
#endif
|
||||
|
||||
static IO_t ws2811IO = IO_NONE;
|
||||
|
@ -62,7 +63,7 @@ void ws2811LedStripHardwareInit(void)
|
|||
ws2811IO = IOGetByTag(IO_TAG(WS2811_PIN));
|
||||
/* GPIOA Configuration: TIM5 Channel 1 as alternate function push-pull */
|
||||
IOInit(ws2811IO, OWNER_LED_STRIP, RESOURCE_OUTPUT, 0);
|
||||
IOConfigGPIOAF(ws2811IO, IO_CONFIG(GPIO_Mode_AF, GPIO_Speed_50MHz, GPIO_OType_PP, GPIO_PuPd_UP), timerGPIOAF(WS2811_TIMER));
|
||||
IOConfigGPIOAF(ws2811IO, IO_CONFIG(GPIO_Mode_AF, GPIO_Speed_50MHz, GPIO_OType_PP, GPIO_PuPd_UP), WS2811_TIMER_GPIO_AF);
|
||||
|
||||
RCC_ClockCmd(timerRCC(WS2811_TIMER), ENABLE);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue