mirror of
https://github.com/qmk/qmk_firmware
synced 2024-12-22 08:26:21 +00:00
Migrate rgblight.pin
and RGB_DI_PIN
to ws2812.pin
(#20303)
This commit is contained in:
parent
71c22a12db
commit
47966dc2a6
@ -73,7 +73,6 @@
|
||||
"PS2_DATA_PIN": {"info_key": "ps2.data_pin"},
|
||||
"RETRO_TAPPING": {"info_key": "tapping.retro", "value_type": "bool"},
|
||||
"RETRO_TAPPING_PER_KEY": {"info_key": "tapping.retro_per_key", "value_type": "bool"},
|
||||
"RGB_DI_PIN": {"info_key": "rgblight.pin"},
|
||||
"RGBLED_NUM": {"info_key": "rgblight.led_count", "value_type": "int"},
|
||||
"RGBLED_SPLIT": {"info_key": "rgblight.split_count", "value_type": "array.int"},
|
||||
"RGBLIGHT_LAYER_BLINK": {"info_key": "rgblight.layers.blink", "value_type": "bool"},
|
||||
@ -120,10 +119,12 @@
|
||||
"USB_MAX_POWER_CONSUMPTION": {"info_key": "usb.max_power", "value_type": "int"},
|
||||
"USB_POLLING_INTERVAL_MS": {"info_key": "usb.polling_interval", "value_type": "int"},
|
||||
"USB_SUSPEND_WAKEUP_DELAY": {"info_key": "usb.suspend_wakeup_delay", "value_type": "int"},
|
||||
"WS2812_DI_PIN": {"info_key": "ws2812.pin"},
|
||||
"WS2812_I2C_ADDRESS": {"info_key": "ws2812.i2c_address", "value_type": "hex"},
|
||||
"WS2812_I2C_TIMEOUT": {"info_key": "ws2812.i2c_timeout", "value_type": "int"},
|
||||
|
||||
// Items we want flagged in lint
|
||||
"RGB_DI_PIN": {"info_key": "rgblight.pin", "invalid": true, "replace_with": "WS2812_DI_PIN or APA102_DI_PIN"},
|
||||
"NO_ACTION_MACRO": {"info_key": "_invalid.no_action_macro", "invalid": true},
|
||||
"NO_ACTION_FUNCTION": {"info_key": "_invalid.no_action_function", "invalid": true},
|
||||
"DESCRIPTION": {"info_key": "_invalid.usb_description", "invalid": true},
|
||||
|
@ -492,7 +492,10 @@
|
||||
},
|
||||
"led_count": {"$ref": "qmk.definitions.v1#/unsigned_int"},
|
||||
"max_brightness": {"$ref": "qmk.definitions.v1#/unsigned_int_8"},
|
||||
"pin": {"$ref": "qmk.definitions.v1#/mcu_pin"},
|
||||
"pin": {
|
||||
"$ref": "qmk.definitions.v1#/mcu_pin",
|
||||
"$comment": "Deprecated: use ws2812.pin instead"
|
||||
},
|
||||
"rgbw": {"type": "boolean"},
|
||||
"saturation_steps": {"$ref": "qmk.definitions.v1#/unsigned_int"},
|
||||
"sleep": {"type": "boolean"},
|
||||
@ -715,6 +718,7 @@
|
||||
"type": "string",
|
||||
"enum": ["bitbang", "custom", "i2c", "pwm", "spi", "vendor"]
|
||||
},
|
||||
"pin": {"$ref": "qmk.definitions.v1#/mcu_pin"},
|
||||
"i2c_address": {"$ref": "qmk.definitions.v1#/hex_number_2d"},
|
||||
"i2c_timeout": {"$ref": "qmk.definitions.v1#/unsigned_int"}
|
||||
}
|
||||
|
@ -214,7 +214,7 @@ If you define these options you will enable the associated feature, which may in
|
||||
|
||||
## RGB Light Configuration
|
||||
|
||||
* `#define RGB_DI_PIN D7`
|
||||
* `#define WS2812_DI_PIN D7`
|
||||
* pin the DI on the WS2812 is hooked-up to
|
||||
* `#define RGBLIGHT_LAYERS`
|
||||
* Lets you define [lighting layers](feature_rgblight.md?id=lighting-layers) that can be toggled on or off. Great for showing the current keyboard layer or caps lock state.
|
||||
@ -230,7 +230,7 @@ If you define these options you will enable the associated feature, which may in
|
||||
* `#define RGBLIGHT_SPLIT`
|
||||
* Needed if both halves of the board have RGB LEDs wired directly to the RGB output pin on the controllers instead of passing the output of the left half to the input of the right half
|
||||
* `#define RGBLED_SPLIT { 6, 6 }`
|
||||
* number of LEDs connected that are directly wired to `RGB_DI_PIN` on each half of a split keyboard
|
||||
* number of LEDs connected that are directly wired to the RGB pin on each half of a split keyboard
|
||||
* First value indicates number of LEDs for left half, second value is for the right half
|
||||
* When RGBLED_SPLIT is defined, RGBLIGHT_SPLIT is implicitly defined.
|
||||
* `#define RGBLIGHT_HUE_STEP 12`
|
||||
|
@ -361,7 +361,7 @@ Configure the hardware via your `config.h`:
|
||||
|
||||
```c
|
||||
// The pin connected to the data pin of the LEDs
|
||||
#define RGB_DI_PIN D7
|
||||
#define WS2812_DI_PIN D7
|
||||
// The number of LEDs connected
|
||||
#define RGB_MATRIX_LED_COUNT 70
|
||||
```
|
||||
|
@ -33,13 +33,13 @@ RGBLIGHT_DRIVER = APA102
|
||||
|
||||
At minimum you must define the data pin your LED strip is connected to, and the number of LEDs in the strip, in your `config.h`. For APA102 LEDs, you must also define the clock pin. If your keyboard has onboard RGB LEDs, and you are simply creating a keymap, you usually won't need to modify these.
|
||||
|
||||
|Define |Description |
|
||||
|---------------|---------------------------------------------------------------------------------------------------------|
|
||||
|`RGB_DI_PIN` |The pin connected to the data pin of the LEDs (WS2812) |
|
||||
|`APA102_DI_PIN`|The pin connected to the data pin of the LEDs (APA102) |
|
||||
|`APA102_CI_PIN`|The pin connected to the clock pin of the LEDs (APA102) |
|
||||
|`RGBLED_NUM` |The number of LEDs connected |
|
||||
|`RGBLED_SPLIT` |(Optional) For split keyboards, the number of LEDs connected on each half directly wired to `RGB_DI_PIN` |
|
||||
|Define |Description |
|
||||
|---------------|-------------------------------------------------------------------------|
|
||||
|`WS2812_DI_PIN`|The pin connected to the data pin of the LEDs (WS2812) |
|
||||
|`APA102_DI_PIN`|The pin connected to the data pin of the LEDs (APA102) |
|
||||
|`APA102_CI_PIN`|The pin connected to the clock pin of the LEDs (APA102) |
|
||||
|`RGBLED_NUM` |The number of LEDs connected |
|
||||
|`RGBLED_SPLIT` |(Optional) For split keyboards, the number of LEDs connected on each half|
|
||||
|
||||
Then you should be able to use the keycodes below to change the RGB lighting to your liking.
|
||||
|
||||
|
@ -77,7 +77,7 @@ Configure the hardware via your config.h:
|
||||
```
|
||||
|
||||
### SPI
|
||||
Targeting STM32 boards where WS2812 support is offloaded to an SPI hardware device. The advantage is that the use of DMA offloads processing of the WS2812 protocol from the MCU. `RGB_DI_PIN` for this driver is the configured SPI MOSI pin. Due to the nature of repurposing SPI to drive the LEDs, the other SPI pins, MISO and SCK, **must** remain unused. To configure it, add this to your rules.mk:
|
||||
Targeting STM32 boards where WS2812 support is offloaded to an SPI hardware device. The advantage is that the use of DMA offloads processing of the WS2812 protocol from the MCU. `WS2812_DI_PIN` for this driver is the configured SPI MOSI pin. Due to the nature of repurposing SPI to drive the LEDs, the other SPI pins, MISO and SCK, **must** remain unused. To configure it, add this to your rules.mk:
|
||||
|
||||
```make
|
||||
WS2812_DRIVER = spi
|
||||
@ -183,7 +183,7 @@ This can be configured for bitbang, PWM and SPI.
|
||||
|
||||
Note: This only applies to STM32 boards.
|
||||
|
||||
To configure the `RGB_DI_PIN` to open drain configuration add this to your config.h file:
|
||||
To configure the `WS2812_DI_PIN` to open drain configuration add this to your config.h file:
|
||||
```c
|
||||
#define WS2812_EXTERNAL_PULLUP
|
||||
```
|
||||
|
@ -18,7 +18,6 @@
|
||||
|
||||
|
||||
/* underglow */
|
||||
#define RGB_DI_PIN B6
|
||||
#define RGBLED_NUM 24
|
||||
#define RGBLIGHT_LIMIT_VAL 185 // limit max I to 400mA
|
||||
#define RGBLIGHT_EFFECT_BREATHING
|
||||
|
@ -5,5 +5,8 @@
|
||||
},
|
||||
"features": {
|
||||
"rgblight": true
|
||||
},
|
||||
"ws2812": {
|
||||
"pin": "B6"
|
||||
}
|
||||
}
|
||||
|
@ -20,7 +20,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
#define TAP_CODE_DELAY 10
|
||||
|
||||
#define RGB_DI_PIN D3
|
||||
#define RGBLED_NUM 4
|
||||
#define RGBLIGHT_HUE_STEP 8
|
||||
#define RGBLIGHT_SAT_STEP 8
|
||||
|
@ -21,6 +21,9 @@
|
||||
"qmk_lufa_bootloader": {
|
||||
"led": "B0"
|
||||
},
|
||||
"ws2812": {
|
||||
"pin": "D3"
|
||||
},
|
||||
"processor": "atmega32u4",
|
||||
"bootloader": "qmk-dfu",
|
||||
"matrix_pins": {
|
||||
|
@ -3,8 +3,6 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#define RGB_DI_PIN D0
|
||||
|
||||
#define RGB_MATRIX_LED_COUNT 18
|
||||
#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 200
|
||||
#define RGB_MATRIX_DEFAULT_MODE RGB_MATRIX_BREATHING
|
||||
|
@ -62,6 +62,9 @@
|
||||
{ "flags": 4, "matrix": [0, 3], "x": 163, "y": 64 }
|
||||
]
|
||||
},
|
||||
"ws2812": {
|
||||
"pin": "D0"
|
||||
},
|
||||
"layouts": {
|
||||
"LAYOUT_36": {
|
||||
"layout": [
|
||||
|
@ -16,7 +16,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
#pragma once
|
||||
|
||||
#define RGB_DI_PIN D3 // LED data pin on controller
|
||||
#define RGBLED_NUM 4 // Number of LEDs connected
|
||||
|
||||
#define RGBLIGHT_HUE_STEP 10 // The number of steps to cycle through the hue by
|
||||
|
@ -11,6 +11,9 @@
|
||||
"bootmagic": {
|
||||
"matrix": [1, 0]
|
||||
},
|
||||
"ws2812": {
|
||||
"pin": "D3"
|
||||
},
|
||||
"processor": "atmega32u4",
|
||||
"bootloader": "caterina",
|
||||
"matrix_pins": {
|
||||
|
@ -17,7 +17,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.*/
|
||||
#pragma once
|
||||
|
||||
#define SSD1306OLED
|
||||
#define RGB_DI_PIN B7
|
||||
|
||||
#define RGBLED_NUM 4
|
||||
|
||||
|
@ -8,6 +8,9 @@
|
||||
"pid": "0x7C99",
|
||||
"device_version": "0.0.1"
|
||||
},
|
||||
"ws2812": {
|
||||
"pin": "B7"
|
||||
},
|
||||
"matrix_pins": {
|
||||
"cols": ["D6", "D7", "B5"],
|
||||
"rows": ["F0", "F5", "F4", "F6"]
|
||||
|
@ -16,7 +16,6 @@
|
||||
#pragma once
|
||||
|
||||
#define RGBLED_NUM 1
|
||||
#define RGB_DI_PIN B2
|
||||
|
||||
// Save as much space as we can...
|
||||
#define LAYER_STATE_8BIT
|
||||
|
@ -8,6 +8,9 @@
|
||||
"pid": "0x0001",
|
||||
"device_version": "0.0.1"
|
||||
},
|
||||
"ws2812": {
|
||||
"pin": "B2"
|
||||
},
|
||||
"matrix_pins": {
|
||||
"direct": [
|
||||
["B0"]
|
||||
|
@ -17,7 +17,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
#pragma once
|
||||
|
||||
#define RGB_DI_PIN F0
|
||||
#define RGBLIGHT_EFFECT_BREATHING
|
||||
#define RGBLIGHT_EFFECT_RAINBOW_MOOD
|
||||
#define RGBLIGHT_EFFECT_RAINBOW_SWIRL
|
||||
|
@ -18,6 +18,9 @@
|
||||
"levels": 5,
|
||||
"breathing": true
|
||||
},
|
||||
"ws2812": {
|
||||
"pin": "F0"
|
||||
},
|
||||
"processor": "atmega32u4",
|
||||
"bootloader": "atmel-dfu",
|
||||
"community_layouts": ["60_ansi"],
|
||||
|
@ -24,7 +24,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
/* Locking resynchronize hack */
|
||||
#define LOCKING_RESYNC_ENABLE
|
||||
|
||||
#define RGB_DI_PIN F0
|
||||
#define RGBLIGHT_EFFECT_BREATHING
|
||||
#define RGBLIGHT_EFFECT_RAINBOW_MOOD
|
||||
#define RGBLIGHT_EFFECT_RAINBOW_SWIRL
|
||||
|
@ -20,6 +20,9 @@
|
||||
"caps_lock": "B6",
|
||||
"on_state": 0
|
||||
},
|
||||
"ws2812": {
|
||||
"pin": "F0"
|
||||
},
|
||||
"processor": "atmega32u4",
|
||||
"bootloader": "atmel-dfu",
|
||||
"layout_aliases": {
|
||||
|
@ -6,7 +6,6 @@
|
||||
/* Locking resynchronize hack */
|
||||
#define LOCKING_RESYNC_ENABLE
|
||||
|
||||
#define RGB_DI_PIN E2
|
||||
#define RGBLIGHT_EFFECT_BREATHING
|
||||
#define RGBLIGHT_EFFECT_RAINBOW_MOOD
|
||||
#define RGBLIGHT_EFFECT_RAINBOW_SWIRL
|
||||
|
@ -17,6 +17,9 @@
|
||||
"pin": "B6",
|
||||
"levels": 5
|
||||
},
|
||||
"ws2812": {
|
||||
"pin": "E2"
|
||||
},
|
||||
"processor": "atmega32u4",
|
||||
"bootloader": "atmel-dfu",
|
||||
"community_layouts": ["60_ansi", "60_iso", "60_ansi_split_bs_rshift", "60_hhkb"],
|
||||
|
@ -10,7 +10,6 @@
|
||||
#define OLED_BRIGHTNESS 128
|
||||
#define OLED_FONT_H "keyboards/1upkeyboards/pi40/lib/glcdfont.c"
|
||||
|
||||
#define RGB_DI_PIN GP0
|
||||
# define RGB_MATRIX_KEYPRESSES // reacts to keypresses
|
||||
# define RGB_MATRIX_FRAMEBUFFER_EFFECTS
|
||||
# define RGBLIGHT_LIMIT_VAL 150
|
||||
|
@ -14,6 +14,7 @@
|
||||
"layer_count": 10
|
||||
},
|
||||
"ws2812": {
|
||||
"pin": "GP0",
|
||||
"driver": "vendor"
|
||||
},
|
||||
"features": {
|
||||
|
@ -14,6 +14,7 @@
|
||||
"layer_count": 10
|
||||
},
|
||||
"ws2812": {
|
||||
"pin": "GP0",
|
||||
"driver": "vendor"
|
||||
},
|
||||
"features": {
|
||||
|
@ -14,6 +14,7 @@
|
||||
"layer_count": 10
|
||||
},
|
||||
"ws2812": {
|
||||
"pin": "GP0",
|
||||
"driver": "vendor"
|
||||
},
|
||||
"features": {
|
||||
|
@ -5,7 +5,6 @@
|
||||
|
||||
#define DYNAMIC_KEYMAP_LAYER_COUNT 10
|
||||
|
||||
#define RGB_DI_PIN GP17
|
||||
#define RGB_MATRIX_LED_COUNT 21
|
||||
//#define RGB_MATRIX_FRAMEBUFFER_EFFECTS
|
||||
//#define RGB_MATRIX_KEYPRESSES
|
||||
|
@ -25,6 +25,7 @@
|
||||
"rgblight": false
|
||||
},
|
||||
"ws2812": {
|
||||
"pin": "GP17",
|
||||
"driver": "vendor"
|
||||
},
|
||||
"matrix_pins": {
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user