diff options
Diffstat (limited to 'platforms/chibios/drivers')
-rw-r--r-- | platforms/chibios/drivers/vendor/RP/RP2040/ws2812_vendor.c | 6 | ||||
-rw-r--r-- | platforms/chibios/drivers/ws2812_bitbang.c | 10 | ||||
-rw-r--r-- | platforms/chibios/drivers/ws2812_pwm.c | 2 | ||||
-rw-r--r-- | platforms/chibios/drivers/ws2812_spi.c | 10 |
4 files changed, 14 insertions, 14 deletions
diff --git a/platforms/chibios/drivers/vendor/RP/RP2040/ws2812_vendor.c b/platforms/chibios/drivers/vendor/RP/RP2040/ws2812_vendor.c index a46b099195..99a6cfaba9 100644 --- a/platforms/chibios/drivers/vendor/RP/RP2040/ws2812_vendor.c +++ b/platforms/chibios/drivers/vendor/RP/RP2040/ws2812_vendor.c @@ -185,7 +185,7 @@ bool ws2812_init(void) { (pio_idx == 0 ? PAL_MODE_ALTERNATE_PIO0 : PAL_MODE_ALTERNATE_PIO1); // clang-format on - palSetLineMode(RGB_DI_PIN, rgb_pin_mode); + palSetLineMode(WS2812_DI_PIN, rgb_pin_mode); STATE_MACHINE = pio_claim_unused_sm(pio, true); if (STATE_MACHINE < 0) { @@ -195,11 +195,11 @@ bool ws2812_init(void) { uint offset = pio_add_program(pio, &ws2812_program); - pio_sm_set_consecutive_pindirs(pio, STATE_MACHINE, RGB_DI_PIN, 1, true); + pio_sm_set_consecutive_pindirs(pio, STATE_MACHINE, WS2812_DI_PIN, 1, true); pio_sm_config config = pio_get_default_sm_config(); sm_config_set_wrap(&config, offset + WS2812_WRAP_TARGET, offset + WS2812_WRAP); - sm_config_set_sideset_pins(&config, RGB_DI_PIN); + sm_config_set_sideset_pins(&config, WS2812_DI_PIN); sm_config_set_fifo_join(&config, PIO_FIFO_JOIN_TX); #if defined(WS2812_EXTERNAL_PULLUP) diff --git a/platforms/chibios/drivers/ws2812_bitbang.c b/platforms/chibios/drivers/ws2812_bitbang.c index 55ac333b1e..d05deb1a50 100644 --- a/platforms/chibios/drivers/ws2812_bitbang.c +++ b/platforms/chibios/drivers/ws2812_bitbang.c @@ -53,22 +53,22 @@ void sendByte(uint8_t byte) { // using something like wait_ns(is_one ? T1L : T0L) here throws off timings if (is_one) { // 1 - writePinHigh(RGB_DI_PIN); + writePinHigh(WS2812_DI_PIN); wait_ns(WS2812_T1H); - writePinLow(RGB_DI_PIN); + writePinLow(WS2812_DI_PIN); wait_ns(WS2812_T1L); } else { // 0 - writePinHigh(RGB_DI_PIN); + writePinHigh(WS2812_DI_PIN); wait_ns(WS2812_T0H); - writePinLow(RGB_DI_PIN); + writePinLow(WS2812_DI_PIN); wait_ns(WS2812_T0L); } } } void ws2812_init(void) { - palSetLineMode(RGB_DI_PIN, WS2812_OUTPUT_MODE); + palSetLineMode(WS2812_DI_PIN, WS2812_OUTPUT_MODE); } // Setleds for standard RGB diff --git a/platforms/chibios/drivers/ws2812_pwm.c b/platforms/chibios/drivers/ws2812_pwm.c index c4a591c10b..04c8279a97 100644 --- a/platforms/chibios/drivers/ws2812_pwm.c +++ b/platforms/chibios/drivers/ws2812_pwm.c @@ -308,7 +308,7 @@ void ws2812_init(void) { for (i = 0; i < WS2812_RESET_BIT_N; i++) ws2812_frame_buffer[i + WS2812_COLOR_BIT_N] = 0; // All reset bits are zero - palSetLineMode(RGB_DI_PIN, WS2812_OUTPUT_MODE); + palSetLineMode(WS2812_DI_PIN, WS2812_OUTPUT_MODE); // PWM Configuration //#pragma GCC diagnostic ignored "-Woverride-init" // Turn off override-init warning for this struct. We use the overriding ability to set a "default" channel config diff --git a/platforms/chibios/drivers/ws2812_spi.c b/platforms/chibios/drivers/ws2812_spi.c index 03ffbd7f82..c28f5007f1 100644 --- a/platforms/chibios/drivers/ws2812_spi.c +++ b/platforms/chibios/drivers/ws2812_spi.c @@ -136,7 +136,7 @@ static void set_led_color_rgb(LED_TYPE color, int pos) { } void ws2812_init(void) { - palSetLineMode(RGB_DI_PIN, WS2812_MOSI_OUTPUT_MODE); + palSetLineMode(WS2812_DI_PIN, WS2812_MOSI_OUTPUT_MODE); #ifdef WS2812_SPI_SCK_PIN palSetLineMode(WS2812_SPI_SCK_PIN, WS2812_SCK_OUTPUT_MODE); @@ -150,8 +150,8 @@ void ws2812_init(void) { WS2812_SPI_BUFFER_MODE, # endif NULL, // end_cb - PAL_PORT(RGB_DI_PIN), - PAL_PAD(RGB_DI_PIN), + PAL_PORT(WS2812_DI_PIN), + PAL_PAD(WS2812_DI_PIN), # if defined(WB32F3G71xx) || defined(WB32FQ95xx) 0, 0, @@ -170,8 +170,8 @@ void ws2812_init(void) { # endif NULL, // data_cb NULL, // error_cb - PAL_PORT(RGB_DI_PIN), - PAL_PAD(RGB_DI_PIN), + PAL_PORT(WS2812_DI_PIN), + PAL_PAD(WS2812_DI_PIN), WS2812_SPI_DIVISOR_CR1_BR_X, 0 #endif |