1
0
Fork 0

LED drivers: use PACKED define from util.h (#22380)

This commit is contained in:
Ryan 2023-11-02 14:31:09 +11:00 committed by GitHub
parent 8ea955c72f
commit 5d58534a8c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
16 changed files with 41 additions and 25 deletions

View file

@ -23,6 +23,7 @@
#include <stdint.h>
#include <stdbool.h>
#include "progmem.h"
#include "util.h"
// Which variant header file to use
#if defined(LED_MATRIX_IS31FL3742A) || defined(RGB_MATRIX_IS31FL3742A)
@ -37,19 +38,19 @@
#ifdef RGB_MATRIX_ENABLE
typedef struct is31_led {
uint8_t driver;
uint8_t driver : 2;
uint8_t r;
uint8_t g;
uint8_t b;
} __attribute__((packed)) is31_led;
} PACKED is31_led;
extern const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT];
#elif defined(LED_MATRIX_ENABLE)
typedef struct is31_led {
uint8_t driver;
uint8_t driver : 2;
uint8_t v;
} __attribute__((packed)) is31_led;
} PACKED is31_led;
extern const is31_led PROGMEM g_is31_leds[LED_MATRIX_LED_COUNT];
#endif