Skip to content

Commit

Permalink
Move WS2812_DRIVER to data driven (qmk#20248)
Browse files Browse the repository at this point in the history
  • Loading branch information
fauxpark authored and nicsuzor committed Mar 28, 2023
1 parent 5be8375 commit 131b390
Show file tree
Hide file tree
Showing 384 changed files with 583 additions and 211 deletions.
1 change: 1 addition & 0 deletions data/mappings/info_rules.hjson
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
"PS2_ENABLE": {"info_key": "ps2.enabled", "value_type": "bool"},
"PS2_MOUSE_ENABLE": {"info_key": "ps2.mouse_enabled", "value_type": "bool"},
"PS2_DRIVER": {"info_key": "ps2.driver"},
"WS2812_DRIVER": {"info_key": "ws2812.driver"},

"PLATFORM_KEY": {"info_key": "platform_key", "to_json": false},

Expand Down
10 changes: 10 additions & 0 deletions data/schemas/keyboard.jsonschema
Original file line number Diff line number Diff line change
Expand Up @@ -699,6 +699,16 @@
"led": {"$ref": "qmk.definitions.v1#/mcu_pin"},
"speaker": {"$ref": "qmk.definitions.v1#/mcu_pin"}
}
},
"ws2812": {
"type": "object",
"additionalProperties": false,
"properties": {
"driver": {
"type": "string",
"enum": ["bitbang", "i2c", "pwm", "spi", "vendor"]
}
}
}
}
}
5 changes: 5 additions & 0 deletions keyboards/0xcb/splaytoraid/rp2040_ce/info.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"ws2812": {
"driver": "vendor"
}
}
1 change: 0 additions & 1 deletion keyboards/0xcb/splaytoraid/rp2040_ce/rules.mk
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
WS2812_DRIVER = vendor
CONVERT_TO = rp2040_ce
3 changes: 3 additions & 0 deletions keyboards/1upkeyboards/pi40/grid_v1_1/info.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@
"dynamic_keymap": {
"layer_count": 10
},
"ws2812": {
"driver": "vendor"
},
"features": {
"audio": false,
"backlight": false,
Expand Down
3 changes: 3 additions & 0 deletions keyboards/1upkeyboards/pi40/mit_v1_0/info.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@
"dynamic_keymap": {
"layer_count": 10
},
"ws2812": {
"driver": "vendor"
},
"features": {
"audio": false,
"backlight": false,
Expand Down
3 changes: 3 additions & 0 deletions keyboards/1upkeyboards/pi40/mit_v1_1/info.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@
"dynamic_keymap": {
"layer_count": 10
},
"ws2812": {
"driver": "vendor"
},
"features": {
"audio": false,
"backlight": false,
Expand Down
2 changes: 0 additions & 2 deletions keyboards/1upkeyboards/pi40/rules.mk
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
WS2812_DRIVER = vendor

OLED_ENABLE = yes
OLED_DRIVER = SSD1306

Expand Down
3 changes: 3 additions & 0 deletions keyboards/1upkeyboards/pi60/info.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@
"rgb_matrix": true,
"rgblight": false
},
"ws2812": {
"driver": "vendor"
},
"matrix_pins": {
"cols": ["GP5", "GP8", "GP11", "GP6", "GP7", "GP0", "GP26", "GP10", "GP9", "GP1", "GP18", "GP20", "GP21", "GP27", "GP28", "GP19"],
"rows": ["GP12", "GP13", "GP16", "GP25", "GP29"]
Expand Down
1 change: 0 additions & 1 deletion keyboards/1upkeyboards/pi60/rules.mk
Original file line number Diff line number Diff line change
@@ -1 +0,0 @@
WS2812_DRIVER = vendor
3 changes: 3 additions & 0 deletions keyboards/1upkeyboards/pi60_hse/info.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@
"rgb_matrix": true,
"rgblight": false
},
"ws2812": {
"driver": "vendor"
},
"matrix_pins": {
"cols": ["GP9", "GP8", "GP6", "GP5", "GP14", "GP20", "GP13", "GP12", "GP11", "GP16", "GP17", "GP10", "GP19", "GP18"],
"rows": ["GP4", "GP3", "GP2", "GP1", "GP0", "GP21"]
Expand Down
1 change: 0 additions & 1 deletion keyboards/1upkeyboards/pi60_hse/rules.mk
Original file line number Diff line number Diff line change
@@ -1 +0,0 @@
WS2812_DRIVER = vendor
3 changes: 3 additions & 0 deletions keyboards/1upkeyboards/pi60_rgb/info.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@
"rgb_matrix": true,
"rgblight": false
},
"ws2812": {
"driver": "vendor"
},
"matrix_pins": {
"cols": ["GP3", "GP4", "GP5", "GP20", "GP18", "GP13", "GP17", "GP16", "GP15", "GP12", "GP11", "GP14", "GP10", "GP9"],
"rows": ["GP1", "GP2", "GP8", "GP6", "GP0", "GP21"]
Expand Down
1 change: 0 additions & 1 deletion keyboards/1upkeyboards/pi60_rgb/rules.mk
Original file line number Diff line number Diff line change
@@ -1 +0,0 @@
WS2812_DRIVER = vendor
3 changes: 3 additions & 0 deletions keyboards/1upkeyboards/sweet16v2/kb2040/info.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@
"rgb_matrix": true,
"rgblight": false
},
"ws2812": {
"driver": "vendor"
},
"matrix_pins": {
"cols": ["GP2", "GP9", "GP8", "GP7"],
"rows": ["GP26", "GP1", "GP18", "GP5"]
Expand Down
1 change: 0 additions & 1 deletion keyboards/1upkeyboards/sweet16v2/kb2040/rules.mk
Original file line number Diff line number Diff line change
@@ -1 +0,0 @@
WS2812_DRIVER = vendor
3 changes: 3 additions & 0 deletions keyboards/4pplet/eagle_viper_rep/rev_a/info.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@
"levels": 10,
"breathing": true
},
"ws2812": {
"driver": "spi"
},
"processor": "STM32F072",
"bootloader": "stm32-dfu",
"layouts": {
Expand Down
1 change: 0 additions & 1 deletion keyboards/4pplet/eagle_viper_rep/rev_a/rules.mk
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ COMMAND_ENABLE = yes # Commands for debug and configuration
NKRO_ENABLE = yes # Enable N-Key Rollover
BACKLIGHT_ENABLE = yes
RGBLIGHT_ENABLE = yes
WS2812_DRIVER = spi

# Wildcard to allow APM32 MCU
DFU_SUFFIX_ARGS = -p FFFF -v FFFF
Expand Down
3 changes: 3 additions & 0 deletions keyboards/abatskeyboardclub/nayeon/info.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@
"pid": "0x0001",
"device_version": "2.0.0"
},
"ws2812": {
"driver": "vendor"
},
"processor": "RP2040",
"bootloader": "rp2040",
"diode_direction": "COL2ROW",
Expand Down
1 change: 0 additions & 1 deletion keyboards/abatskeyboardclub/nayeon/rules.mk
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# RGB Matrix
RGB_MATRIX_ENABLE = yes
RGB_MATRIX_DRIVER = WS2812
WS2812_DRIVER = vendor
3 changes: 3 additions & 0 deletions keyboards/adafruit/macropad/info.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@
"bootmagic": {
"matrix": [1, 2]
},
"ws2812": {
"driver": "vendor"
},
"processor": "RP2040",
"bootloader": "rp2040",
"matrix_pins": {
Expand Down
1 change: 0 additions & 1 deletion keyboards/adafruit/macropad/rules.mk
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ AUDIO_ENABLE = no # Audio output
ENCODER_ENABLE = yes
RGB_MATRIX_ENABLE = yes
RGB_MATRIX_DRIVER = WS2812
WS2812_DRIVER = vendor
OLED_ENABLE = yes
OLED_DRIVER = custom
# Project specific files
Expand Down
3 changes: 3 additions & 0 deletions keyboards/aeboards/ext65/rev2/info.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@
"levels": 6,
"breathing": true
},
"ws2812": {
"driver": "spi"
},
"processor": "STM32F072",
"bootloader": "stm32-dfu",
"diode_direction": "COL2ROW",
Expand Down
1 change: 0 additions & 1 deletion keyboards/aeboards/ext65/rev2/rules.mk
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow
AUDIO_ENABLE = no # Audio output
SLEEP_LED_ENABLE = yes
WS2812_DRIVER = spi

# Enter lower-power sleep mode when on the ChibiOS idle thread
OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE
3 changes: 3 additions & 0 deletions keyboards/amag23/info.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@
"pid": "0x2323",
"device_version": "0.0.1"
},
"ws2812": {
"driver": "i2c"
},
"matrix_pins": {
"cols": ["B0", "B1", "B2", "B3", "B4", "B5"],
"rows": ["A0", "A1", "A2", "A3"]
Expand Down
1 change: 0 additions & 1 deletion keyboards/amag23/rules.mk
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,3 @@ CONSOLE_ENABLE = no # Console for debug
COMMAND_ENABLE = no # Commands for debug and configuration
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow
WS2812_DRIVER = i2c
3 changes: 3 additions & 0 deletions keyboards/an_achronism/tetromino/info.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@
"rgblight": false,
"rgb_matrix": true
},
"ws2812": {
"driver": "vendor"
},
"diode_direction": "COL2ROW",
"matrix_pins": {
"cols": ["GP0", "GP1", "GP2", "GP3", "GP4", "GP5", "GP6",
Expand Down
2 changes: 0 additions & 2 deletions keyboards/an_achronism/tetromino/rules.mk
Original file line number Diff line number Diff line change
@@ -1,2 +0,0 @@
# Use dedicated PIO on Raspberry Pi Pico for RGB LEDs:
WS2812_DRIVER = vendor
3 changes: 3 additions & 0 deletions keyboards/anavi/knob1/info.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@
"twinkle": true
}
},
"ws2812": {
"driver": "vendor"
},
"encoder": {
"enabled": true,
"rotary": [
Expand Down
2 changes: 0 additions & 2 deletions keyboards/anavi/knob1/rules.mk
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
WS2812_DRIVER = vendor

OLED_ENABLE = yes
OLED_DRIVER = SSD1306 # Enable Support for SSD1306 or SH1106 OLED Displays; Communicating over I2C

Expand Down
3 changes: 3 additions & 0 deletions keyboards/anavi/knobs3/info.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@
"twinkle": true
}
},
"ws2812": {
"driver": "vendor"
},
"encoder": {
"enabled": true,
"rotary": [
Expand Down
2 changes: 0 additions & 2 deletions keyboards/anavi/knobs3/rules.mk
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
WS2812_DRIVER = vendor

OLED_ENABLE = yes
OLED_DRIVER = SSD1306 # Enable Support for SSD1306 or SH1106 OLED Displays; Communicating over I2C

Expand Down
3 changes: 3 additions & 0 deletions keyboards/anavi/macropad10/info.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@
"twinkle": true
}
},
"ws2812": {
"driver": "vendor"
},
"encoder": {
"enabled": true,
"rotary": [
Expand Down
1 change: 0 additions & 1 deletion keyboards/anavi/macropad10/rules.mk
Original file line number Diff line number Diff line change
@@ -1 +0,0 @@
WS2812_DRIVER = vendor
3 changes: 3 additions & 0 deletions keyboards/ares/info.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@
"bootmagic": {
"matrix": [4, 0]
},
"ws2812": {
"driver": "i2c"
},
"processor": "atmega32a",
"bootloader": "bootloadhid",
"layout_aliases": {
Expand Down
1 change: 0 additions & 1 deletion keyboards/ares/rules.mk
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,3 @@ CONSOLE_ENABLE = no # Console for debug
COMMAND_ENABLE = yes # Commands for debug and configuration
BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
WS2812_DRIVER = i2c
3 changes: 3 additions & 0 deletions keyboards/aurora65/info.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@
"pid": "0x4136",
"device_version": "0.0.1"
},
"ws2812": {
"driver": "pwm"
},
"matrix_pins": {
"cols": ["A13", "A10", "A9", "A14", "A15", "B8", "B9", "B2", "B1", "B0", "A0", "A1", "A2", "A3", "A5"],
"rows": ["B3", "B4", "B5", "A8", "A4"]
Expand Down
1 change: 0 additions & 1 deletion keyboards/aurora65/rules.mk
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,4 @@ COMMAND_ENABLE = no # Commands for debug and configuration
NKRO_ENABLE = yes # Enable N-Key Rollover
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow
WS2812_DRIVER = pwm # Driver for RGB uderglow
AUDIO_ENABLE = no # Audio output
3 changes: 3 additions & 0 deletions keyboards/bastardkb/charybdis/3x5/blackpill/info.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
"usb": {
"device_version": "1.0.0"
},
"ws2812": {
"driver": "pwm"
},
"matrix_pins": {
"cols": ["B1", "B10", "B3", "B4", "B5"],
"rows": ["A2", "B8", "A8", "B9"]
Expand Down
1 change: 0 additions & 1 deletion keyboards/bastardkb/charybdis/3x5/blackpill/rules.mk
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ MOUSE_SHARED_EP = no # Unify multiple HID interfaces into a single Endpoint
KEYBOARD_SHARED_EP = yes

EEPROM_DRIVER = spi
WS2812_DRIVER = pwm
SERIAL_DRIVER = usart

DEBOUNCE_TYPE = asym_eager_defer_pk
3 changes: 3 additions & 0 deletions keyboards/bastardkb/charybdis/3x5/v2/splinky_2/info.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@
"split": {
"soft_serial_pin": "GP1"
},
"ws2812": {
"driver": "vendor"
},
"processor": "RP2040",
"bootloader": "rp2040"
}
1 change: 0 additions & 1 deletion keyboards/bastardkb/charybdis/3x5/v2/splinky_2/rules.mk
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,3 @@ POINTING_DEVICE_ENABLE = yes # Enable trackball
POINTING_DEVICE_DRIVER = pmw3360

SERIAL_DRIVER = vendor
WS2812_DRIVER = vendor
3 changes: 3 additions & 0 deletions keyboards/bastardkb/charybdis/3x5/v2/splinky_3/info.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@
"split": {
"soft_serial_pin": "GP1"
},
"ws2812": {
"driver": "vendor"
},
"processor": "RP2040",
"bootloader": "rp2040"
}
1 change: 0 additions & 1 deletion keyboards/bastardkb/charybdis/3x5/v2/splinky_3/rules.mk
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,3 @@ POINTING_DEVICE_ENABLE = yes # Enable trackball
POINTING_DEVICE_DRIVER = pmw3360

SERIAL_DRIVER = vendor
WS2812_DRIVER = vendor
3 changes: 3 additions & 0 deletions keyboards/bastardkb/charybdis/3x5/v2/stemcell/info.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
"usb": {
"device_version": "2.0.0"
},
"ws2812": {
"driver": "pwm"
},
"matrix_pins": {
"cols": ["F5", "B6", "D7", "E6", "B4"],
"rows": ["F7", "C6", "D4", "B5"]
Expand Down
1 change: 0 additions & 1 deletion keyboards/bastardkb/charybdis/3x5/v2/stemcell/rules.mk
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,5 @@ MOUSE_SHARED_EP = no # Unify multiple HID interfaces into a single Endpoint
KEYBOARD_SHARED_EP = yes

SERIAL_DRIVER = usart
WS2812_DRIVER = pwm

DEBOUNCE_TYPE = asym_eager_defer_pk
3 changes: 3 additions & 0 deletions keyboards/bastardkb/charybdis/3x6/blackpill/info.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
"usb": {
"device_version": "1.0.0"
},
"ws2812": {
"driver": "pwm"
},
"matrix_pins": {
"cols": ["B0", "B1", "B10", "B3", "B4", "B5"],
"rows": ["A2", "B8", "A8", "B9"]
Expand Down
1 change: 0 additions & 1 deletion keyboards/bastardkb/charybdis/3x6/blackpill/rules.mk
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ MOUSE_SHARED_EP = no # Unify multiple HID interfaces into a single Endpoint
KEYBOARD_SHARED_EP = yes

EEPROM_DRIVER = spi
WS2812_DRIVER = pwm
SERIAL_DRIVER = usart

DEBOUNCE_TYPE = asym_eager_defer_pk
3 changes: 3 additions & 0 deletions keyboards/bastardkb/charybdis/3x6/v2/splinky_2/info.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@
"split": {
"soft_serial_pin": "GP1"
},
"ws2812": {
"driver": "vendor"
},
"processor": "RP2040",
"bootloader": "rp2040"
}
1 change: 0 additions & 1 deletion keyboards/bastardkb/charybdis/3x6/v2/splinky_2/rules.mk
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,3 @@ POINTING_DEVICE_ENABLE = yes # Enable trackball
POINTING_DEVICE_DRIVER = pmw3360

SERIAL_DRIVER = vendor
WS2812_DRIVER = vendor
3 changes: 3 additions & 0 deletions keyboards/bastardkb/charybdis/3x6/v2/splinky_3/info.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@
"split": {
"soft_serial_pin": "GP1"
},
"ws2812": {
"driver": "vendor"
},
"processor": "RP2040",
"bootloader": "rp2040"
}
Loading

0 comments on commit 131b390

Please sign in to comment.