From 955ea5c7fbfdc9800c382e89360d1ecb329dccbf Mon Sep 17 00:00:00 2001 From: Jack Humbert Date: Sat, 23 Jun 2018 16:49:30 -0400 Subject: [PATCH] A3 doing fine --- drivers/arm/ws2812.c | 5 ++--- keyboards/qwiic_hub/qwiic_hub.c | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/arm/ws2812.c b/drivers/arm/ws2812.c index eaa9608b7..28ee12004 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 5c55df1a5..79f021810 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();