1
0
Fork 0

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

@ -57,6 +57,7 @@ void housekeeping_task_kb(void) {
#ifdef RGBLIGHT_ENABLE
#include "rgblight.h"
#include "ws2812.h"
#include "i2c_master.h"
const aw9523b_led g_aw9523b_leds[AW9523B_RGB_NUM] = {
@ -66,7 +67,7 @@ const aw9523b_led g_aw9523b_leds[AW9523B_RGB_NUM] = {
{AW9523B_P07_PWM, AW9523B_P06_PWM, AW9523B_P05_PWM},
};
void rgblight_call_driver(rgb_led_t *start_led, uint8_t num_leds)
void setleds_custom(rgb_led_t *start_led, uint16_t num_leds)
{
uint8_t num = num_leds < AW9523B_RGB_NUM ? num_leds : AW9523B_RGB_NUM;
@ -77,6 +78,10 @@ void rgblight_call_driver(rgb_led_t *start_led, uint8_t num_leds)
}
}
const rgblight_driver_t rgblight_driver = {
.setleds = setleds_custom,
};
#endif
static uint16_t caps_lock_pin = DEF_PIN(TCA6424_PORT2, 3);