Skip to content

Commit 6b94df2

Browse files
committed
potential ws2811 bugfix
1 parent 645b959 commit 6b94df2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

blades/stm32l4_ws2811.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ class WS2811EngineSTM32L4 : public WS2811Engine {
260260
ws2811_dma_done = false;
261261
pin_ = pin;
262262

263-
if (g_PWMInstances[instance] != WS2811_TIMER_INSTANCE) {
263+
if (instance == PWM_INSTANCE_NONE || g_PWMInstances[instance] != WS2811_TIMER_INSTANCE) {
264264
TRACE(BLADE, "proxy");
265265
// Proxy mode, make sure GPIO A/B/C doesn't fall asleep
266266
RCC->AHB2SMENR |= (RCC_AHB2SMENR_GPIOASMEN | RCC_AHB2SMENR_GPIOBSMEN | RCC_AHB2SMENR_GPIOCSMEN);

0 commit comments

Comments
 (0)