mirror of https://github.com/rusefi/rusefi.git
cleaner HAL usage
This commit is contained in:
parent
777c539cac
commit
c2c5d5b01f
|
@ -33,6 +33,9 @@ void initWS2812()
|
|||
[3] = {.mode = WS2812_TIM_CH == 3 ? PWM_OUTPUT_ACTIVE_HIGH : PWM_OUTPUT_DISABLED, .callback = NULL}, // Turn on the channel we care about
|
||||
},
|
||||
.cr2 = 0,
|
||||
#if STM32_PWM_USE_ADVANCED
|
||||
.bdtr = 0,
|
||||
#endif
|
||||
.dier = TIM_DIER_UDE, // DMA on update event for next period
|
||||
};
|
||||
|
||||
|
|
|
@ -193,17 +193,20 @@ public:
|
|||
}
|
||||
|
||||
const PWMConfig pwmcfg = {
|
||||
c_timerFrequency,
|
||||
m_period,
|
||||
nullptr,
|
||||
{
|
||||
.frequency = c_timerFrequency,
|
||||
.period = m_period,
|
||||
.callback = nullptr,
|
||||
.channels = {
|
||||
{PWM_OUTPUT_ACTIVE_HIGH, nullptr},
|
||||
{PWM_OUTPUT_ACTIVE_HIGH, nullptr},
|
||||
{PWM_OUTPUT_ACTIVE_HIGH, nullptr},
|
||||
{PWM_OUTPUT_ACTIVE_HIGH, nullptr}
|
||||
},
|
||||
0,
|
||||
0
|
||||
.cr2 = 0,
|
||||
#if STM32_PWM_USE_ADVANCED
|
||||
.bdtr = 0,
|
||||
#endif
|
||||
.dier = 0,
|
||||
};
|
||||
|
||||
// Start the timer running
|
||||
|
|
Loading…
Reference in New Issue