diff --git a/drivers/arm/ws2812.c b/drivers/arm/ws2812.c index eaa9608b7d..28ee120048 100644 --- a/drivers/arm/ws2812.c +++ b/drivers/arm/ws2812.c @@ -12,7 +12,7 @@ static uint8_t *fb; static int sLeds; static stm32_gpio_t *sPort; static uint32_t sMask; -uint8_t* dma_source; +uint16_t* dma_source; void setColor(uint8_t color, uint8_t *buf,uint32_t mask){ int i; @@ -77,8 +77,7 @@ void ledDriverInit(int leds, stm32_gpio_t *port, uint32_t mask, uint8_t **o_fb) *o_fb=fb; int j; for (j = 0; j < (sLeds) * 24; j++) fb[j] = 0; - dma_source[0] = sMask & 0xFF; - dma_source[1] = sMask >> 8; + dma_source[0] = sMask; // DMA stream 2, triggered by channel3 pwm signal. if FB indicates, reset output value early to indicate "0" bit to ws2812 dmaStreamAllocate(STM32_DMA1_STREAM2, 10, NULL, NULL); dmaStreamSetPeripheral(STM32_DMA1_STREAM2, &(sPort->BSRR.H.clear)); diff --git a/keyboards/qwiic_hub/qwiic_hub.c b/keyboards/qwiic_hub/qwiic_hub.c index 5c55df1a5e..79f0218108 100644 --- a/keyboards/qwiic_hub/qwiic_hub.c +++ b/keyboards/qwiic_hub/qwiic_hub.c @@ -19,7 +19,7 @@ uint8_t *o_fb; void matrix_init_kb(void) { - ledDriverInit(1, GPIOA, 0b100000000, &o_fb); + ledDriverInit(1, GPIOA, 0b1000, &o_fb); testPatternFB(o_fb); matrix_init_user();