1
0
Fork 0

Update AW20216S LED type (#22072)

* Update AW20216S LED type

* Remove mattgauf keymap
This commit is contained in:
Ryan 2023-09-20 20:50:52 +10:00 committed by GitHub
parent 3575e27ece
commit 4b26d9b62b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
21 changed files with 37 additions and 801 deletions

View file

@ -142,7 +142,7 @@ void aw20216s_init(pin_t cs_pin, pin_t en_pin) {
}
void aw20216s_set_color(int index, uint8_t red, uint8_t green, uint8_t blue) {
aw20216s_led led;
aw20216s_led_t led;
memcpy_P(&led, (&g_aw20216s_leds[index]), sizeof(led));
if (g_pwm_buffer[led.driver][led.r] == red && g_pwm_buffer[led.driver][led.g] == green && g_pwm_buffer[led.driver][led.b] == blue) {

View file

@ -49,16 +49,19 @@
#ifdef DRIVER_2_EN
# define AW20216S_DRIVER_2_EN DRIVER_2_EN
#endif
#define aw_led aw20216s_led_t
#define g_aw_leds g_aw20216s_leds
// ========
typedef struct aw20216s_led {
typedef struct aw20216s_led_t {
uint8_t driver : 2;
uint8_t r;
uint8_t g;
uint8_t b;
} aw20216s_led;
} aw20216s_led_t;
extern const aw20216s_led PROGMEM g_aw20216s_leds[RGB_MATRIX_LED_COUNT];
extern const aw20216s_led_t PROGMEM g_aw20216s_leds[RGB_MATRIX_LED_COUNT];
void aw20216s_init(pin_t cs_pin, pin_t en_pin);
void aw20216s_set_color(int index, uint8_t red, uint8_t green, uint8_t blue);