From 569b0c70beceb1bbd2b2c5e9cc4f0ff9209995f3 Mon Sep 17 00:00:00 2001 From: Ryan Date: Sun, 3 Mar 2024 04:16:47 +1100 Subject: [PATCH] WS2812 PWM: prefix for DMA defines (#23111) * WS2812 PWM: prefix for DMA defines * Add backward compatibility defines --- docs/ws2812_driver.md | 6 +- keyboards/acheron/apollo/87h/delta/config.h | 4 +- keyboards/acheron/apollo/87htsc/config.h | 4 +- keyboards/acheron/apollo/88htsc/config.h | 4 +- keyboards/acheron/athena/alpha/config.h | 4 +- keyboards/acheron/athena/beta/config.h | 4 +- keyboards/acheron/shark/beta/config.h | 4 +- keyboards/acheron/themis/87h/config.h | 4 +- keyboards/acheron/themis/87htsc/config.h | 4 +- keyboards/acheron/themis/88htsc/config.h | 4 +- keyboards/artifact/lvl/rev_hs01/config.h | 4 +- keyboards/aurora65/config.h | 4 +- .../charybdis/3x5/blackpill/config.h | 4 +- .../charybdis/3x5/v2/stemcell/config.h | 4 +- .../charybdis/3x6/blackpill/config.h | 4 +- .../charybdis/3x6/v2/stemcell/config.h | 4 +- .../charybdis/4x6/blackpill/config.h | 4 +- .../charybdis/4x6/v2/stemcell/config.h | 4 +- keyboards/bastardkb/scylla/blackpill/config.h | 4 +- .../bastardkb/scylla/v2/stemcell/config.h | 4 +- .../bastardkb/skeletyl/blackpill/config.h | 4 +- .../bastardkb/skeletyl/v2/stemcell/config.h | 4 +- .../bastardkb/tbkmini/blackpill/config.h | 4 +- .../bastardkb/tbkmini/v2/stemcell/config.h | 4 +- keyboards/bestway/config.h | 4 +- keyboards/black_hellebore/config.h | 4 +- keyboards/crypt_macro/config.h | 4 +- keyboards/custommk/evo70_r2/config.h | 4 +- keyboards/ebastler/isometria_75/rev1/config.h | 4 +- keyboards/edi/hardlight/mk2/config.h | 4 +- keyboards/geekboards/macropad_v2/config.h | 4 +- keyboards/handwired/cyberstar/config.h | 4 +- keyboards/handwired/macroboard/config.h | 4 +- .../tractyl_manuform/5x6_right/f303/config.h | 4 +- .../tractyl_manuform/5x6_right/f411/config.h | 4 +- keyboards/jacky_studio/piggy60/rev2/config.h | 4 +- keyboards/kabedon/kabedon98e/config.h | 4 +- keyboards/kprepublic/bm16a/v2/config.h | 4 +- keyboards/linworks/whale75/config.h | 4 +- keyboards/loki65/config.h | 4 +- keyboards/mariorion_v25/prod/config.h | 6 +- keyboards/mariorion_v25/proto/config.h | 6 +- keyboards/meetlab/kalice/config.h | 4 +- keyboards/meetlab/rena/config.h | 4 +- keyboards/misterknife/knife66/config.h | 4 +- keyboards/misterknife/knife66_iso/config.h | 4 +- keyboards/mode/m256wh/config.h | 4 +- keyboards/mode/m256ws/config.h | 4 +- keyboards/mode/m60h/config.h | 4 +- keyboards/mode/m60h_f/config.h | 4 +- keyboards/mode/m60s/config.h | 4 +- keyboards/mwstudio/mmk_3/config.h | 4 +- keyboards/mwstudio/mw660/config.h | 4 +- keyboards/novelkeys/nk20/config.h | 4 +- keyboards/novelkeys/nk65b/config.h | 4 +- keyboards/novelkeys/nk87b/config.h | 4 +- keyboards/novelkeys/nk_plus/config.h | 4 +- keyboards/planck/ez/config.h | 4 +- keyboards/planck/rev6/config.h | 4 +- keyboards/planck/rev6_drop/config.h | 4 +- keyboards/planck/rev7/config.h | 4 +- keyboards/preonic/rev3/config.h | 4 +- keyboards/preonic/rev3_drop/config.h | 4 +- keyboards/protozoa/p01/config.h | 4 +- keyboards/rgbkb/mun/config.h | 4 +- keyboards/rgbkb/sol3/config.h | 4 +- keyboards/skyloong/dt40/config.h | 4 +- keyboards/smithrune/iron165r2/f411/config.h | 4 +- keyboards/smithrune/magnus/m75h/config.h | 4 +- keyboards/smithrune/magnus/m75s/config.h | 4 +- keyboards/spaceholdings/nebula68/config.h | 4 +- keyboards/splitkb/kyria/rev1/config.h | 6 +- keyboards/splitkb/kyria/rev2/config.h | 6 +- keyboards/tg67/config.h | 4 +- keyboards/tkw/grandiceps/config.h | 4 +- keyboards/tkw/stoutgat/v2/config.h | 4 +- keyboards/tzarc/djinn/config.h | 6 +- keyboards/tzarc/ghoul/rev1/stm32/config.h | 4 +- keyboards/viendi8l/config.h | 4 +- keyboards/vinhcatba/uncertainty/config.h | 4 +- keyboards/xelus/ninjin/config.h | 4 +- keyboards/xelus/valor/rev2/config.h | 6 +- keyboards/yandrstudio/buff67v3/config.h | 4 +- keyboards/yandrstudio/eau_r2/config.h | 4 +- keyboards/yandrstudio/nightstar75/config.h | 4 +- keyboards/yandrstudio/nz64/config.h | 4 +- keyboards/yandrstudio/nz67v2/config.h | 4 +- keyboards/yandrstudio/tg67/config.h | 4 +- keyboards/yandrstudio/yr6095/config.h | 4 +- keyboards/yandrstudio/yr80/config.h | 4 +- keyboards/yanghu/unicorne/config.h | 4 +- keyboards/ymdk/id75/config.h | 4 +- keyboards/ymdk/ymd75/rev4/iso/config.h | 4 +- keyboards/zvecr/split_blackpill/config.h | 4 +- keyboards/zvecr/zv48/config.h | 4 +- .../chibios/boards/BONSAI_C4/configs/config.h | 8 +-- .../drivers/vendor/RP/RP2040/ws2812_vendor.c | 18 +++--- platforms/chibios/drivers/ws2812_pwm.c | 60 +++++++++++-------- 98 files changed, 246 insertions(+), 234 deletions(-) diff --git a/docs/ws2812_driver.md b/docs/ws2812_driver.md index 244d39dbe0..006529cc8a 100644 --- a/docs/ws2812_driver.md +++ b/docs/ws2812_driver.md @@ -208,9 +208,9 @@ The following `#define`s apply only to the `pwm` driver: |`WS2812_PWM_DRIVER` |`PWMD2` |The PWM driver to use | |`WS2812_PWM_CHANNEL` |`2` |The PWM channel to use | |`WS2812_PWM_PAL_MODE` |`2` |The pin alternative function to use | -|`WS2812_DMA_STREAM` |`STM32_DMA1_STREAM2`|The DMA Stream for `TIMx_UP` | -|`WS2812_DMA_CHANNEL` |`2` |The DMA Channel for `TIMx_UP` | -|`WS2812_DMAMUX_ID` |*Not defined* |The DMAMUX configuration for `TIMx_UP` - only required if your MCU has a DMAMUX peripheral| +|`WS2812_PWM_DMA_STREAM` |`STM32_DMA1_STREAM2`|The DMA Stream for `TIMx_UP` | +|`WS2812_PWM_DMA_CHANNEL` |`2` |The DMA Channel for `TIMx_UP` | +|`WS2812_PWM_DMAMUX_ID` |*Not defined* |The DMAMUX configuration for `TIMx_UP` - only required if your MCU has a DMAMUX peripheral| |`WS2812_PWM_COMPLEMENTARY_OUTPUT`|*Not defined* |Whether the PWM output is complementary (`TIMx_CHyN`) | ?> Using a complementary timer output (`TIMx_CHyN`) is possible only for advanced-control timers (1, 8 and 20 on STM32), and the `STM32_PWM_USE_ADVANCED` option in `mcuconf.h` must be set to `TRUE`. Complementary outputs of general-purpose timers are not supported due to ChibiOS limitations. diff --git a/keyboards/acheron/apollo/87h/delta/config.h b/keyboards/acheron/apollo/87h/delta/config.h index 578a443e88..17c09f0f57 100644 --- a/keyboards/acheron/apollo/87h/delta/config.h +++ b/keyboards/acheron/apollo/87h/delta/config.h @@ -28,5 +28,5 @@ along with this program. If not, see . #define WS2812_PWM_DRIVER PWMD1 #define WS2812_PWM_CHANNEL 3 #define WS2812_PWM_PAL_MODE 1 -#define WS2812_DMA_STREAM STM32_DMA2_STREAM5 -#define WS2812_DMA_CHANNEL 6 +#define WS2812_PWM_DMA_STREAM STM32_DMA2_STREAM5 +#define WS2812_PWM_DMA_CHANNEL 6 diff --git a/keyboards/acheron/apollo/87htsc/config.h b/keyboards/acheron/apollo/87htsc/config.h index 578a443e88..17c09f0f57 100644 --- a/keyboards/acheron/apollo/87htsc/config.h +++ b/keyboards/acheron/apollo/87htsc/config.h @@ -28,5 +28,5 @@ along with this program. If not, see . #define WS2812_PWM_DRIVER PWMD1 #define WS2812_PWM_CHANNEL 3 #define WS2812_PWM_PAL_MODE 1 -#define WS2812_DMA_STREAM STM32_DMA2_STREAM5 -#define WS2812_DMA_CHANNEL 6 +#define WS2812_PWM_DMA_STREAM STM32_DMA2_STREAM5 +#define WS2812_PWM_DMA_CHANNEL 6 diff --git a/keyboards/acheron/apollo/88htsc/config.h b/keyboards/acheron/apollo/88htsc/config.h index 578a443e88..17c09f0f57 100644 --- a/keyboards/acheron/apollo/88htsc/config.h +++ b/keyboards/acheron/apollo/88htsc/config.h @@ -28,5 +28,5 @@ along with this program. If not, see . #define WS2812_PWM_DRIVER PWMD1 #define WS2812_PWM_CHANNEL 3 #define WS2812_PWM_PAL_MODE 1 -#define WS2812_DMA_STREAM STM32_DMA2_STREAM5 -#define WS2812_DMA_CHANNEL 6 +#define WS2812_PWM_DMA_STREAM STM32_DMA2_STREAM5 +#define WS2812_PWM_DMA_CHANNEL 6 diff --git a/keyboards/acheron/athena/alpha/config.h b/keyboards/acheron/athena/alpha/config.h index ba5c2dedf2..c9f1d29f24 100644 --- a/keyboards/acheron/athena/alpha/config.h +++ b/keyboards/acheron/athena/alpha/config.h @@ -27,8 +27,8 @@ along with this program. If not, see . #define WS2812_PWM_DRIVER PWMD1 #define WS2812_PWM_CHANNEL 3 #define WS2812_PWM_PAL_MODE 1 -#define WS2812_DMA_STREAM STM32_DMA2_STREAM5 -#define WS2812_DMA_CHANNEL 6 +#define WS2812_PWM_DMA_STREAM STM32_DMA2_STREAM5 +#define WS2812_PWM_DMA_CHANNEL 6 // If this is defined, the caps lock LED will turn on and off according to the state of caps lock. If not, the LED will shine like all other LEDs despite the caps lock state. #define CAPSLOCK_INDICATOR diff --git a/keyboards/acheron/athena/beta/config.h b/keyboards/acheron/athena/beta/config.h index 30c29fa686..b2a8d2edf8 100644 --- a/keyboards/acheron/athena/beta/config.h +++ b/keyboards/acheron/athena/beta/config.h @@ -28,8 +28,8 @@ along with this program. If not, see . #define WS2812_PWM_DRIVER PWMD1 #define WS2812_PWM_CHANNEL 3 #define WS2812_PWM_PAL_MODE 1 -#define WS2812_DMA_STREAM STM32_DMA2_STREAM5 -#define WS2812_DMA_CHANNEL 6 +#define WS2812_PWM_DMA_STREAM STM32_DMA2_STREAM5 +#define WS2812_PWM_DMA_CHANNEL 6 // If this is defined, the caps lock LED will turn on and off according to the state of caps lock. If not, the LED will shine like all other LEDs despite the caps lock state. #define CAPSLOCK_INDICATOR diff --git a/keyboards/acheron/shark/beta/config.h b/keyboards/acheron/shark/beta/config.h index d862fd016d..1182d39d3b 100644 --- a/keyboards/acheron/shark/beta/config.h +++ b/keyboards/acheron/shark/beta/config.h @@ -27,7 +27,7 @@ along with this program. If not, see . #define WS2812_PWM_DRIVER PWMD1 #define WS2812_PWM_CHANNEL 3 #define WS2812_PWM_PAL_MODE 1 -#define WS2812_DMA_STREAM STM32_DMA2_STREAM5 -#define WS2812_DMA_CHANNEL 6 +#define WS2812_PWM_DMA_STREAM STM32_DMA2_STREAM5 +#define WS2812_PWM_DMA_CHANNEL 6 #define EEPROM_I2C_24LC256 diff --git a/keyboards/acheron/themis/87h/config.h b/keyboards/acheron/themis/87h/config.h index ed1229c779..fb2a5e1ed7 100644 --- a/keyboards/acheron/themis/87h/config.h +++ b/keyboards/acheron/themis/87h/config.h @@ -24,5 +24,5 @@ along with this program. If not, see . #define WS2812_PWM_DRIVER PWMD1 #define WS2812_PWM_CHANNEL 3 #define WS2812_PWM_PAL_MODE 1 -#define WS2812_DMA_STREAM STM32_DMA2_STREAM5 -#define WS2812_DMA_CHANNEL 6 +#define WS2812_PWM_DMA_STREAM STM32_DMA2_STREAM5 +#define WS2812_PWM_DMA_CHANNEL 6 diff --git a/keyboards/acheron/themis/87htsc/config.h b/keyboards/acheron/themis/87htsc/config.h index ed1229c779..fb2a5e1ed7 100644 --- a/keyboards/acheron/themis/87htsc/config.h +++ b/keyboards/acheron/themis/87htsc/config.h @@ -24,5 +24,5 @@ along with this program. If not, see . #define WS2812_PWM_DRIVER PWMD1 #define WS2812_PWM_CHANNEL 3 #define WS2812_PWM_PAL_MODE 1 -#define WS2812_DMA_STREAM STM32_DMA2_STREAM5 -#define WS2812_DMA_CHANNEL 6 +#define WS2812_PWM_DMA_STREAM STM32_DMA2_STREAM5 +#define WS2812_PWM_DMA_CHANNEL 6 diff --git a/keyboards/acheron/themis/88htsc/config.h b/keyboards/acheron/themis/88htsc/config.h index ed1229c779..fb2a5e1ed7 100644 --- a/keyboards/acheron/themis/88htsc/config.h +++ b/keyboards/acheron/themis/88htsc/config.h @@ -24,5 +24,5 @@ along with this program. If not, see . #define WS2812_PWM_DRIVER PWMD1 #define WS2812_PWM_CHANNEL 3 #define WS2812_PWM_PAL_MODE 1 -#define WS2812_DMA_STREAM STM32_DMA2_STREAM5 -#define WS2812_DMA_CHANNEL 6 +#define WS2812_PWM_DMA_STREAM STM32_DMA2_STREAM5 +#define WS2812_PWM_DMA_CHANNEL 6 diff --git a/keyboards/artifact/lvl/rev_hs01/config.h b/keyboards/artifact/lvl/rev_hs01/config.h index 674fb1110c..8dec2b56f2 100755 --- a/keyboards/artifact/lvl/rev_hs01/config.h +++ b/keyboards/artifact/lvl/rev_hs01/config.h @@ -19,7 +19,7 @@ along with this program. If not, see . /* RGB Light */ #define WS2812_PWM_DRIVER PWMD1 -#define WS2812_DMA_STREAM STM32_DMA1_STREAM5 -#define WS2812_DMA_CHANNEL 5 +#define WS2812_PWM_DMA_STREAM STM32_DMA1_STREAM5 +#define WS2812_PWM_DMA_CHANNEL 5 #define WS2812_BYTE_ORDER WS2812_BYTE_ORDER_RGB diff --git a/keyboards/aurora65/config.h b/keyboards/aurora65/config.h index ec0853212c..1b51399c8d 100644 --- a/keyboards/aurora65/config.h +++ b/keyboards/aurora65/config.h @@ -22,6 +22,6 @@ along with this program. If not, see . #define WS2812_PWM_CHANNEL 3 #define WS2812_PWM_PAL_MODE 2 #define WS2812_PWM_COMPLEMENTARY_OUTPUT -#define WS2812_DMA_STREAM STM32_DMA1_STREAM5 -#define WS2812_DMA_CHANNEL 5 +#define WS2812_PWM_DMA_STREAM STM32_DMA1_STREAM5 +#define WS2812_PWM_DMA_CHANNEL 5 #define WS2812_BYTE_ORDER WS2812_BYTE_ORDER_RGB diff --git a/keyboards/bastardkb/charybdis/3x5/blackpill/config.h b/keyboards/bastardkb/charybdis/3x5/blackpill/config.h index 68901305c4..0467a1261f 100644 --- a/keyboards/bastardkb/charybdis/3x5/blackpill/config.h +++ b/keyboards/bastardkb/charybdis/3x5/blackpill/config.h @@ -27,8 +27,8 @@ #define WS2812_PWM_CHANNEL 2 #define WS2812_PWM_PAL_MODE 1 #define WS2812_EXTERNAL_PULLUP -#define WS2812_DMA_STREAM STM32_DMA1_STREAM1 -#define WS2812_DMA_CHANNEL 3 +#define WS2812_PWM_DMA_STREAM STM32_DMA1_STREAM1 +#define WS2812_PWM_DMA_CHANNEL 3 #define WS2812_PWM_TARGET_PERIOD 800000 /* Serial configuration for split keyboard. */ diff --git a/keyboards/bastardkb/charybdis/3x5/v2/stemcell/config.h b/keyboards/bastardkb/charybdis/3x5/v2/stemcell/config.h index 6aa20712f6..7a2bdd0aa8 100644 --- a/keyboards/bastardkb/charybdis/3x5/v2/stemcell/config.h +++ b/keyboards/bastardkb/charybdis/3x5/v2/stemcell/config.h @@ -30,8 +30,8 @@ #define WS2812_PWM_DRIVER PWMD2 #define WS2812_PWM_CHANNEL 4 #define WS2812_PWM_PAL_MODE 1 -#define WS2812_DMA_STREAM STM32_DMA1_STREAM7 -#define WS2812_DMA_CHANNEL 3 +#define WS2812_PWM_DMA_STREAM STM32_DMA1_STREAM7 +#define WS2812_PWM_DMA_CHANNEL 3 /* CRC. */ #define CRC8_USE_TABLE diff --git a/keyboards/bastardkb/charybdis/3x6/blackpill/config.h b/keyboards/bastardkb/charybdis/3x6/blackpill/config.h index 985e79fabd..b41a1d3f57 100644 --- a/keyboards/bastardkb/charybdis/3x6/blackpill/config.h +++ b/keyboards/bastardkb/charybdis/3x6/blackpill/config.h @@ -25,8 +25,8 @@ #define WS2812_PWM_CHANNEL 2 #define WS2812_PWM_PAL_MODE 1 #define WS2812_EXTERNAL_PULLUP -#define WS2812_DMA_STREAM STM32_DMA1_STREAM1 -#define WS2812_DMA_CHANNEL 3 +#define WS2812_PWM_DMA_STREAM STM32_DMA1_STREAM1 +#define WS2812_PWM_DMA_CHANNEL 3 #define WS2812_PWM_TARGET_PERIOD 800000 /* Serial configuration for split keyboard. */ diff --git a/keyboards/bastardkb/charybdis/3x6/v2/stemcell/config.h b/keyboards/bastardkb/charybdis/3x6/v2/stemcell/config.h index 6aa20712f6..7a2bdd0aa8 100644 --- a/keyboards/bastardkb/charybdis/3x6/v2/stemcell/config.h +++ b/keyboards/bastardkb/charybdis/3x6/v2/stemcell/config.h @@ -30,8 +30,8 @@ #define WS2812_PWM_DRIVER PWMD2 #define WS2812_PWM_CHANNEL 4 #define WS2812_PWM_PAL_MODE 1 -#define WS2812_DMA_STREAM STM32_DMA1_STREAM7 -#define WS2812_DMA_CHANNEL 3 +#define WS2812_PWM_DMA_STREAM STM32_DMA1_STREAM7 +#define WS2812_PWM_DMA_CHANNEL 3 /* CRC. */ #define CRC8_USE_TABLE diff --git a/keyboards/bastardkb/charybdis/4x6/blackpill/config.h b/keyboards/bastardkb/charybdis/4x6/blackpill/config.h index 68901305c4..0467a1261f 100644 --- a/keyboards/bastardkb/charybdis/4x6/blackpill/config.h +++ b/keyboards/bastardkb/charybdis/4x6/blackpill/config.h @@ -27,8 +27,8 @@ #define WS2812_PWM_CHANNEL 2 #define WS2812_PWM_PAL_MODE 1 #define WS2812_EXTERNAL_PULLUP -#define WS2812_DMA_STREAM STM32_DMA1_STREAM1 -#define WS2812_DMA_CHANNEL 3 +#define WS2812_PWM_DMA_STREAM STM32_DMA1_STREAM1 +#define WS2812_PWM_DMA_CHANNEL 3 #define WS2812_PWM_TARGET_PERIOD 800000 /* Serial configuration for split keyboard. */ diff --git a/keyboards/bastardkb/charybdis/4x6/v2/stemcell/config.h b/keyboards/bastardkb/charybdis/4x6/v2/stemcell/config.h index 6aa20712f6..7a2bdd0aa8 100644 --- a/keyboards/bastardkb/charybdis/4x6/v2/stemcell/config.h +++ b/keyboards/bastardkb/charybdis/4x6/v2/stemcell/config.h @@ -30,8 +30,8 @@ #define WS2812_PWM_DRIVER PWMD2 #define WS2812_PWM_CHANNEL 4 #define WS2812_PWM_PAL_MODE 1 -#define WS2812_DMA_STREAM STM32_DMA1_STREAM7 -#define WS2812_DMA_CHANNEL 3 +#define WS2812_PWM_DMA_STREAM STM32_DMA1_STREAM7 +#define WS2812_PWM_DMA_CHANNEL 3 /* CRC. */ #define CRC8_USE_TABLE diff --git a/keyboards/bastardkb/scylla/blackpill/config.h b/keyboards/bastardkb/scylla/blackpill/config.h index 0c40ed74bc..1d86b474ee 100644 --- a/keyboards/bastardkb/scylla/blackpill/config.h +++ b/keyboards/bastardkb/scylla/blackpill/config.h @@ -27,8 +27,8 @@ #define WS2812_PWM_CHANNEL 2 #define WS2812_PWM_PAL_MODE 1 #define WS2812_EXTERNAL_PULLUP -#define WS2812_DMA_STREAM STM32_DMA1_STREAM1 -#define WS2812_DMA_CHANNEL 3 +#define WS2812_PWM_DMA_STREAM STM32_DMA1_STREAM1 +#define WS2812_PWM_DMA_CHANNEL 3 #define WS2812_PWM_TARGET_PERIOD 800000 /* Serial configuration for split keyboard. */ diff --git a/keyboards/bastardkb/scylla/v2/stemcell/config.h b/keyboards/bastardkb/scylla/v2/stemcell/config.h index 0bbfd39aee..ca1cc0f719 100644 --- a/keyboards/bastardkb/scylla/v2/stemcell/config.h +++ b/keyboards/bastardkb/scylla/v2/stemcell/config.h @@ -30,8 +30,8 @@ #define WS2812_PWM_DRIVER PWMD2 #define WS2812_PWM_CHANNEL 4 #define WS2812_PWM_PAL_MODE 1 -#define WS2812_DMA_STREAM STM32_DMA1_STREAM7 -#define WS2812_DMA_CHANNEL 3 +#define WS2812_PWM_DMA_STREAM STM32_DMA1_STREAM7 +#define WS2812_PWM_DMA_CHANNEL 3 /* CRC. */ #define CRC8_USE_TABLE diff --git a/keyboards/bastardkb/skeletyl/blackpill/config.h b/keyboards/bastardkb/skeletyl/blackpill/config.h index 0c40ed74bc..1d86b474ee 100644 --- a/keyboards/bastardkb/skeletyl/blackpill/config.h +++ b/keyboards/bastardkb/skeletyl/blackpill/config.h @@ -27,8 +27,8 @@ #define WS2812_PWM_CHANNEL 2 #define WS2812_PWM_PAL_MODE 1 #define WS2812_EXTERNAL_PULLUP -#define WS2812_DMA_STREAM STM32_DMA1_STREAM1 -#define WS2812_DMA_CHANNEL 3 +#define WS2812_PWM_DMA_STREAM STM32_DMA1_STREAM1 +#define WS2812_PWM_DMA_CHANNEL 3 #define WS2812_PWM_TARGET_PERIOD 800000 /* Serial configuration for split keyboard. */ diff --git a/keyboards/bastardkb/skeletyl/v2/stemcell/config.h b/keyboards/bastardkb/skeletyl/v2/stemcell/config.h index 0bbfd39aee..ca1cc0f719 100644 --- a/keyboards/bastardkb/skeletyl/v2/stemcell/config.h +++ b/keyboards/bastardkb/skeletyl/v2/stemcell/config.h @@ -30,8 +30,8 @@ #define WS2812_PWM_DRIVER PWMD2 #define WS2812_PWM_CHANNEL 4 #define WS2812_PWM_PAL_MODE 1 -#define WS2812_DMA_STREAM STM32_DMA1_STREAM7 -#define WS2812_DMA_CHANNEL 3 +#define WS2812_PWM_DMA_STREAM STM32_DMA1_STREAM7 +#define WS2812_PWM_DMA_CHANNEL 3 /* CRC. */ #define CRC8_USE_TABLE diff --git a/keyboards/bastardkb/tbkmini/blackpill/config.h b/keyboards/bastardkb/tbkmini/blackpill/config.h index 0c40ed74bc..1d86b474ee 100644 --- a/keyboards/bastardkb/tbkmini/blackpill/config.h +++ b/keyboards/bastardkb/tbkmini/blackpill/config.h @@ -27,8 +27,8 @@ #define WS2812_PWM_CHANNEL 2 #define WS2812_PWM_PAL_MODE 1 #define WS2812_EXTERNAL_PULLUP -#define WS2812_DMA_STREAM STM32_DMA1_STREAM1 -#define WS2812_DMA_CHANNEL 3 +#define WS2812_PWM_DMA_STREAM STM32_DMA1_STREAM1 +#define WS2812_PWM_DMA_CHANNEL 3 #define WS2812_PWM_TARGET_PERIOD 800000 /* Serial configuration for split keyboard. */ diff --git a/keyboards/bastardkb/tbkmini/v2/stemcell/config.h b/keyboards/bastardkb/tbkmini/v2/stemcell/config.h index 0bbfd39aee..ca1cc0f719 100644 --- a/keyboards/bastardkb/tbkmini/v2/stemcell/config.h +++ b/keyboards/bastardkb/tbkmini/v2/stemcell/config.h @@ -30,8 +30,8 @@ #define WS2812_PWM_DRIVER PWMD2 #define WS2812_PWM_CHANNEL 4 #define WS2812_PWM_PAL_MODE 1 -#define WS2812_DMA_STREAM STM32_DMA1_STREAM7 -#define WS2812_DMA_CHANNEL 3 +#define WS2812_PWM_DMA_STREAM STM32_DMA1_STREAM7 +#define WS2812_PWM_DMA_CHANNEL 3 /* CRC. */ #define CRC8_USE_TABLE diff --git a/keyboards/bestway/config.h b/keyboards/bestway/config.h index c63a25d9a6..1800a114a0 100644 --- a/keyboards/bestway/config.h +++ b/keyboards/bestway/config.h @@ -18,5 +18,5 @@ #define WS2812_PWM_DRIVER PWMD2 #define WS2812_PWM_CHANNEL 4 -#define WS2812_DMA_STREAM STM32_DMA1_STREAM2 -#define WS2812_DMA_CHANNEL 2 +#define WS2812_PWM_DMA_STREAM STM32_DMA1_STREAM2 +#define WS2812_PWM_DMA_CHANNEL 2 diff --git a/keyboards/black_hellebore/config.h b/keyboards/black_hellebore/config.h index 53910fed09..e748b3d185 100644 --- a/keyboards/black_hellebore/config.h +++ b/keyboards/black_hellebore/config.h @@ -20,5 +20,5 @@ #define WS2812_PWM_CHANNEL 1 #define WS2812_PWM_PAL_MODE 1 //TIM1_CH1N (AF1) #define WS2812_PWM_COMPLEMENTARY_OUTPUT -#define WS2812_DMA_STREAM STM32_DMA1_STREAM6 -#define WS2812_DMA_CHANNEL 7 //7 works, CxS[3:0] 0111 = TIM1_UP on Channel 6? (RM0394.pdf pg.298) +#define WS2812_PWM_DMA_STREAM STM32_DMA1_STREAM6 +#define WS2812_PWM_DMA_CHANNEL 7 //7 works, CxS[3:0] 0111 = TIM1_UP on Channel 6? (RM0394.pdf pg.298) diff --git a/keyboards/crypt_macro/config.h b/keyboards/crypt_macro/config.h index 4d9d9bf5c2..701ad8da86 100644 --- a/keyboards/crypt_macro/config.h +++ b/keyboards/crypt_macro/config.h @@ -24,6 +24,6 @@ along with this program. If not, see . #define WS2812_PWM_DRIVER PWMD3 #define WS2812_PWM_CHANNEL 1 #define WS2812_PWM_PAL_MODE 1 -#define WS2812_DMA_STREAM STM32_DMA1_STREAM3 -#define WS2812_DMA_CHANNEL 3 +#define WS2812_PWM_DMA_STREAM STM32_DMA1_STREAM3 +#define WS2812_PWM_DMA_CHANNEL 3 #define WS2812_BYTE_ORDER WS2812_BYTE_ORDER_RGB diff --git a/keyboards/custommk/evo70_r2/config.h b/keyboards/custommk/evo70_r2/config.h index 62606cf1ee..bd8744204c 100644 --- a/keyboards/custommk/evo70_r2/config.h +++ b/keyboards/custommk/evo70_r2/config.h @@ -78,8 +78,8 @@ #define WS2812_PWM_DRIVER PWMD1 #define WS2812_PWM_CHANNEL 3 #define WS2812_PWM_PAL_MODE 1 -#define WS2812_DMA_STREAM STM32_DMA2_STREAM5 -#define WS2812_DMA_CHANNEL 6 +#define WS2812_PWM_DMA_STREAM STM32_DMA2_STREAM5 +#define WS2812_PWM_DMA_CHANNEL 6 #define TAP_CODE_DELAY 10 diff --git a/keyboards/ebastler/isometria_75/rev1/config.h b/keyboards/ebastler/isometria_75/rev1/config.h index 0fc8019a1d..19a79c9df6 100644 --- a/keyboards/ebastler/isometria_75/rev1/config.h +++ b/keyboards/ebastler/isometria_75/rev1/config.h @@ -26,8 +26,8 @@ along with this program. If not, see . #define WS2812_PWM_DRIVER PWMD2 #define WS2812_PWM_CHANNEL 2 #define WS2812_PWM_PAL_MODE 2 -#define WS2812_DMA_STREAM STM32_DMA1_STREAM2 -#define WS2812_DMA_CHANNEL 2 +#define WS2812_PWM_DMA_STREAM STM32_DMA1_STREAM2 +#define WS2812_PWM_DMA_CHANNEL 2 /* ADC - will be used for battery monitoring once BT support is added */ /* #define ADC_PIN B0 */ diff --git a/keyboards/edi/hardlight/mk2/config.h b/keyboards/edi/hardlight/mk2/config.h index 73f4b2baae..52636c6484 100644 --- a/keyboards/edi/hardlight/mk2/config.h +++ b/keyboards/edi/hardlight/mk2/config.h @@ -28,8 +28,8 @@ along with this program. If not, see . #define WS2812_PWM_DRIVER PWMD1 #define WS2812_PWM_CHANNEL 3 #define WS2812_PWM_PAL_MODE 2 -#define WS2812_DMA_STREAM STM32_DMA1_STREAM5 -#define WS2812_DMA_CHANNEL 3 +#define WS2812_PWM_DMA_STREAM STM32_DMA1_STREAM5 +#define WS2812_PWM_DMA_CHANNEL 3 #define WS2812_EXTERNAL_PULLUP /* I2C driver overrides */ diff --git a/keyboards/geekboards/macropad_v2/config.h b/keyboards/geekboards/macropad_v2/config.h index 6aed50ec2f..dca98f0c95 100644 --- a/keyboards/geekboards/macropad_v2/config.h +++ b/keyboards/geekboards/macropad_v2/config.h @@ -19,7 +19,7 @@ #define WS2812_PWM_DRIVER PWMD3 #define WS2812_PWM_CHANNEL 2 #define WS2812_PWM_PAL_MODE 1 -#define WS2812_DMA_STREAM STM32_DMA1_STREAM3 -#define WS2812_DMA_CHANNEL 3 +#define WS2812_PWM_DMA_STREAM STM32_DMA1_STREAM3 +#define WS2812_PWM_DMA_CHANNEL 3 #define WAIT_FOR_USB diff --git a/keyboards/handwired/cyberstar/config.h b/keyboards/handwired/cyberstar/config.h index 4d9d9bf5c2..701ad8da86 100644 --- a/keyboards/handwired/cyberstar/config.h +++ b/keyboards/handwired/cyberstar/config.h @@ -24,6 +24,6 @@ along with this program. If not, see . #define WS2812_PWM_DRIVER PWMD3 #define WS2812_PWM_CHANNEL 1 #define WS2812_PWM_PAL_MODE 1 -#define WS2812_DMA_STREAM STM32_DMA1_STREAM3 -#define WS2812_DMA_CHANNEL 3 +#define WS2812_PWM_DMA_STREAM STM32_DMA1_STREAM3 +#define WS2812_PWM_DMA_CHANNEL 3 #define WS2812_BYTE_ORDER WS2812_BYTE_ORDER_RGB diff --git a/keyboards/handwired/macroboard/config.h b/keyboards/handwired/macroboard/config.h index 95e7d9d1aa..b8e437bddf 100644 --- a/keyboards/handwired/macroboard/config.h +++ b/keyboards/handwired/macroboard/config.h @@ -20,8 +20,8 @@ along with this program. If not, see . #define WS2812_PWM_DRIVER PWMD4 #define WS2812_PWM_CHANNEL 4 #define WS2812_PWM_PAL_MODE 2 -#define WS2812_DMA_STREAM STM32_DMA1_STREAM6 // DMA Stream for TIMx_UP, see the respective reference manual for the appropriate values for your MCU. -#define WS2812_DMA_CHANNEL 2 // DMA Channel for TIMx_UP, see the respective reference manual for the appropriate values for your MCU. +#define WS2812_PWM_DMA_STREAM STM32_DMA1_STREAM6 // DMA Stream for TIMx_UP, see the respective reference manual for the appropriate values for your MCU. +#define WS2812_PWM_DMA_CHANNEL 2 // DMA Channel for TIMx_UP, see the respective reference manual for the appropriate values for your MCU. #define WS2812_PWM_TARGET_PERIOD 800000 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ diff --git a/keyboards/handwired/tractyl_manuform/5x6_right/f303/config.h b/keyboards/handwired/tractyl_manuform/5x6_right/f303/config.h index 3a7f97f8d2..a2818e7176 100644 --- a/keyboards/handwired/tractyl_manuform/5x6_right/f303/config.h +++ b/keyboards/handwired/tractyl_manuform/5x6_right/f303/config.h @@ -26,8 +26,8 @@ along with this program. If not, see . #define WS2812_PWM_CHANNEL 1 // default: 2 #define WS2812_PWM_PAL_MODE 2 // Pin "alternate function", see the respective datasheet for the appropriate values for your MCU. default: 2 //#define WS2812_PWM_COMPLEMENTARY_OUTPUT // Define for a complementary timer output (TIMx_CHyN); omit for a normal timer output (TIMx_CHy). -// #define WS2812_DMA_STREAM STM32_DMA1_STREAM3 // DMA Stream for TIMx_UP, see the respective reference manual for the appropriate values for your MCU. -#define WS2812_DMA_CHANNEL 3 // DMA Channel for TIMx_UP, see the respective reference manual for the appropriate values for your MCU. +// #define WS2812_PWM_DMA_STREAM STM32_DMA1_STREAM3 // DMA Stream for TIMx_UP, see the respective reference manual for the appropriate values for your MCU. +#define WS2812_PWM_DMA_CHANNEL 3 // DMA Channel for TIMx_UP, see the respective reference manual for the appropriate values for your MCU. #define DEBUG_LED_PIN C13 diff --git a/keyboards/handwired/tractyl_manuform/5x6_right/f411/config.h b/keyboards/handwired/tractyl_manuform/5x6_right/f411/config.h index 2ad18267ad..87f830e175 100644 --- a/keyboards/handwired/tractyl_manuform/5x6_right/f411/config.h +++ b/keyboards/handwired/tractyl_manuform/5x6_right/f411/config.h @@ -27,8 +27,8 @@ along with this program. If not, see . #define WS2812_PWM_PAL_MODE 1 // Pin "alternate function", see the respective datasheet for the appropriate values for your MCU. default: 2 #define WS2812_EXTERNAL_PULLUP //#define WS2812_PWM_COMPLEMENTARY_OUTPUT // Define for a complementary timer output (TIMx_CHyN); omit for a normal timer output (TIMx_CHy). -#define WS2812_DMA_STREAM STM32_DMA1_STREAM7 // DMA Stream for TIMx_UP, see the respective reference manual for the appropriate values for your MCU. -#define WS2812_DMA_CHANNEL 3 // DMA Channel for TIMx_UP, see the respective reference manual for the appropriate values for your MCU. +#define WS2812_PWM_DMA_STREAM STM32_DMA1_STREAM7 // DMA Stream for TIMx_UP, see the respective reference manual for the appropriate values for your MCU. +#define WS2812_PWM_DMA_CHANNEL 3 // DMA Channel for TIMx_UP, see the respective reference manual for the appropriate values for your MCU. #define WS2812_PWM_TARGET_PERIOD 800000 #define DEBUG_LED_PIN C13 diff --git a/keyboards/jacky_studio/piggy60/rev2/config.h b/keyboards/jacky_studio/piggy60/rev2/config.h index 2747834991..8c9b292fb4 100644 --- a/keyboards/jacky_studio/piggy60/rev2/config.h +++ b/keyboards/jacky_studio/piggy60/rev2/config.h @@ -19,5 +19,5 @@ #define WS2812_PWM_DRIVER PWMD4 #define WS2812_PWM_CHANNEL 4 #define WS2812_PWM_PAL_MODE 2 -#define WS2812_DMA_STREAM STM32_DMA1_STREAM7 -#define WS2812_DMA_CHANNEL 7 +#define WS2812_PWM_DMA_STREAM STM32_DMA1_STREAM7 +#define WS2812_PWM_DMA_CHANNEL 7 diff --git a/keyboards/kabedon/kabedon98e/config.h b/keyboards/kabedon/kabedon98e/config.h index 514a1121b3..8eb549c134 100644 --- a/keyboards/kabedon/kabedon98e/config.h +++ b/keyboards/kabedon/kabedon98e/config.h @@ -17,8 +17,8 @@ #define WS2812_PWM_DRIVER PWMD3 #define WS2812_PWM_CHANNEL 1 -#define WS2812_DMA_STREAM STM32_DMA1_STREAM3 -#define WS2812_DMA_CHANNEL 3 +#define WS2812_PWM_DMA_STREAM STM32_DMA1_STREAM3 +#define WS2812_PWM_DMA_CHANNEL 3 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE diff --git a/keyboards/kprepublic/bm16a/v2/config.h b/keyboards/kprepublic/bm16a/v2/config.h index 3ef55f3d42..8014b69a98 100644 --- a/keyboards/kprepublic/bm16a/v2/config.h +++ b/keyboards/kprepublic/bm16a/v2/config.h @@ -5,5 +5,5 @@ #define WS2812_PWM_DRIVER PWMD4 #define WS2812_PWM_CHANNEL 4 -#define WS2812_DMA_STREAM STM32_DMA1_STREAM7 -#define WS2812_DMA_CHANNEL 7 +#define WS2812_PWM_DMA_STREAM STM32_DMA1_STREAM7 +#define WS2812_PWM_DMA_CHANNEL 7 diff --git a/keyboards/linworks/whale75/config.h b/keyboards/linworks/whale75/config.h index 629c1dcf70..84b3c45cd9 100644 --- a/keyboards/linworks/whale75/config.h +++ b/keyboards/linworks/whale75/config.h @@ -24,5 +24,5 @@ along with this program. If not, see . #define WS2812_PWM_DRIVER PWMD4 #define WS2812_PWM_CHANNEL 4 #define WS2812_PWM_PAL_MODE 2 -#define WS2812_DMA_STREAM STM32_DMA1_STREAM7 -#define WS2812_DMA_CHANNEL 7 +#define WS2812_PWM_DMA_STREAM STM32_DMA1_STREAM7 +#define WS2812_PWM_DMA_CHANNEL 7 diff --git a/keyboards/loki65/config.h b/keyboards/loki65/config.h index 3627f4c7e6..ac6b9f5ceb 100644 --- a/keyboards/loki65/config.h +++ b/keyboards/loki65/config.h @@ -24,6 +24,6 @@ along with this program. If not, see . #define WS2812_PWM_DRIVER PWMD1 #define WS2812_PWM_CHANNEL 2 #define WS2812_PWM_PAL_MODE 2 -#define WS2812_DMA_STREAM STM32_DMA1_STREAM5 -#define WS2812_DMA_CHANNEL 5 +#define WS2812_PWM_DMA_STREAM STM32_DMA1_STREAM5 +#define WS2812_PWM_DMA_CHANNEL 5 #define WS2812_BYTE_ORDER WS2812_BYTE_ORDER_RGB diff --git a/keyboards/mariorion_v25/prod/config.h b/keyboards/mariorion_v25/prod/config.h index 042f7662d8..8895d16ece 100644 --- a/keyboards/mariorion_v25/prod/config.h +++ b/keyboards/mariorion_v25/prod/config.h @@ -7,9 +7,9 @@ #define WS2812_PWM_DRIVER PWMD17 #define WS2812_PWM_CHANNEL 1 -#define WS2812_DMA_STREAM STM32_DMA1_STREAM1 -#define WS2812_DMA_CHANNEL 1 -// #define WS2812_DMAMUX_ID STM32_DMAMUX1_TIM17_UP +#define WS2812_PWM_DMA_STREAM STM32_DMA1_STREAM1 +#define WS2812_PWM_DMA_CHANNEL 1 +// #define WS2812_PWM_DMAMUX_ID STM32_DMAMUX1_TIM17_UP #define INDICATOR_0 C9 #define INDICATOR_1 C8 diff --git a/keyboards/mariorion_v25/proto/config.h b/keyboards/mariorion_v25/proto/config.h index 6865f2dbb0..894b8fbf9e 100644 --- a/keyboards/mariorion_v25/proto/config.h +++ b/keyboards/mariorion_v25/proto/config.h @@ -7,9 +7,9 @@ #define WS2812_PWM_DRIVER PWMD17 #define WS2812_PWM_CHANNEL 1 -#define WS2812_DMA_STREAM STM32_DMA1_STREAM1 -#define WS2812_DMA_CHANNEL 1 -// #define WS2812_DMAMUX_ID STM32_DMAMUX1_TIM17_UP +#define WS2812_PWM_DMA_STREAM STM32_DMA1_STREAM1 +#define WS2812_PWM_DMA_CHANNEL 1 +// #define WS2812_PWM_DMAMUX_ID STM32_DMAMUX1_TIM17_UP #define INDICATOR_0 C8 #define INDICATOR_1 C7 diff --git a/keyboards/meetlab/kalice/config.h b/keyboards/meetlab/kalice/config.h index 80bae79fd8..052bfa4bdf 100644 --- a/keyboards/meetlab/kalice/config.h +++ b/keyboards/meetlab/kalice/config.h @@ -19,5 +19,5 @@ #define WS2812_PWM_DRIVER PWMD1 #define WS2812_PWM_CHANNEL 2 #define WS2812_PWM_COMPLEMENTARY_OUTPUT -#define WS2812_DMA_STREAM STM32_DMA1_STREAM5 -#define WS2812_DMA_CHANNEL 5 \ No newline at end of file +#define WS2812_PWM_DMA_STREAM STM32_DMA1_STREAM5 +#define WS2812_PWM_DMA_CHANNEL 5 \ No newline at end of file diff --git a/keyboards/meetlab/rena/config.h b/keyboards/meetlab/rena/config.h index ef8715e384..6a6a4a2cae 100644 --- a/keyboards/meetlab/rena/config.h +++ b/keyboards/meetlab/rena/config.h @@ -18,5 +18,5 @@ #define WS2812_PWM_DRIVER PWMD2 #define WS2812_PWM_CHANNEL 3 -#define WS2812_DMA_STREAM STM32_DMA1_STREAM2 -#define WS2812_DMA_CHANNEL 2 +#define WS2812_PWM_DMA_STREAM STM32_DMA1_STREAM2 +#define WS2812_PWM_DMA_CHANNEL 2 diff --git a/keyboards/misterknife/knife66/config.h b/keyboards/misterknife/knife66/config.h index 7f7e117303..2b8d7b8b9f 100644 --- a/keyboards/misterknife/knife66/config.h +++ b/keyboards/misterknife/knife66/config.h @@ -20,5 +20,5 @@ along with this program. If not, see . #define WS2812_PWM_DRIVER PWMD1 // default: PWMD1 #define WS2812_PWM_CHANNEL 2 // default: 2 #define WS2812_PWM_PAL_MODE 2 // Pin "alternate function", see the respective datasheet for the appropriate values for your MCU. default: 2 -#define WS2812_DMA_STREAM STM32_DMA1_STREAM5 // DMA Stream for TIMx_UP, see the respective reference manual for the appropriate values for your MCU. -#define WS2812_DMA_CHANNEL 5 // DMA Channel for TIMx_UP, see the respective reference manual for the appropriate values for your MCU. +#define WS2812_PWM_DMA_STREAM STM32_DMA1_STREAM5 // DMA Stream for TIMx_UP, see the respective reference manual for the appropriate values for your MCU. +#define WS2812_PWM_DMA_CHANNEL 5 // DMA Channel for TIMx_UP, see the respective reference manual for the appropriate values for your MCU. diff --git a/keyboards/misterknife/knife66_iso/config.h b/keyboards/misterknife/knife66_iso/config.h index cb847450ba..f9f0707ff1 100644 --- a/keyboards/misterknife/knife66_iso/config.h +++ b/keyboards/misterknife/knife66_iso/config.h @@ -20,5 +20,5 @@ along with this program. If not, see . #define WS2812_PWM_DRIVER PWMD1 // default: PWMD1 #define WS2812_PWM_CHANNEL 2 // default: 2 #define WS2812_PWM_PAL_MODE 2 // Pin "alternate function", see the respective datasheet for the appropriate values for your MCU. default: 2 -#define WS2812_DMA_STREAM STM32_DMA1_STREAM5 // DMA Stream for TIMx_UP, see the respective reference manual for the appropriate values for your MCU. -#define WS2812_DMA_CHANNEL 5 // DMA Channel for TIMx_UP, see the respective reference manual for the appropriate values for your MCU. +#define WS2812_PWM_DMA_STREAM STM32_DMA1_STREAM5 // DMA Stream for TIMx_UP, see the respective reference manual for the appropriate values for your MCU. +#define WS2812_PWM_DMA_CHANNEL 5 // DMA Channel for TIMx_UP, see the respective reference manual for the appropriate values for your MCU. diff --git a/keyboards/mode/m256wh/config.h b/keyboards/mode/m256wh/config.h index c976b6bcc5..06f1658ea5 100644 --- a/keyboards/mode/m256wh/config.h +++ b/keyboards/mode/m256wh/config.h @@ -21,7 +21,7 @@ along with this program. If not, see . #define WS2812_PWM_DRIVER PWMD1 #define WS2812_PWM_CHANNEL 3 #define WS2812_PWM_PAL_MODE 1 -#define WS2812_DMA_STREAM STM32_DMA2_STREAM5 -#define WS2812_DMA_CHANNEL 6 +#define WS2812_PWM_DMA_STREAM STM32_DMA2_STREAM5 +#define WS2812_PWM_DMA_CHANNEL 6 #define EECONFIG_KB_DATA_SIZE (1) diff --git a/keyboards/mode/m256ws/config.h b/keyboards/mode/m256ws/config.h index c976b6bcc5..06f1658ea5 100644 --- a/keyboards/mode/m256ws/config.h +++ b/keyboards/mode/m256ws/config.h @@ -21,7 +21,7 @@ along with this program. If not, see . #define WS2812_PWM_DRIVER PWMD1 #define WS2812_PWM_CHANNEL 3 #define WS2812_PWM_PAL_MODE 1 -#define WS2812_DMA_STREAM STM32_DMA2_STREAM5 -#define WS2812_DMA_CHANNEL 6 +#define WS2812_PWM_DMA_STREAM STM32_DMA2_STREAM5 +#define WS2812_PWM_DMA_CHANNEL 6 #define EECONFIG_KB_DATA_SIZE (1) diff --git a/keyboards/mode/m60h/config.h b/keyboards/mode/m60h/config.h index f984cf28de..cde4ffdbc6 100644 --- a/keyboards/mode/m60h/config.h +++ b/keyboards/mode/m60h/config.h @@ -5,6 +5,6 @@ #define WS2812_PWM_DRIVER PWMD4 #define WS2812_PWM_CHANNEL 4 -#define WS2812_DMA_STREAM STM32_DMA1_STREAM6 -#define WS2812_DMA_CHANNEL 2 +#define WS2812_PWM_DMA_STREAM STM32_DMA1_STREAM6 +#define WS2812_PWM_DMA_CHANNEL 2 #define WS2812_PWM_TARGET_PERIOD 800000 \ No newline at end of file diff --git a/keyboards/mode/m60h_f/config.h b/keyboards/mode/m60h_f/config.h index f984cf28de..cde4ffdbc6 100644 --- a/keyboards/mode/m60h_f/config.h +++ b/keyboards/mode/m60h_f/config.h @@ -5,6 +5,6 @@ #define WS2812_PWM_DRIVER PWMD4 #define WS2812_PWM_CHANNEL 4 -#define WS2812_DMA_STREAM STM32_DMA1_STREAM6 -#define WS2812_DMA_CHANNEL 2 +#define WS2812_PWM_DMA_STREAM STM32_DMA1_STREAM6 +#define WS2812_PWM_DMA_CHANNEL 2 #define WS2812_PWM_TARGET_PERIOD 800000 \ No newline at end of file diff --git a/keyboards/mode/m60s/config.h b/keyboards/mode/m60s/config.h index f984cf28de..cde4ffdbc6 100644 --- a/keyboards/mode/m60s/config.h +++ b/keyboards/mode/m60s/config.h @@ -5,6 +5,6 @@ #define WS2812_PWM_DRIVER PWMD4 #define WS2812_PWM_CHANNEL 4 -#define WS2812_DMA_STREAM STM32_DMA1_STREAM6 -#define WS2812_DMA_CHANNEL 2 +#define WS2812_PWM_DMA_STREAM STM32_DMA1_STREAM6 +#define WS2812_PWM_DMA_CHANNEL 2 #define WS2812_PWM_TARGET_PERIOD 800000 \ No newline at end of file diff --git a/keyboards/mwstudio/mmk_3/config.h b/keyboards/mwstudio/mmk_3/config.h index 0265d3ed6e..f8916cddd0 100644 --- a/keyboards/mwstudio/mmk_3/config.h +++ b/keyboards/mwstudio/mmk_3/config.h @@ -22,5 +22,5 @@ #define WS2812_PWM_DRIVER PWMD4 #define WS2812_PWM_CHANNEL 3 #define WS2812_PWM_PAL_MODE 1 -#define WS2812_DMA_STREAM STM32_DMA1_STREAM7 -#define WS2812_DMA_CHANNEL 2 +#define WS2812_PWM_DMA_STREAM STM32_DMA1_STREAM7 +#define WS2812_PWM_DMA_CHANNEL 2 diff --git a/keyboards/mwstudio/mw660/config.h b/keyboards/mwstudio/mw660/config.h index 87659c1f67..58d0eee9e0 100644 --- a/keyboards/mwstudio/mw660/config.h +++ b/keyboards/mwstudio/mw660/config.h @@ -20,5 +20,5 @@ #define WS2812_PWM_CHANNEL 3 // default: 2 //#define WS2812_PWM_COMPLEMENTARY_OUTPUT // Define for a complementary timer output (TIMx_CHyN); omit for a normal timer output (TIMx_CHy). #define WS2812_PWM_PAL_MODE 1 // Pin "alternate function", see the respective datasheet for the appropriate values for your MCU. default: 2 -#define WS2812_DMA_STREAM STM32_DMA1_STREAM7 // DMA Stream for TIMx_UP, see the respective reference manual for the appropriate values for your MCU. -#define WS2812_DMA_CHANNEL 2 \ No newline at end of file +#define WS2812_PWM_DMA_STREAM STM32_DMA1_STREAM7 // DMA Stream for TIMx_UP, see the respective reference manual for the appropriate values for your MCU. +#define WS2812_PWM_DMA_CHANNEL 2 \ No newline at end of file diff --git a/keyboards/novelkeys/nk20/config.h b/keyboards/novelkeys/nk20/config.h index 317cc2c3e8..750a033568 100644 --- a/keyboards/novelkeys/nk20/config.h +++ b/keyboards/novelkeys/nk20/config.h @@ -20,5 +20,5 @@ along with this program. If not, see . #define WS2812_PWM_DRIVER PWMD3 #define WS2812_PWM_CHANNEL 2 #define WS2812_PWM_PAL_MODE 1 -#define WS2812_DMA_STREAM STM32_DMA1_STREAM3 -#define WS2812_DMA_CHANNEL 3 +#define WS2812_PWM_DMA_STREAM STM32_DMA1_STREAM3 +#define WS2812_PWM_DMA_CHANNEL 3 diff --git a/keyboards/novelkeys/nk65b/config.h b/keyboards/novelkeys/nk65b/config.h index 40e3b54053..eaddb87b82 100755 --- a/keyboards/novelkeys/nk65b/config.h +++ b/keyboards/novelkeys/nk65b/config.h @@ -20,5 +20,5 @@ along with this program. If not, see . #define WS2812_PWM_DRIVER PWMD3 #define WS2812_PWM_CHANNEL 1 #define WS2812_PWM_PAL_MODE 1 -#define WS2812_DMA_STREAM STM32_DMA1_STREAM3 -#define WS2812_DMA_CHANNEL 3 +#define WS2812_PWM_DMA_STREAM STM32_DMA1_STREAM3 +#define WS2812_PWM_DMA_CHANNEL 3 diff --git a/keyboards/novelkeys/nk87b/config.h b/keyboards/novelkeys/nk87b/config.h index a79137e7d9..933d4ed5c0 100644 --- a/keyboards/novelkeys/nk87b/config.h +++ b/keyboards/novelkeys/nk87b/config.h @@ -20,5 +20,5 @@ along with this program. If not, see . #define WS2812_PWM_DRIVER PWMD3 #define WS2812_PWM_CHANNEL 3 #define WS2812_PWM_PAL_MODE 1 -#define WS2812_DMA_STREAM STM32_DMA1_STREAM3 -#define WS2812_DMA_CHANNEL 3 +#define WS2812_PWM_DMA_STREAM STM32_DMA1_STREAM3 +#define WS2812_PWM_DMA_CHANNEL 3 diff --git a/keyboards/novelkeys/nk_plus/config.h b/keyboards/novelkeys/nk_plus/config.h index 40e3b54053..eaddb87b82 100644 --- a/keyboards/novelkeys/nk_plus/config.h +++ b/keyboards/novelkeys/nk_plus/config.h @@ -20,5 +20,5 @@ along with this program. If not, see . #define WS2812_PWM_DRIVER PWMD3 #define WS2812_PWM_CHANNEL 1 #define WS2812_PWM_PAL_MODE 1 -#define WS2812_DMA_STREAM STM32_DMA1_STREAM3 -#define WS2812_DMA_CHANNEL 3 +#define WS2812_PWM_DMA_STREAM STM32_DMA1_STREAM3 +#define WS2812_PWM_DMA_CHANNEL 3 diff --git a/keyboards/planck/ez/config.h b/keyboards/planck/ez/config.h index 74d8d21155..e4fa0924d3 100644 --- a/keyboards/planck/ez/config.h +++ b/keyboards/planck/ez/config.h @@ -46,8 +46,8 @@ // #define WS2812_TIM_CH 2 // #define PORT_WS2812 GPIOA // #define PIN_WS2812 1 -// #define WS2812_DMA_STREAM STM32_DMA1_STREAM2 // DMA stream for TIMx_UP (look up in reference manual under DMA Channel selection) -//#define WS2812_DMA_CHANNEL 7 // DMA channel for TIMx_UP +// #define WS2812_PWM_DMA_STREAM STM32_DMA1_STREAM2 // DMA stream for TIMx_UP (look up in reference manual under DMA Channel selection) +//#define WS2812_PWM_DMA_CHANNEL 7 // DMA channel for TIMx_UP //#define WS2812_EXTERNAL_PULLUP #define IS31FL3737_I2C_ADDRESS_1 IS31FL3737_I2C_ADDRESS_GND diff --git a/keyboards/planck/rev6/config.h b/keyboards/planck/rev6/config.h index 7fec8be56b..0935fad358 100644 --- a/keyboards/planck/rev6/config.h +++ b/keyboards/planck/rev6/config.h @@ -46,5 +46,5 @@ #define WS2812_PWM_DRIVER PWMD2 #define WS2812_PWM_CHANNEL 2 #define WS2812_PWM_PAL_MODE 1 -#define WS2812_DMA_STREAM STM32_DMA1_STREAM2 -#define WS2812_DMA_CHANNEL 2 +#define WS2812_PWM_DMA_STREAM STM32_DMA1_STREAM2 +#define WS2812_PWM_DMA_CHANNEL 2 diff --git a/keyboards/planck/rev6_drop/config.h b/keyboards/planck/rev6_drop/config.h index 7fec8be56b..0935fad358 100644 --- a/keyboards/planck/rev6_drop/config.h +++ b/keyboards/planck/rev6_drop/config.h @@ -46,5 +46,5 @@ #define WS2812_PWM_DRIVER PWMD2 #define WS2812_PWM_CHANNEL 2 #define WS2812_PWM_PAL_MODE 1 -#define WS2812_DMA_STREAM STM32_DMA1_STREAM2 -#define WS2812_DMA_CHANNEL 2 +#define WS2812_PWM_DMA_STREAM STM32_DMA1_STREAM2 +#define WS2812_PWM_DMA_CHANNEL 2 diff --git a/keyboards/planck/rev7/config.h b/keyboards/planck/rev7/config.h index a5e49c8a53..9ccbf4cc8a 100644 --- a/keyboards/planck/rev7/config.h +++ b/keyboards/planck/rev7/config.h @@ -27,8 +27,8 @@ #define WS2812_PWM_DRIVER PWMD2 #define WS2812_PWM_CHANNEL 2 #define WS2812_PWM_PAL_MODE 1 -#define WS2812_DMA_STREAM STM32_DMA1_STREAM2 -#define WS2812_DMA_CHANNEL 2 +#define WS2812_PWM_DMA_STREAM STM32_DMA1_STREAM2 +#define WS2812_PWM_DMA_CHANNEL 2 /* * Feature disable options diff --git a/keyboards/preonic/rev3/config.h b/keyboards/preonic/rev3/config.h index 7800131a90..6a842105b2 100644 --- a/keyboards/preonic/rev3/config.h +++ b/keyboards/preonic/rev3/config.h @@ -44,5 +44,5 @@ #define WS2812_PWM_DRIVER PWMD2 #define WS2812_PWM_CHANNEL 2 #define WS2812_PWM_PAL_MODE 1 -#define WS2812_DMA_STREAM STM32_DMA1_STREAM2 -#define WS2812_DMA_CHANNEL 2 +#define WS2812_PWM_DMA_STREAM STM32_DMA1_STREAM2 +#define WS2812_PWM_DMA_CHANNEL 2 diff --git a/keyboards/preonic/rev3_drop/config.h b/keyboards/preonic/rev3_drop/config.h index 7800131a90..6a842105b2 100644 --- a/keyboards/preonic/rev3_drop/config.h +++ b/keyboards/preonic/rev3_drop/config.h @@ -44,5 +44,5 @@ #define WS2812_PWM_DRIVER PWMD2 #define WS2812_PWM_CHANNEL 2 #define WS2812_PWM_PAL_MODE 1 -#define WS2812_DMA_STREAM STM32_DMA1_STREAM2 -#define WS2812_DMA_CHANNEL 2 +#define WS2812_PWM_DMA_STREAM STM32_DMA1_STREAM2 +#define WS2812_PWM_DMA_CHANNEL 2 diff --git a/keyboards/protozoa/p01/config.h b/keyboards/protozoa/p01/config.h index fd58bda912..3b14a164f6 100644 --- a/keyboards/protozoa/p01/config.h +++ b/keyboards/protozoa/p01/config.h @@ -21,5 +21,5 @@ along with this program. If not, see . #define WS2812_PWM_DRIVER PWMD1 #define WS2812_PWM_CHANNEL 2 #define WS2812_PWM_PAL_MODE 2 -#define WS2812_DMA_STREAM STM32_DMA1_STREAM5 -#define WS2812_DMA_CHANNEL 5 +#define WS2812_PWM_DMA_STREAM STM32_DMA1_STREAM5 +#define WS2812_PWM_DMA_CHANNEL 5 diff --git a/keyboards/rgbkb/mun/config.h b/keyboards/rgbkb/mun/config.h index b247fa91cd..74db14c061 100644 --- a/keyboards/rgbkb/mun/config.h +++ b/keyboards/rgbkb/mun/config.h @@ -54,8 +54,8 @@ #define WS2812_PWM_DRIVER PWMD3 #define WS2812_PWM_CHANNEL 2 #define WS2812_PWM_PAL_MODE 2 -#define WS2812_DMA_STREAM STM32_DMA1_STREAM3 -#define WS2812_DMA_CHANNEL 3 +#define WS2812_PWM_DMA_STREAM STM32_DMA1_STREAM3 +#define WS2812_PWM_DMA_CHANNEL 3 #define TOUCH_UPDATE_INTERVAL 33 #define OLED_UPDATE_INTERVAL 33 diff --git a/keyboards/rgbkb/sol3/config.h b/keyboards/rgbkb/sol3/config.h index 2d3caeea4e..8348b44f96 100644 --- a/keyboards/rgbkb/sol3/config.h +++ b/keyboards/rgbkb/sol3/config.h @@ -46,8 +46,8 @@ #define WS2812_PWM_DRIVER PWMD3 #define WS2812_PWM_CHANNEL 2 #define WS2812_PWM_PAL_MODE 2 -#define WS2812_DMA_STREAM STM32_DMA1_STREAM3 -#define WS2812_DMA_CHANNEL 3 +#define WS2812_PWM_DMA_STREAM STM32_DMA1_STREAM3 +#define WS2812_PWM_DMA_CHANNEL 3 #define TOUCH_UPDATE_INTERVAL 33 #define OLED_UPDATE_INTERVAL 33 diff --git a/keyboards/skyloong/dt40/config.h b/keyboards/skyloong/dt40/config.h index b0aa978063..7e101addcb 100644 --- a/keyboards/skyloong/dt40/config.h +++ b/keyboards/skyloong/dt40/config.h @@ -24,5 +24,5 @@ #define WS2812_PWM_DRIVER PWMD3 #define WS2812_PWM_CHANNEL 1 #define WS2812_PWM_PAL_MODE 2 -#define WS2812_DMA_STREAM STM32_DMA1_STREAM3 -#define WS2812_DMA_CHANNEL 3 +#define WS2812_PWM_DMA_STREAM STM32_DMA1_STREAM3 +#define WS2812_PWM_DMA_CHANNEL 3 diff --git a/keyboards/smithrune/iron165r2/f411/config.h b/keyboards/smithrune/iron165r2/f411/config.h index 8ed73d3ff4..bcd506ade3 100644 --- a/keyboards/smithrune/iron165r2/f411/config.h +++ b/keyboards/smithrune/iron165r2/f411/config.h @@ -24,5 +24,5 @@ along with this program. If not, see . #define WS2812_PWM_DRIVER PWMD1 #define WS2812_PWM_CHANNEL 3 #define WS2812_PWM_PAL_MODE 1 -#define WS2812_DMA_STREAM STM32_DMA2_STREAM5 -#define WS2812_DMA_CHANNEL 6 +#define WS2812_PWM_DMA_STREAM STM32_DMA2_STREAM5 +#define WS2812_PWM_DMA_CHANNEL 6 diff --git a/keyboards/smithrune/magnus/m75h/config.h b/keyboards/smithrune/magnus/m75h/config.h index e72ba06969..18fd960d8f 100644 --- a/keyboards/smithrune/magnus/m75h/config.h +++ b/keyboards/smithrune/magnus/m75h/config.h @@ -25,5 +25,5 @@ along with this program. If not, see . #define WS2812_PWM_DRIVER PWMD1 #define WS2812_PWM_CHANNEL 3 #define WS2812_PWM_PAL_MODE 1 -#define WS2812_DMA_STREAM STM32_DMA2_STREAM5 -#define WS2812_DMA_CHANNEL 6 +#define WS2812_PWM_DMA_STREAM STM32_DMA2_STREAM5 +#define WS2812_PWM_DMA_CHANNEL 6 diff --git a/keyboards/smithrune/magnus/m75s/config.h b/keyboards/smithrune/magnus/m75s/config.h index 1e8874caa4..95fb2a420c 100644 --- a/keyboards/smithrune/magnus/m75s/config.h +++ b/keyboards/smithrune/magnus/m75s/config.h @@ -27,5 +27,5 @@ along with this program. If not, see . #define WS2812_PWM_DRIVER PWMD1 #define WS2812_PWM_CHANNEL 3 #define WS2812_PWM_PAL_MODE 1 -#define WS2812_DMA_STREAM STM32_DMA2_STREAM5 -#define WS2812_DMA_CHANNEL 6 +#define WS2812_PWM_DMA_STREAM STM32_DMA2_STREAM5 +#define WS2812_PWM_DMA_CHANNEL 6 diff --git a/keyboards/spaceholdings/nebula68/config.h b/keyboards/spaceholdings/nebula68/config.h index 1b2441556b..85d3261dd1 100755 --- a/keyboards/spaceholdings/nebula68/config.h +++ b/keyboards/spaceholdings/nebula68/config.h @@ -20,8 +20,8 @@ along with this program. If not, see . #define WS2812_PWM_DRIVER PWMD3 // default: PWMD2 #define WS2812_PWM_CHANNEL 2 // default: 2 #define WS2812_PWM_PAL_MODE 2 // Pin "alternate function", see the respective datasheet for the appropriate values for your MCU. default: 2 -#define WS2812_DMA_STREAM STM32_DMA1_STREAM3 // DMA Stream for TIMx_UP, see the respective reference manual for the appropriate values for your MCU. -#define WS2812_DMA_CHANNEL 3 // DMA Channel for TIMx_UP, see the respective reference manual for the appropriate values for your MCU. +#define WS2812_PWM_DMA_STREAM STM32_DMA1_STREAM3 // DMA Stream for TIMx_UP, see the respective reference manual for the appropriate values for your MCU. +#define WS2812_PWM_DMA_CHANNEL 3 // DMA Channel for TIMx_UP, see the respective reference manual for the appropriate values for your MCU. /* Backlight options */ diff --git a/keyboards/splitkb/kyria/rev1/config.h b/keyboards/splitkb/kyria/rev1/config.h index d666099135..4f130293e2 100644 --- a/keyboards/splitkb/kyria/rev1/config.h +++ b/keyboards/splitkb/kyria/rev1/config.h @@ -33,9 +33,9 @@ along with this program. If not, see . # define WS2812_PWM_DRIVER PWMD2 // default: PWMD2 # define WS2812_PWM_CHANNEL 4 // default: 2 # define WS2812_PWM_PAL_MODE 1 // Pin "alternate function", see the respective datasheet for the appropriate values for your MCU. default: 2 -# define WS2812_DMA_STREAM STM32_DMA1_STREAM2 // DMA Stream for TIMx_UP, see the respective reference manual for the appropriate values for your MCU. -# define WS2812_DMA_CHANNEL 2 // DMA Channel for TIMx_UP, see the respective reference manual for the appropriate values for your MCU. -# define WS2812_DMAMUX_ID STM32_DMAMUX1_TIM2_UP // DMAMUX configuration for TIMx_UP -- only required if your MCU has a DMAMUX peripheral, see the respective reference manual for the appropriate values for your MCU. +# define WS2812_PWM_DMA_STREAM STM32_DMA1_STREAM2 // DMA Stream for TIMx_UP, see the respective reference manual for the appropriate values for your MCU. +# define WS2812_PWM_DMA_CHANNEL 2 // DMA Channel for TIMx_UP, see the respective reference manual for the appropriate values for your MCU. +# define WS2812_PWM_DMAMUX_ID STM32_DMAMUX1_TIM2_UP // DMAMUX configuration for TIMx_UP -- only required if your MCU has a DMAMUX peripheral, see the respective reference manual for the appropriate values for your MCU. #else # define WS2812_DI_PIN D3 # define SOFT_SERIAL_PIN D2 diff --git a/keyboards/splitkb/kyria/rev2/config.h b/keyboards/splitkb/kyria/rev2/config.h index 452e011f0a..54d8f0985a 100644 --- a/keyboards/splitkb/kyria/rev2/config.h +++ b/keyboards/splitkb/kyria/rev2/config.h @@ -38,9 +38,9 @@ along with this program. If not, see . # define WS2812_PWM_DRIVER PWMD2 // default: PWMD2 # define WS2812_PWM_CHANNEL 4 // default: 2 # define WS2812_PWM_PAL_MODE 1 // Pin "alternate function", see the respective datasheet for the appropriate values for your MCU. default: 2 -# define WS2812_DMA_STREAM STM32_DMA1_STREAM2 // DMA Stream for TIMx_UP, see the respective reference manual for the appropriate values for your MCU. -# define WS2812_DMA_CHANNEL 2 // DMA Channel for TIMx_UP, see the respective reference manual for the appropriate values for your MCU. -# define WS2812_DMAMUX_ID STM32_DMAMUX1_TIM2_UP // DMAMUX configuration for TIMx_UP -- only required if your MCU has a DMAMUX peripheral, see the respective reference manual for the appropriate values for your MCU. +# define WS2812_PWM_DMA_STREAM STM32_DMA1_STREAM2 // DMA Stream for TIMx_UP, see the respective reference manual for the appropriate values for your MCU. +# define WS2812_PWM_DMA_CHANNEL 2 // DMA Channel for TIMx_UP, see the respective reference manual for the appropriate values for your MCU. +# define WS2812_PWM_DMAMUX_ID STM32_DMAMUX1_TIM2_UP // DMAMUX configuration for TIMx_UP -- only required if your MCU has a DMAMUX peripheral, see the respective reference manual for the appropriate values for your MCU. #else # define WS2812_DI_PIN D3 # define SOFT_SERIAL_PIN D2 diff --git a/keyboards/tg67/config.h b/keyboards/tg67/config.h index 7ede76f551..0d54e925ae 100644 --- a/keyboards/tg67/config.h +++ b/keyboards/tg67/config.h @@ -19,5 +19,5 @@ #define WS2812_PWM_DRIVER PWMD1 #define WS2812_PWM_CHANNEL 3 #define WS2812_PWM_COMPLEMENTARY_OUTPUT -#define WS2812_DMA_STREAM STM32_DMA1_STREAM5 -#define WS2812_DMA_CHANNEL 5 +#define WS2812_PWM_DMA_STREAM STM32_DMA1_STREAM5 +#define WS2812_PWM_DMA_CHANNEL 5 diff --git a/keyboards/tkw/grandiceps/config.h b/keyboards/tkw/grandiceps/config.h index a963fbfb51..a02e14f91f 100644 --- a/keyboards/tkw/grandiceps/config.h +++ b/keyboards/tkw/grandiceps/config.h @@ -20,5 +20,5 @@ #define WS2812_PWM_DRIVER PWMD3 #define WS2812_PWM_CHANNEL 4 #define WS2812_PWM_PAL_MODE 2 -#define WS2812_DMA_STREAM STM32_DMA1_STREAM2 -#define WS2812_DMA_CHANNEL 5 +#define WS2812_PWM_DMA_STREAM STM32_DMA1_STREAM2 +#define WS2812_PWM_DMA_CHANNEL 5 diff --git a/keyboards/tkw/stoutgat/v2/config.h b/keyboards/tkw/stoutgat/v2/config.h index bf68edcfae..79f47b9bb3 100644 --- a/keyboards/tkw/stoutgat/v2/config.h +++ b/keyboards/tkw/stoutgat/v2/config.h @@ -18,8 +18,8 @@ #define WS2812_PWM_DRIVER PWMD3 #define WS2812_PWM_CHANNEL 4 #define WS2812_PWM_PAL_MODE 2 -#define WS2812_DMA_STREAM STM32_DMA1_STREAM2 -#define WS2812_DMA_CHANNEL 5 +#define WS2812_PWM_DMA_STREAM STM32_DMA1_STREAM2 +#define WS2812_PWM_DMA_CHANNEL 5 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE diff --git a/keyboards/tzarc/djinn/config.h b/keyboards/tzarc/djinn/config.h index 74bb00edc2..24357b6a35 100644 --- a/keyboards/tzarc/djinn/config.h +++ b/keyboards/tzarc/djinn/config.h @@ -39,9 +39,9 @@ #define WS2812_PWM_DRIVER PWMD20 #define WS2812_PWM_CHANNEL 1 #define WS2812_PWM_PAL_MODE 3 -#define WS2812_DMA_STREAM STM32_DMA1_STREAM1 -#define WS2812_DMA_CHANNEL 1 -#define WS2812_DMAMUX_ID STM32_DMAMUX1_TIM20_UP +#define WS2812_PWM_DMA_STREAM STM32_DMA1_STREAM1 +#define WS2812_PWM_DMA_CHANNEL 1 +#define WS2812_PWM_DMAMUX_ID STM32_DMAMUX1_TIM20_UP // Audio configuration #define AUDIO_PIN A5 diff --git a/keyboards/tzarc/ghoul/rev1/stm32/config.h b/keyboards/tzarc/ghoul/rev1/stm32/config.h index 1dbc164039..a835b341db 100644 --- a/keyboards/tzarc/ghoul/rev1/stm32/config.h +++ b/keyboards/tzarc/ghoul/rev1/stm32/config.h @@ -28,8 +28,8 @@ #define WS2812_PWM_DRIVER PWMD3 #define WS2812_PWM_CHANNEL 1 #define WS2812_PWM_PAL_MODE 2 -#define WS2812_DMA_STREAM STM32_DMA1_STREAM2 -#define WS2812_DMA_CHANNEL 5 +#define WS2812_PWM_DMA_STREAM STM32_DMA1_STREAM2 +#define WS2812_PWM_DMA_CHANNEL 5 #define RGB_ENABLE_PIN C0 // ADC Configuration diff --git a/keyboards/viendi8l/config.h b/keyboards/viendi8l/config.h index 050a0cca22..a449301c2b 100644 --- a/keyboards/viendi8l/config.h +++ b/keyboards/viendi8l/config.h @@ -37,5 +37,5 @@ along with this program. If not, see . #define WS2812_PWM_DRIVER PWMD1 #define WS2812_PWM_CHANNEL 3 #define WS2812_PWM_PAL_MODE 1 -#define WS2812_DMA_STREAM STM32_DMA2_STREAM5 -#define WS2812_DMA_CHANNEL 6 +#define WS2812_PWM_DMA_STREAM STM32_DMA2_STREAM5 +#define WS2812_PWM_DMA_CHANNEL 6 diff --git a/keyboards/vinhcatba/uncertainty/config.h b/keyboards/vinhcatba/uncertainty/config.h index 5c02b78efe..82671dfdc0 100644 --- a/keyboards/vinhcatba/uncertainty/config.h +++ b/keyboards/vinhcatba/uncertainty/config.h @@ -11,8 +11,8 @@ #define WS2812_PWM_CHANNEL 4 // CH4 #define WS2812_PWM_PAL_MODE 2 // AF2 -#define WS2812_DMA_STREAM STM32_DMA1_STREAM2 // DMA1 Stream 2 for TIM3_UP (table 28 in reference manual) -#define WS2812_DMA_CHANNEL 5 // DMA Channel 5 for TIM3_UP (table 28 in reference manual) +#define WS2812_PWM_DMA_STREAM STM32_DMA1_STREAM2 // DMA1 Stream 2 for TIM3_UP (table 28 in reference manual) +#define WS2812_PWM_DMA_CHANNEL 5 // DMA Channel 5 for TIM3_UP (table 28 in reference manual) #define I2C1_CLOCK_SPEED 400000 diff --git a/keyboards/xelus/ninjin/config.h b/keyboards/xelus/ninjin/config.h index 9db59dcc66..7a8ac2f013 100644 --- a/keyboards/xelus/ninjin/config.h +++ b/keyboards/xelus/ninjin/config.h @@ -20,8 +20,8 @@ #define WS2812_PWM_DRIVER PWMD1 #define WS2812_PWM_CHANNEL 3 #define WS2812_PWM_PAL_MODE 2 -#define WS2812_DMA_STREAM STM32_DMA1_STREAM5 -#define WS2812_DMA_CHANNEL 3 +#define WS2812_PWM_DMA_STREAM STM32_DMA1_STREAM5 +#define WS2812_PWM_DMA_CHANNEL 3 #define WS2812_EXTERNAL_PULLUP /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ diff --git a/keyboards/xelus/valor/rev2/config.h b/keyboards/xelus/valor/rev2/config.h index f601945a15..9491d1f175 100644 --- a/keyboards/xelus/valor/rev2/config.h +++ b/keyboards/xelus/valor/rev2/config.h @@ -40,9 +40,9 @@ #define WS2812_PWM_DRIVER PWMD1 #define WS2812_PWM_CHANNEL 2 #define WS2812_PWM_PAL_MODE 1 -#define WS2812_DMA_STREAM STM32_DMA1_STREAM6 -#define WS2812_DMA_CHANNEL 7 -#define WS2812_DMAMUX_ID STM32_DMAMUX1_TIM1_UP +#define WS2812_PWM_DMA_STREAM STM32_DMA1_STREAM6 +#define WS2812_PWM_DMA_CHANNEL 7 +#define WS2812_PWM_DMAMUX_ID STM32_DMAMUX1_TIM1_UP // RGB Pullup #define WS2812_EXTERNAL_PULLUP diff --git a/keyboards/yandrstudio/buff67v3/config.h b/keyboards/yandrstudio/buff67v3/config.h index 9d3f3e44c0..7ff7636087 100644 --- a/keyboards/yandrstudio/buff67v3/config.h +++ b/keyboards/yandrstudio/buff67v3/config.h @@ -23,8 +23,8 @@ # define WS2812_PWM_DRIVER PWMD3 // default: PWMD2 # define WS2812_PWM_CHANNEL 1 // default: 2 -# define WS2812_DMA_STREAM STM32_DMA1_STREAM3 // DMA Stream for TIMx_UP, see the respective reference manual for the appropriate values for your MCU. -# define WS2812_DMA_CHANNEL 3 // DMA Channel for TIMx_UP, see the respective reference manual for the appropriate values for your MCU. +# define WS2812_PWM_DMA_STREAM STM32_DMA1_STREAM3 // DMA Stream for TIMx_UP, see the respective reference manual for the appropriate values for your MCU. +# define WS2812_PWM_DMA_CHANNEL 3 // DMA Channel for TIMx_UP, see the respective reference manual for the appropriate values for your MCU. #endif diff --git a/keyboards/yandrstudio/eau_r2/config.h b/keyboards/yandrstudio/eau_r2/config.h index aa9b295e02..3a741b3dff 100644 --- a/keyboards/yandrstudio/eau_r2/config.h +++ b/keyboards/yandrstudio/eau_r2/config.h @@ -17,5 +17,5 @@ #define WS2812_PWM_DRIVER PWMD1 #define WS2812_PWM_CHANNEL 1 -#define WS2812_DMA_STREAM STM32_DMA1_STREAM5 -#define WS2812_DMA_CHANNEL 5 +#define WS2812_PWM_DMA_STREAM STM32_DMA1_STREAM5 +#define WS2812_PWM_DMA_CHANNEL 5 diff --git a/keyboards/yandrstudio/nightstar75/config.h b/keyboards/yandrstudio/nightstar75/config.h index 4d5c662999..f29bd573b8 100644 --- a/keyboards/yandrstudio/nightstar75/config.h +++ b/keyboards/yandrstudio/nightstar75/config.h @@ -20,5 +20,5 @@ #define WS2812_PWM_DRIVER PWMD3 // default: PWMD2 #define WS2812_PWM_CHANNEL 2 // default: 2 #define WS2812_PWM_PAL_MODE 2 -#define WS2812_DMA_STREAM STM32_DMA1_STREAM3 -#define WS2812_DMA_CHANNEL 3 +#define WS2812_PWM_DMA_STREAM STM32_DMA1_STREAM3 +#define WS2812_PWM_DMA_CHANNEL 3 diff --git a/keyboards/yandrstudio/nz64/config.h b/keyboards/yandrstudio/nz64/config.h index 81b549b60d..6dd155f74e 100644 --- a/keyboards/yandrstudio/nz64/config.h +++ b/keyboards/yandrstudio/nz64/config.h @@ -18,5 +18,5 @@ #define WS2812_PWM_DRIVER PWMD3 // default: PWMD2 #define WS2812_PWM_CHANNEL 2 // default: 2 #define WS2812_PWM_PAL_MODE 2 // Pin "alternate function", see the respective datasheet for the appropriate values for your MCU. default: 2 -#define WS2812_DMA_STREAM STM32_DMA1_STREAM2 // DMA Stream for TIMx_UP, see the respective reference manual for the appropriate values for your MCU. -#define WS2812_DMA_CHANNEL 5 // DMA Channel for TIMx_UP, see the respective reference manual for the appropriate values for your MCU. +#define WS2812_PWM_DMA_STREAM STM32_DMA1_STREAM2 // DMA Stream for TIMx_UP, see the respective reference manual for the appropriate values for your MCU. +#define WS2812_PWM_DMA_CHANNEL 5 // DMA Channel for TIMx_UP, see the respective reference manual for the appropriate values for your MCU. diff --git a/keyboards/yandrstudio/nz67v2/config.h b/keyboards/yandrstudio/nz67v2/config.h index 7ecdfeafcf..a7ae3e713c 100644 --- a/keyboards/yandrstudio/nz67v2/config.h +++ b/keyboards/yandrstudio/nz67v2/config.h @@ -18,5 +18,5 @@ #define WS2812_PWM_DRIVER PWMD3 // default: PWMD2 #define WS2812_PWM_CHANNEL 2 // default: 2 -#define WS2812_DMA_STREAM STM32_DMA1_STREAM3 // DMA Stream for TIMx_UP, see the respective reference manual for the appropriate values for your MCU. -#define WS2812_DMA_CHANNEL 3 // DMA Channel for TIMx_UP, see the respective reference manual for the appropriate values for your MCU. +#define WS2812_PWM_DMA_STREAM STM32_DMA1_STREAM3 // DMA Stream for TIMx_UP, see the respective reference manual for the appropriate values for your MCU. +#define WS2812_PWM_DMA_CHANNEL 3 // DMA Channel for TIMx_UP, see the respective reference manual for the appropriate values for your MCU. diff --git a/keyboards/yandrstudio/tg67/config.h b/keyboards/yandrstudio/tg67/config.h index 686696be7d..99deee32ac 100644 --- a/keyboards/yandrstudio/tg67/config.h +++ b/keyboards/yandrstudio/tg67/config.h @@ -18,5 +18,5 @@ #define WS2812_PWM_DRIVER PWMD3 #define WS2812_PWM_CHANNEL 2 #define WS2812_PWM_PAL_MODE 2 -#define WS2812_DMA_STREAM STM32_DMA1_STREAM3 -#define WS2812_DMA_CHANNEL 3 +#define WS2812_PWM_DMA_STREAM STM32_DMA1_STREAM3 +#define WS2812_PWM_DMA_CHANNEL 3 diff --git a/keyboards/yandrstudio/yr6095/config.h b/keyboards/yandrstudio/yr6095/config.h index 05a8922788..9837216626 100644 --- a/keyboards/yandrstudio/yr6095/config.h +++ b/keyboards/yandrstudio/yr6095/config.h @@ -19,5 +19,5 @@ #define WS2812_PWM_DRIVER PWMD3 #define WS2812_PWM_CHANNEL 2 -#define WS2812_DMA_STREAM STM32_DMA1_STREAM3 -#define WS2812_DMA_CHANNEL 3 +#define WS2812_PWM_DMA_STREAM STM32_DMA1_STREAM3 +#define WS2812_PWM_DMA_CHANNEL 3 diff --git a/keyboards/yandrstudio/yr80/config.h b/keyboards/yandrstudio/yr80/config.h index 08e10e243e..71d8e72587 100644 --- a/keyboards/yandrstudio/yr80/config.h +++ b/keyboards/yandrstudio/yr80/config.h @@ -21,5 +21,5 @@ #define WS2812_PWM_DRIVER PWMD3 #define WS2812_PWM_CHANNEL 2 #define WS2812_PWM_PAL_MODE 2 -#define WS2812_DMA_STREAM STM32_DMA1_STREAM3 -#define WS2812_DMA_CHANNEL 3 +#define WS2812_PWM_DMA_STREAM STM32_DMA1_STREAM3 +#define WS2812_PWM_DMA_CHANNEL 3 diff --git a/keyboards/yanghu/unicorne/config.h b/keyboards/yanghu/unicorne/config.h index 99d38fe44a..8e625c6336 100644 --- a/keyboards/yanghu/unicorne/config.h +++ b/keyboards/yanghu/unicorne/config.h @@ -31,6 +31,6 @@ #define WS2812_PWM_DRIVER PWMD3 #define WS2812_PWM_CHANNEL 4 #define WS2812_PWM_PAL_MODE 2 -#define WS2812_DMA_STREAM STM32_DMA1_STREAM2 -#define WS2812_DMA_CHANNEL 5 +#define WS2812_PWM_DMA_STREAM STM32_DMA1_STREAM2 +#define WS2812_PWM_DMA_CHANNEL 5 #define WS2812_EXTERNAL_PULLUP diff --git a/keyboards/ymdk/id75/config.h b/keyboards/ymdk/id75/config.h index 14ed1d644c..cb5ac78304 100644 --- a/keyboards/ymdk/id75/config.h +++ b/keyboards/ymdk/id75/config.h @@ -19,5 +19,5 @@ #define WS2812_PWM_DRIVER PWMD4 #define WS2812_PWM_CHANNEL 4 #define WS2812_PWM_PAL_MODE 2 -#define WS2812_DMA_STREAM STM32_DMA1_STREAM7 -#define WS2812_DMA_CHANNEL 7 +#define WS2812_PWM_DMA_STREAM STM32_DMA1_STREAM7 +#define WS2812_PWM_DMA_CHANNEL 7 diff --git a/keyboards/ymdk/ymd75/rev4/iso/config.h b/keyboards/ymdk/ymd75/rev4/iso/config.h index 58c4b34d61..3a0dddaad8 100644 --- a/keyboards/ymdk/ymd75/rev4/iso/config.h +++ b/keyboards/ymdk/ymd75/rev4/iso/config.h @@ -5,5 +5,5 @@ #define WS2812_PWM_DRIVER PWMD4 #define WS2812_PWM_CHANNEL 4 #define WS2812_PWM_PAL_MODE 2 -#define WS2812_DMA_STREAM STM32_DMA1_STREAM7 -#define WS2812_DMA_CHANNEL 7 +#define WS2812_PWM_DMA_STREAM STM32_DMA1_STREAM7 +#define WS2812_PWM_DMA_CHANNEL 7 diff --git a/keyboards/zvecr/split_blackpill/config.h b/keyboards/zvecr/split_blackpill/config.h index 4173935642..dd26e9ca32 100644 --- a/keyboards/zvecr/split_blackpill/config.h +++ b/keyboards/zvecr/split_blackpill/config.h @@ -20,8 +20,8 @@ #define WS2812_PWM_DRIVER PWMD3 #define WS2812_PWM_CHANNEL 1 -#define WS2812_DMA_STREAM STM32_DMA1_STREAM3 -#define WS2812_DMA_CHANNEL 3 +#define WS2812_PWM_DMA_STREAM STM32_DMA1_STREAM3 +#define WS2812_PWM_DMA_CHANNEL 3 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE diff --git a/keyboards/zvecr/zv48/config.h b/keyboards/zvecr/zv48/config.h index e503f07b80..a67a46a185 100644 --- a/keyboards/zvecr/zv48/config.h +++ b/keyboards/zvecr/zv48/config.h @@ -22,8 +22,8 @@ #define WS2812_PWM_DRIVER PWMD3 #define WS2812_PWM_CHANNEL 4 #define WS2812_PWM_PAL_MODE 2 -#define WS2812_DMA_STREAM STM32_DMA1_STREAM2 -#define WS2812_DMA_CHANNEL 5 +#define WS2812_PWM_DMA_STREAM STM32_DMA1_STREAM2 +#define WS2812_PWM_DMA_CHANNEL 5 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE diff --git a/platforms/chibios/boards/BONSAI_C4/configs/config.h b/platforms/chibios/boards/BONSAI_C4/configs/config.h index 193b028bde..e933cd6fd1 100644 --- a/platforms/chibios/boards/BONSAI_C4/configs/config.h +++ b/platforms/chibios/boards/BONSAI_C4/configs/config.h @@ -77,11 +77,11 @@ # ifndef WS2812_PWM_PAL_MODE # define WS2812_PWM_PAL_MODE 1 # endif -# ifndef WS2812_DMA_STREAM -# define WS2812_DMA_STREAM STM32_DMA2_STREAM5 +# ifndef WS2812_PWM_DMA_STREAM +# define WS2812_PWM_DMA_STREAM STM32_DMA2_STREAM5 # endif -# ifndef WS2812_DMA_CHANNEL -# define WS2812_DMA_CHANNEL 6 +# ifndef WS2812_PWM_DMA_CHANNEL +# define WS2812_PWM_DMA_CHANNEL 6 # endif #endif diff --git a/platforms/chibios/drivers/vendor/RP/RP2040/ws2812_vendor.c b/platforms/chibios/drivers/vendor/RP/RP2040/ws2812_vendor.c index de317e269a..799d96b3c6 100644 --- a/platforms/chibios/drivers/vendor/RP/RP2040/ws2812_vendor.c +++ b/platforms/chibios/drivers/vendor/RP/RP2040/ws2812_vendor.c @@ -136,7 +136,7 @@ static const pio_program_t ws2812_program = { }; static uint32_t WS2812_BUFFER[WS2812_LED_COUNT]; -static const rp_dma_channel_t* WS2812_DMA_CHANNEL; +static const rp_dma_channel_t* dma_channel; static uint32_t RP_DMA_MODE_WS2812; static int STATE_MACHINE = -1; @@ -236,9 +236,9 @@ bool ws2812_init(void) { pio_sm_init(pio, STATE_MACHINE, offset, &config); pio_sm_set_enabled(pio, STATE_MACHINE, true); - WS2812_DMA_CHANNEL = dmaChannelAlloc(RP_DMA_CHANNEL_ID_ANY, RP_DMA_PRIORITY_WS2812, (rp_dmaisr_t)ws2812_dma_callback, NULL); - dmaChannelEnableInterruptX(WS2812_DMA_CHANNEL); - dmaChannelSetDestinationX(WS2812_DMA_CHANNEL, (uint32_t)&pio->txf[STATE_MACHINE]); + dma_channel = dmaChannelAlloc(RP_DMA_CHANNEL_ID_ANY, RP_DMA_PRIORITY_WS2812, (rp_dmaisr_t)ws2812_dma_callback, NULL); + dmaChannelEnableInterruptX(dma_channel); + dmaChannelSetDestinationX(dma_channel, (uint32_t)&pio->txf[STATE_MACHINE]); // clang-format off RP_DMA_MODE_WS2812 = DMA_CTRL_TRIG_INCR_READ | @@ -256,7 +256,7 @@ static inline void sync_ws2812_transfer(void) { // count of LEDs in milliseconds. This is safely much longer than it // would take to push all the data out. dprintln("ERROR: WS2812 DMA transfer has stalled, aborting!"); - dmaChannelDisableX(WS2812_DMA_CHANNEL); + dmaChannelDisableX(dma_channel); pio_sm_clear_fifos(pio, STATE_MACHINE); pio_sm_restart(pio, STATE_MACHINE); chSemReset(&TRANSFER_COUNTER, 0); @@ -284,8 +284,8 @@ void ws2812_setleds(rgb_led_t* ledarray, uint16_t leds) { #endif } - dmaChannelSetSourceX(WS2812_DMA_CHANNEL, (uint32_t)WS2812_BUFFER); - dmaChannelSetCounterX(WS2812_DMA_CHANNEL, leds); - dmaChannelSetModeX(WS2812_DMA_CHANNEL, RP_DMA_MODE_WS2812); - dmaChannelEnableX(WS2812_DMA_CHANNEL); + dmaChannelSetSourceX(dma_channel, (uint32_t)WS2812_BUFFER); + dmaChannelSetCounterX(dma_channel, leds); + dmaChannelSetModeX(dma_channel, RP_DMA_MODE_WS2812); + dmaChannelEnableX(dma_channel); } diff --git a/platforms/chibios/drivers/ws2812_pwm.c b/platforms/chibios/drivers/ws2812_pwm.c index 6bba22767f..e0b3bfd5b5 100644 --- a/platforms/chibios/drivers/ws2812_pwm.c +++ b/platforms/chibios/drivers/ws2812_pwm.c @@ -2,6 +2,18 @@ #include "gpio.h" #include "chibios_config.h" +// ======== DEPRECATED DEFINES - DO NOT USE ======== +#ifdef WS2812_DMA_STREAM +# define WS2812_PWM_DMA_STREAM WS2812_DMA_STREAM +#endif +#ifdef WS2812_DMA_CHANNEL +# define WS2812_PWM_DMA_CHANNEL WS2812_DMA_CHANNEL +#endif +#ifdef WS2812_DMAMUX_ID +# define WS2812_PWM_DMAMUX_ID WS2812_DMAMUX_ID +#endif +// ======== + /* Adapted from https://github.com/joewa/WS2812-LED-Driver_ChibiOS/ */ #ifdef RGBW @@ -19,14 +31,14 @@ #ifndef WS2812_PWM_PAL_MODE # define WS2812_PWM_PAL_MODE 2 // DI Pin's alternate function value #endif -#ifndef WS2812_DMA_STREAM -# define WS2812_DMA_STREAM STM32_DMA1_STREAM2 // DMA Stream for TIMx_UP +#ifndef WS2812_PWM_DMA_STREAM +# define WS2812_PWM_DMA_STREAM STM32_DMA1_STREAM2 // DMA Stream for TIMx_UP #endif -#ifndef WS2812_DMA_CHANNEL -# define WS2812_DMA_CHANNEL 2 // DMA Channel for TIMx_UP +#ifndef WS2812_PWM_DMA_CHANNEL +# define WS2812_PWM_DMA_CHANNEL 2 // DMA Channel for TIMx_UP #endif -#if (STM32_DMA_SUPPORTS_DMAMUX == TRUE) && !defined(WS2812_DMAMUX_ID) -# error "please consult your MCU's datasheet and specify in your config.h: #define WS2812_DMAMUX_ID STM32_DMAMUX1_TIM?_UP" +#if (STM32_DMA_SUPPORTS_DMAMUX == TRUE) && !defined(WS2812_PWM_DMAMUX_ID) +# error "please consult your MCU's datasheet and specify in your config.h: #define WS2812_PWM_DMAMUX_ID STM32_DMAMUX1_TIM?_UP" #endif /* Summarize https://www.st.com/resource/en/application_note/an4013-stm32-crossseries-timer-overview-stmicroelectronics.pdf to @@ -270,20 +282,20 @@ // For all other STM32 DMA transfer will automatically zero pad. We only need to set the right peripheral width. #if defined(STM32F2XX) || defined(STM32F4XX) || defined(STM32F7XX) # if defined(WS2812_PWM_TIMER_32BIT) -# define WS2812_DMA_MEMORY_WIDTH STM32_DMA_CR_MSIZE_WORD -# define WS2812_DMA_PERIPHERAL_WIDTH STM32_DMA_CR_PSIZE_WORD +# define WS2812_PWM_DMA_MEMORY_WIDTH STM32_DMA_CR_MSIZE_WORD +# define WS2812_PWM_DMA_PERIPHERAL_WIDTH STM32_DMA_CR_PSIZE_WORD typedef uint32_t ws2812_buffer_t; # else -# define WS2812_DMA_MEMORY_WIDTH STM32_DMA_CR_MSIZE_HWORD -# define WS2812_DMA_PERIPHERAL_WIDTH STM32_DMA_CR_PSIZE_HWORD +# define WS2812_PWM_DMA_MEMORY_WIDTH STM32_DMA_CR_MSIZE_HWORD +# define WS2812_PWM_DMA_PERIPHERAL_WIDTH STM32_DMA_CR_PSIZE_HWORD typedef uint16_t ws2812_buffer_t; # endif #else -# define WS2812_DMA_MEMORY_WIDTH STM32_DMA_CR_MSIZE_BYTE +# define WS2812_PWM_DMA_MEMORY_WIDTH STM32_DMA_CR_MSIZE_BYTE # if defined(WS2812_PWM_TIMER_32BIT) -# define WS2812_DMA_PERIPHERAL_WIDTH STM32_DMA_CR_PSIZE_WORD +# define WS2812_PWM_DMA_PERIPHERAL_WIDTH STM32_DMA_CR_PSIZE_WORD # else -# define WS2812_DMA_PERIPHERAL_WIDTH STM32_DMA_CR_PSIZE_HWORD +# define WS2812_PWM_DMA_PERIPHERAL_WIDTH STM32_DMA_CR_PSIZE_HWORD # endif typedef uint8_t ws2812_buffer_t; #endif @@ -326,26 +338,26 @@ void ws2812_init(void) { // Configure DMA // dmaInit(); // Joe added this #if defined(WB32F3G71xx) || defined(WB32FQ95xx) - dmaStreamAlloc(WS2812_DMA_STREAM - WB32_DMA_STREAM(0), 10, NULL, NULL); - dmaStreamSetSource(WS2812_DMA_STREAM, ws2812_frame_buffer); - dmaStreamSetDestination(WS2812_DMA_STREAM, &(WS2812_PWM_DRIVER.tim->CCR[WS2812_PWM_CHANNEL - 1])); // Ziel ist der An-Zeit im Cap-Comp-Register - dmaStreamSetMode(WS2812_DMA_STREAM, WB32_DMA_CHCFG_HWHIF(WS2812_DMA_CHANNEL) | WB32_DMA_CHCFG_DIR_M2P | WB32_DMA_CHCFG_PSIZE_WORD | WB32_DMA_CHCFG_MSIZE_WORD | WB32_DMA_CHCFG_MINC | WB32_DMA_CHCFG_CIRC | WB32_DMA_CHCFG_TCIE | WB32_DMA_CHCFG_PL(3)); + dmaStreamAlloc(WS2812_PWM_DMA_STREAM - WB32_DMA_STREAM(0), 10, NULL, NULL); + dmaStreamSetSource(WS2812_PWM_DMA_STREAM, ws2812_frame_buffer); + dmaStreamSetDestination(WS2812_PWM_DMA_STREAM, &(WS2812_PWM_DRIVER.tim->CCR[WS2812_PWM_CHANNEL - 1])); // Ziel ist der An-Zeit im Cap-Comp-Register + dmaStreamSetMode(WS2812_PWM_DMA_STREAM, WB32_DMA_CHCFG_HWHIF(WS2812_PWM_DMA_CHANNEL) | WB32_DMA_CHCFG_DIR_M2P | WB32_DMA_CHCFG_PSIZE_WORD | WB32_DMA_CHCFG_MSIZE_WORD | WB32_DMA_CHCFG_MINC | WB32_DMA_CHCFG_CIRC | WB32_DMA_CHCFG_TCIE | WB32_DMA_CHCFG_PL(3)); #else - dmaStreamAlloc(WS2812_DMA_STREAM - STM32_DMA_STREAM(0), 10, NULL, NULL); - dmaStreamSetPeripheral(WS2812_DMA_STREAM, &(WS2812_PWM_DRIVER.tim->CCR[WS2812_PWM_CHANNEL - 1])); // Ziel ist der An-Zeit im Cap-Comp-Register - dmaStreamSetMemory0(WS2812_DMA_STREAM, ws2812_frame_buffer); - dmaStreamSetMode(WS2812_DMA_STREAM, STM32_DMA_CR_CHSEL(WS2812_DMA_CHANNEL) | STM32_DMA_CR_DIR_M2P | WS2812_DMA_PERIPHERAL_WIDTH | WS2812_DMA_MEMORY_WIDTH | STM32_DMA_CR_MINC | STM32_DMA_CR_CIRC | STM32_DMA_CR_PL(3)); + dmaStreamAlloc(WS2812_PWM_DMA_STREAM - STM32_DMA_STREAM(0), 10, NULL, NULL); + dmaStreamSetPeripheral(WS2812_PWM_DMA_STREAM, &(WS2812_PWM_DRIVER.tim->CCR[WS2812_PWM_CHANNEL - 1])); // Ziel ist der An-Zeit im Cap-Comp-Register + dmaStreamSetMemory0(WS2812_PWM_DMA_STREAM, ws2812_frame_buffer); + dmaStreamSetMode(WS2812_PWM_DMA_STREAM, STM32_DMA_CR_CHSEL(WS2812_PWM_DMA_CHANNEL) | STM32_DMA_CR_DIR_M2P | WS2812_PWM_DMA_PERIPHERAL_WIDTH | WS2812_PWM_DMA_MEMORY_WIDTH | STM32_DMA_CR_MINC | STM32_DMA_CR_CIRC | STM32_DMA_CR_PL(3)); #endif - dmaStreamSetTransactionSize(WS2812_DMA_STREAM, WS2812_BIT_N); + dmaStreamSetTransactionSize(WS2812_PWM_DMA_STREAM, WS2812_BIT_N); // M2P: Memory 2 Periph; PL: Priority Level #if (STM32_DMA_SUPPORTS_DMAMUX == TRUE) // If the MCU has a DMAMUX we need to assign the correct resource - dmaSetRequestSource(WS2812_DMA_STREAM, WS2812_DMAMUX_ID); + dmaSetRequestSource(WS2812_PWM_DMA_STREAM, WS2812_PWM_DMAMUX_ID); #endif // Start DMA - dmaStreamEnable(WS2812_DMA_STREAM); + dmaStreamEnable(WS2812_PWM_DMA_STREAM); // Configure PWM // NOTE: It's required that preload be enabled on the timer channel CCR register. This is currently enabled in the