Rework RGBLight driver system (#22529)

This commit is contained in:
Ryan 2023-12-05 22:49:14 +11:00 committed by GitHub
parent 2acb426b8e
commit 17f36a21bf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
35 changed files with 125 additions and 87 deletions

View file

@ -21,8 +21,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#ifdef RGBLIGHT_ENABLE
# include "ergodox_ez.h"
# include "ws2812.h"
void rgblight_call_driver(rgb_led_t *led, uint8_t led_num) {
void setleds_custom(rgb_led_t *led, uint16_t led_num) {
i2c_init();
i2c_start(0x84, ERGODOX_EZ_I2C_TIMEOUT);
int i = 0;
@ -51,5 +52,8 @@ void rgblight_call_driver(rgb_led_t *led, uint8_t led_num) {
ws2812_setleds(led, led_num);
}
const rgblight_driver_t rgblight_driver = {
.setleds = setleds_custom,
};
#endif // RGBLIGHT_ENABLE

View file

@ -2,5 +2,8 @@
"keyboard_name": "ErgoDox EZ Shine",
"usb": {
"pid": "0x4975"
},
"rgblight": {
"driver": "custom"
}
}

View file

@ -1 +1,2 @@
RGBLIGHT_ENABLE = yes
WS2812_DRIVER_REQUIRED = yes