diff options
Diffstat (limited to 'quantum/led_matrix')
-rw-r--r-- | quantum/led_matrix/led_matrix.c | 77 | ||||
-rw-r--r-- | quantum/led_matrix/led_matrix.h | 103 | ||||
-rw-r--r-- | quantum/led_matrix/led_matrix_drivers.c | 249 | ||||
-rw-r--r-- | quantum/led_matrix/led_matrix_types.h | 15 |
4 files changed, 149 insertions, 295 deletions
diff --git a/quantum/led_matrix/led_matrix.c b/quantum/led_matrix/led_matrix.c index 2ec0ec4b19..4d67a295df 100644 --- a/quantum/led_matrix/led_matrix.c +++ b/quantum/led_matrix/led_matrix.c @@ -58,35 +58,6 @@ const led_point_t k_led_matrix_center = LED_MATRIX_CENTER; // -----End led effect includes macros------- // ------------------------------------------ -#ifndef LED_MATRIX_TIMEOUT -# define LED_MATRIX_TIMEOUT 0 -#endif - -#if !defined(LED_MATRIX_MAXIMUM_BRIGHTNESS) || LED_MATRIX_MAXIMUM_BRIGHTNESS > UINT8_MAX -# undef LED_MATRIX_MAXIMUM_BRIGHTNESS -# define LED_MATRIX_MAXIMUM_BRIGHTNESS UINT8_MAX -#endif - -#if !defined(LED_MATRIX_VAL_STEP) -# define LED_MATRIX_VAL_STEP 8 -#endif - -#if !defined(LED_MATRIX_SPD_STEP) -# define LED_MATRIX_SPD_STEP 16 -#endif - -#if !defined(LED_MATRIX_DEFAULT_MODE) -# define LED_MATRIX_DEFAULT_MODE LED_MATRIX_SOLID -#endif - -#if !defined(LED_MATRIX_DEFAULT_VAL) -# define LED_MATRIX_DEFAULT_VAL LED_MATRIX_MAXIMUM_BRIGHTNESS -#endif - -#if !defined(LED_MATRIX_DEFAULT_SPD) -# define LED_MATRIX_DEFAULT_SPD UINT8_MAX / 2 -#endif - // globals led_eeconfig_t led_matrix_eeconfig; // TODO: would like to prefix this with g_ for global consistancy, do this in another pr uint32_t g_led_timer; @@ -126,7 +97,7 @@ void eeconfig_update_led_matrix(void) { void eeconfig_update_led_matrix_default(void) { dprintf("eeconfig_update_led_matrix_default\n"); - led_matrix_eeconfig.enable = 1; + led_matrix_eeconfig.enable = LED_MATRIX_DEFAULT_ON; led_matrix_eeconfig.mode = LED_MATRIX_DEFAULT_MODE; led_matrix_eeconfig.val = LED_MATRIX_DEFAULT_VAL; led_matrix_eeconfig.speed = LED_MATRIX_DEFAULT_SPD; @@ -371,9 +342,8 @@ void led_matrix_task(void) { case RENDERING: led_task_render(effect); if (effect) { - // Only run the basic indicators in the last render iteration (default there are 5 iterations) - if (led_effect_params.iter == LED_MATRIX_LED_PROCESS_MAX_ITERATIONS) { - led_matrix_indicators(); + if (led_task_state == FLUSHING) { + led_matrix_indicators(); // ensure we only draw basic indicators once rendering is finished } led_matrix_indicators_advanced(&led_effect_params); } @@ -405,14 +375,7 @@ void led_matrix_indicators_advanced(effect_params_t *params) { * and not sure which would be better. Otherwise, this should be called from * led_task_render, right before the iter++ line. */ -#if defined(LED_MATRIX_LED_PROCESS_LIMIT) && LED_MATRIX_LED_PROCESS_LIMIT > 0 && LED_MATRIX_LED_PROCESS_LIMIT < LED_MATRIX_LED_COUNT - uint8_t min = LED_MATRIX_LED_PROCESS_LIMIT * (params->iter - 1); - uint8_t max = min + LED_MATRIX_LED_PROCESS_LIMIT; - if (max > LED_MATRIX_LED_COUNT) max = LED_MATRIX_LED_COUNT; -#else - uint8_t min = 0; - uint8_t max = LED_MATRIX_LED_COUNT; -#endif + LED_MATRIX_USE_LIMITS_ITER(min, max, params->iter - 1); led_matrix_indicators_advanced_kb(min, max); } @@ -424,6 +387,36 @@ __attribute__((weak)) bool led_matrix_indicators_advanced_user(uint8_t led_min, return true; } +struct led_matrix_limits_t led_matrix_get_limits(uint8_t iter) { + struct led_matrix_limits_t limits = {0}; +#if defined(LED_MATRIX_LED_PROCESS_LIMIT) && LED_MATRIX_LED_PROCESS_LIMIT > 0 && LED_MATRIX_LED_PROCESS_LIMIT < LED_MATRIX_LED_COUNT +# if defined(LED_MATRIX_SPLIT) + limits.led_min_index = LED_MATRIX_LED_PROCESS_LIMIT * (iter); + limits.led_max_index = limits.led_min_index + LED_MATRIX_LED_PROCESS_LIMIT; + if (limits.led_max_index > LED_MATRIX_LED_COUNT) limits.led_max_index = LED_MATRIX_LED_COUNT; + uint8_t k_led_matrix_split[2] = LED_MATRIX_SPLIT; + if (is_keyboard_left() && (limits.led_max_index > k_led_matrix_split[0])) limits.led_max_index = k_led_matrix_split[0]; + if (!(is_keyboard_left()) && (limits.led_min_index < k_led_matrix_split[0])) limits.led_min_index = k_led_matrix_split[0]; +# else + limits.led_min_index = LED_MATRIX_LED_PROCESS_LIMIT * (iter); + limits.led_max_index = limits.led_min_index + LED_MATRIX_LED_PROCESS_LIMIT; + if (limits.led_max_index > LED_MATRIX_LED_COUNT) limits.led_max_index = LED_MATRIX_LED_COUNT; +# endif +#else +# if defined(LED_MATRIX_SPLIT) + limits.led_min_index = 0; + limits.led_max_index = LED_MATRIX_LED_COUNT; + const uint8_t k_led_matrix_split[2] = LED_MATRIX_SPLIT; + if (is_keyboard_left() && (limits.led_max_index > k_led_matrix_split[0])) limits.led_max_index = k_led_matrix_split[0]; + if (!(is_keyboard_left()) && (limits.led_min_index < k_led_matrix_split[0])) limits.led_min_index = k_led_matrix_split[0]; +# else + limits.led_min_index = 0; + limits.led_max_index = LED_MATRIX_LED_COUNT; +# endif +#endif + return limits; +} + void led_matrix_init(void) { led_matrix_driver.init(); @@ -630,7 +623,7 @@ void led_matrix_decrease_speed(void) { void led_matrix_set_flags_eeprom_helper(led_flags_t flags, bool write_to_eeprom) { led_matrix_eeconfig.flags = flags; eeconfig_flag_led_matrix(write_to_eeprom); - dprintf("led matrix set speed [%s]: %u\n", (write_to_eeprom) ? "EEPROM" : "NOEEPROM", led_matrix_eeconfig.flags); + dprintf("led matrix set flags [%s]: %u\n", (write_to_eeprom) ? "EEPROM" : "NOEEPROM", led_matrix_eeconfig.flags); } led_flags_t led_matrix_get_flags(void) { diff --git a/quantum/led_matrix/led_matrix.h b/quantum/led_matrix/led_matrix.h index c2533ca49c..c903a230f4 100644 --- a/quantum/led_matrix/led_matrix.h +++ b/quantum/led_matrix/led_matrix.h @@ -25,16 +25,60 @@ #include "led_matrix_types.h" #include "keyboard.h" -#ifdef IS31FL3731 +#if defined(LED_MATRIX_IS31FL3218) +# include "is31fl3218-simple.h" +#elif defined(LED_MATRIX_IS31FL3731) # include "is31fl3731-simple.h" -#elif defined(IS31FLCOMMON) -# include "is31flcommon.h" #endif -#ifdef IS31FL3733 +#ifdef LED_MATRIX_IS31FL3733 # include "is31fl3733-simple.h" #endif -#ifdef CKLED2001 -# include "ckled2001-simple.h" +#ifdef LED_MATRIX_IS31FL3736 +# include "is31fl3736-simple.h" +#endif +#ifdef LED_MATRIX_IS31FL3737 +# include "is31fl3737-simple.h" +#endif +#ifdef LED_MATRIX_IS31FL3741 +# include "is31fl3741-simple.h" +#endif +#if defined(IS31FLCOMMON) +# include "is31flcommon.h" +#endif +#ifdef LED_MATRIX_SNLED27351 +# include "snled27351-simple.h" +#endif + +#ifndef LED_MATRIX_TIMEOUT +# define LED_MATRIX_TIMEOUT 0 +#endif + +#ifndef LED_MATRIX_MAXIMUM_BRIGHTNESS +# define LED_MATRIX_MAXIMUM_BRIGHTNESS UINT8_MAX +#endif + +#ifndef LED_MATRIX_VAL_STEP +# define LED_MATRIX_VAL_STEP 8 +#endif + +#ifndef LED_MATRIX_SPD_STEP +# define LED_MATRIX_SPD_STEP 16 +#endif + +#ifndef LED_MATRIX_DEFAULT_ON +# define LED_MATRIX_DEFAULT_ON true +#endif + +#ifndef LED_MATRIX_DEFAULT_MODE +# define LED_MATRIX_DEFAULT_MODE LED_MATRIX_SOLID +#endif + +#ifndef LED_MATRIX_DEFAULT_VAL +# define LED_MATRIX_DEFAULT_VAL LED_MATRIX_MAXIMUM_BRIGHTNESS +#endif + +#ifndef LED_MATRIX_DEFAULT_SPD +# define LED_MATRIX_DEFAULT_SPD UINT8_MAX / 2 #endif #ifndef LED_MATRIX_LED_FLUSH_LIMIT @@ -44,37 +88,22 @@ #ifndef LED_MATRIX_LED_PROCESS_LIMIT # define LED_MATRIX_LED_PROCESS_LIMIT ((LED_MATRIX_LED_COUNT + 4) / 5) #endif -#define LED_MATRIX_LED_PROCESS_MAX_ITERATIONS ((LED_MATRIX_LED_COUNT + LED_MATRIX_LED_PROCESS_LIMIT - 1) / LED_MATRIX_LED_PROCESS_LIMIT) - -#if defined(LED_MATRIX_LED_PROCESS_LIMIT) && LED_MATRIX_LED_PROCESS_LIMIT > 0 && LED_MATRIX_LED_PROCESS_LIMIT < LED_MATRIX_LED_COUNT -# if defined(LED_MATRIX_SPLIT) -# define LED_MATRIX_USE_LIMITS(min, max) \ - uint8_t min = LED_MATRIX_LED_PROCESS_LIMIT * params->iter; \ - uint8_t max = min + LED_MATRIX_LED_PROCESS_LIMIT; \ - if (max > LED_MATRIX_LED_COUNT) max = LED_MATRIX_LED_COUNT; \ - uint8_t k_led_matrix_split[2] = LED_MATRIX_SPLIT; \ - if (is_keyboard_left() && (max > k_led_matrix_split[0])) max = k_led_matrix_split[0]; \ - if (!(is_keyboard_left()) && (min < k_led_matrix_split[0])) min = k_led_matrix_split[0]; -# else -# define LED_MATRIX_USE_LIMITS(min, max) \ - uint8_t min = LED_MATRIX_LED_PROCESS_LIMIT * params->iter; \ - uint8_t max = min + LED_MATRIX_LED_PROCESS_LIMIT; \ - if (max > LED_MATRIX_LED_COUNT) max = LED_MATRIX_LED_COUNT; -# endif -#else -# if defined(LED_MATRIX_SPLIT) -# define LED_MATRIX_USE_LIMITS(min, max) \ - uint8_t min = 0; \ - uint8_t max = LED_MATRIX_LED_COUNT; \ - const uint8_t k_led_matrix_split[2] = LED_MATRIX_SPLIT; \ - if (is_keyboard_left() && (max > k_led_matrix_split[0])) max = k_led_matrix_split[0]; \ - if (!(is_keyboard_left()) && (min < k_led_matrix_split[0])) min = k_led_matrix_split[0]; -# else -# define LED_MATRIX_USE_LIMITS(min, max) \ - uint8_t min = 0; \ - uint8_t max = LED_MATRIX_LED_COUNT; -# endif -#endif + +struct led_matrix_limits_t { + uint8_t led_min_index; + uint8_t led_max_index; +}; + +struct led_matrix_limits_t led_matrix_get_limits(uint8_t iter); + +#define LED_MATRIX_USE_LIMITS_ITER(min, max, iter) \ + struct led_matrix_limits_t limits = led_matrix_get_limits(iter); \ + uint8_t min = limits.led_min_index; \ + uint8_t max = limits.led_max_index; \ + (void)min; \ + (void)max; + +#define LED_MATRIX_USE_LIMITS(min, max) LED_MATRIX_USE_LIMITS_ITER(min, max, params->iter) #define LED_MATRIX_TEST_LED_FLAGS() \ if (!HAS_ANY_FLAGS(g_led_config.flags[i], params->flags)) continue diff --git a/quantum/led_matrix/led_matrix_drivers.c b/quantum/led_matrix/led_matrix_drivers.c index 13c8935d11..117bed9851 100644 --- a/quantum/led_matrix/led_matrix_drivers.c +++ b/quantum/led_matrix/led_matrix_drivers.c @@ -25,223 +25,68 @@ * in their own files. */ -#if defined(IS31FL3731) || defined(IS31FL3733) || defined(IS31FLCOMMON) || defined(CKLED2001) -# include "i2c_master.h" - -static void init(void) { - i2c_init(); - -# if defined(IS31FL3731) - is31fl3731_init(LED_DRIVER_ADDR_1); -# if defined(LED_DRIVER_ADDR_2) - is31fl3731_init(LED_DRIVER_ADDR_2); -# if defined(LED_DRIVER_ADDR_3) - is31fl3731_init(LED_DRIVER_ADDR_3); -# if defined(LED_DRIVER_ADDR_4) - is31fl3731_init(LED_DRIVER_ADDR_4); -# endif -# endif -# endif - -# elif defined(IS31FL3733) -# if !defined(LED_DRIVER_SYNC_1) -# define LED_DRIVER_SYNC_1 0 -# endif - is31fl3733_init(LED_DRIVER_ADDR_1, LED_DRIVER_SYNC_1); -# if defined(LED_DRIVER_ADDR_2) -# if !defined(LED_DRIVER_SYNC_2) -# define LED_DRIVER_SYNC_2 0 -# endif - is31fl3733_init(LED_DRIVER_ADDR_2, LED_DRIVER_SYNC_2); -# if defined(LED_DRIVER_ADDR_3) -# if !defined(LED_DRIVER_SYNC_3) -# define LED_DRIVER_SYNC_3 0 -# endif - is31fl3733_init(LED_DRIVER_ADDR_3, LED_DRIVER_SYNC_3); -# if defined(LED_DRIVER_ADDR_4) -# if !defined(LED_DRIVER_SYNC_4) -# define LED_DRIVER_SYNC_4 0 -# endif - is31fl3733_init(LED_DRIVER_ADDR_4, LED_DRIVER_SYNC_4); -# endif -# endif -# endif - -# elif defined(IS31FLCOMMON) - IS31FL_common_init(DRIVER_ADDR_1, ISSI_SSR_1); -# if defined(LED_DRIVER_ADDR_2) - IS31FL_common_init(DRIVER_ADDR_2, ISSI_SSR_2); -# if defined(LED_DRIVER_ADDR_3) - IS31FL_common_init(DRIVER_ADDR_3, ISSI_SSR_3); -# if defined(LED_DRIVER_ADDR_4) - IS31FL_common_init(DRIVER_ADDR_4, ISSI_SSR_4); -# endif -# endif -# endif -# elif defined(CKLED2001) -# if defined(LED_DRIVER_SHUTDOWN_PIN) - setPinOutput(LED_DRIVER_SHUTDOWN_PIN); - writePinHigh(LED_DRIVER_SHUTDOWN_PIN); -# endif - - ckled2001_init(DRIVER_ADDR_1); -# if defined(DRIVER_ADDR_2) - ckled2001_init(DRIVER_ADDR_2); -# if defined(DRIVER_ADDR_3) - ckled2001_init(DRIVER_ADDR_3); -# if defined(DRIVER_ADDR_4) - ckled2001_init(DRIVER_ADDR_4); -# endif -# endif -# endif -# endif - - for (int index = 0; index < LED_MATRIX_LED_COUNT; index++) { -# if defined(IS31FL3731) - is31fl3731_set_led_control_register(index, true); -# elif defined(IS31FL3733) - is31fl3733_set_led_control_register(index, true); -# elif defined(IS31FLCOMMON) - IS31FL_simple_set_scaling_buffer(index, true); -# elif defined(CKLED2001) - ckled2001_set_led_control_register(index, true); -# endif - } - -// This actually updates the LED drivers -# if defined(IS31FL3731) - is31fl3731_update_led_control_registers(LED_DRIVER_ADDR_1, 0); -# if defined(LED_DRIVER_ADDR_2) - is31fl3731_update_led_control_registers(LED_DRIVER_ADDR_2, 1); -# if defined(LED_DRIVER_ADDR_3) - is31fl3731_update_led_control_registers(LED_DRIVER_ADDR_3, 2); -# if defined(LED_DRIVER_ADDR_4) - is31fl3731_update_led_control_registers(LED_DRIVER_ADDR_4, 3); -# endif -# endif -# endif - -# elif defined(IS31FL3733) - is31fl3733_update_led_control_registers(LED_DRIVER_ADDR_1, 0); -# if defined(LED_DRIVER_ADDR_2) - is31fl3733_update_led_control_registers(LED_DRIVER_ADDR_2, 1); -# if defined(LED_DRIVER_ADDR_3) - is31fl3733_update_led_control_registers(LED_DRIVER_ADDR_3, 2); -# if defined(LED_DRIVER_ADDR_4) - is31fl3733_update_led_control_registers(LED_DRIVER_ADDR_4, 3); -# endif -# endif -# endif - -# elif defined(IS31FLCOMMON) -# ifdef ISSI_MANUAL_SCALING - IS31FL_set_manual_scaling_buffer(); -# endif - IS31FL_common_update_scaling_register(DRIVER_ADDR_1, 0); -# if defined(LED_DRIVER_ADDR_2) - IS31FL_common_update_scaling_register(DRIVER_ADDR_2, 1); -# if defined(LED_DRIVER_ADDR_3) - IS31FL_common_update_scaling_register(DRIVER_ADDR_3, 2); -# if defined(LED_DRIVER_ADDR_4) - IS31FL_common_update_scaling_register(DRIVER_ADDR_4, 3); -# endif -# endif -# endif -# elif defined(CKLED2001) - ckled2001_update_led_control_registers(DRIVER_ADDR_1, 0); -# if defined(DRIVER_ADDR_2) - ckled2001_update_led_control_registers(DRIVER_ADDR_2, 1); -# if defined(DRIVER_ADDR_3) - ckled2001_update_led_control_registers(DRIVER_ADDR_3, 2); -# if defined(DRIVER_ADDR_4) - ckled2001_update_led_control_registers(DRIVER_ADDR_4, 3); -# endif -# endif -# endif -# endif -} - -# if defined(IS31FL3731) -static void flush(void) { - is31fl3731_update_pwm_buffers(LED_DRIVER_ADDR_1, 0); -# if defined(LED_DRIVER_ADDR_2) - is31fl3731_update_pwm_buffers(LED_DRIVER_ADDR_2, 1); -# if defined(LED_DRIVER_ADDR_3) - is31fl3731_update_pwm_buffers(LED_DRIVER_ADDR_3, 2); -# if defined(LED_DRIVER_ADDR_4) - is31fl3731_update_pwm_buffers(LED_DRIVER_ADDR_4, 3); -# endif -# endif -# endif -} +#if defined(LED_MATRIX_IS31FL3218) +const led_matrix_driver_t led_matrix_driver = { + .init = is31fl3218_init, + .flush = is31fl3218_update_pwm_buffers, + .set_value = is31fl3218_set_value, + .set_value_all = is31fl3218_set_value_all, +}; +#elif defined(LED_MATRIX_IS31FL3731) const led_matrix_driver_t led_matrix_driver = { - .init = init, - .flush = flush, + .init = is31fl3731_init_drivers, + .flush = is31fl3731_flush, .set_value = is31fl3731_set_value, .set_value_all = is31fl3731_set_value_all, }; -# elif defined(IS31FL3733) -static void flush(void) { - is31fl3733_update_pwm_buffers(LED_DRIVER_ADDR_1, 0); -# if defined(LED_DRIVER_ADDR_2) - is31fl3733_update_pwm_buffers(LED_DRIVER_ADDR_2, 1); -# if defined(LED_DRIVER_ADDR_3) - is31fl3733_update_pwm_buffers(LED_DRIVER_ADDR_3, 2); -# if defined(LED_DRIVER_ADDR_4) - is31fl3733_update_pwm_buffers(LED_DRIVER_ADDR_4, 3); -# endif -# endif -# endif -} - +#elif defined(LED_MATRIX_IS31FL3733) const led_matrix_driver_t led_matrix_driver = { - .init = init, - .flush = flush, - .set_value = is31fl3733_set_value, + .init = is31fl3733_init_drivers, + .flush = is31fl3733_flush, + .set_value = is31fl3733_set_value, .set_value_all = is31fl3733_set_value_all, }; -# elif defined(IS31FLCOMMON) -static void flush(void) { - IS31FL_common_update_pwm_register(DRIVER_ADDR_1, 0); -# if defined(LED_DRIVER_ADDR_2) - IS31FL_common_update_pwm_register(DRIVER_ADDR_2, 1); -# if defined(LED_DRIVER_ADDR_3) - IS31FL_common_update_pwm_register(DRIVER_ADDR_3, 2); -# if defined(LED_DRIVER_ADDR_4) - IS31FL_common_update_pwm_register(DRIVER_ADDR_4, 3); -# endif -# endif -# endif -} +#elif defined(LED_MATRIX_IS31FL3736) +const led_matrix_driver_t led_matrix_driver = { + .init = is31fl3736_init_drivers, + .flush = is31fl3736_flush, + .set_value = is31fl3736_set_value, + .set_value_all = is31fl3736_set_value_all, +}; +#elif defined(LED_MATRIX_IS31FL3737) const led_matrix_driver_t led_matrix_driver = { - .init = init, - .flush = flush, - .set_value = IS31FL_simple_set_brightness, + .init = is31fl3737_init_drivers, + .flush = is31fl3737_flush, + .set_value = is31fl3737_set_value, + .set_value_all = is31fl3737_set_value_all, +}; + +#elif defined(LED_MATRIX_IS31FL3741) +const led_matrix_driver_t led_matrix_driver = { + .init = is31fl3741_init_drivers, + .flush = is31fl3741_flush, + .set_value = is31fl3741_set_value, + .set_value_all = is31fl3741_set_value_all, +}; + +#elif defined(IS31FLCOMMON) +const led_matrix_driver_t led_matrix_driver = { + .init = IS31FL_simple_init_drivers, + .flush = IS31FL_common_flush, + .set_value = IS31FL_simple_set_brightness, .set_value_all = IS31FL_simple_set_brigntness_all, }; -# elif defined(CKLED2001) -static void flush(void) { - ckled2001_update_pwm_buffers(DRIVER_ADDR_1, 0); -# if defined(DRIVER_ADDR_2) - ckled2001_update_pwm_buffers(DRIVER_ADDR_2, 1); -# if defined(DRIVER_ADDR_3) - ckled2001_update_pwm_buffers(DRIVER_ADDR_3, 2); -# if defined(DRIVER_ADDR_4) - ckled2001_update_pwm_buffers(DRIVER_ADDR_4, 3); -# endif -# endif -# endif -} +#elif defined(LED_MATRIX_SNLED27351) const led_matrix_driver_t led_matrix_driver = { - .init = init, - .flush = flush, - .set_value = ckled2001_set_value, - .set_value_all = ckled2001_set_value_all, + .init = snled27351_init_drivers, + .flush = snled27351_flush, + .set_value = snled27351_set_value, + .set_value_all = snled27351_set_value_all, }; -# endif + #endif diff --git a/quantum/led_matrix/led_matrix_types.h b/quantum/led_matrix/led_matrix_types.h index 6709a558bb..5a516ceb10 100644 --- a/quantum/led_matrix/led_matrix_types.h +++ b/quantum/led_matrix/led_matrix_types.h @@ -18,16 +18,7 @@ #include <stdint.h> #include <stdbool.h> - -#if defined(__GNUC__) -# define PACKED __attribute__((__packed__)) -#else -# define PACKED -#endif - -#if defined(_MSC_VER) -# pragma pack(push, 1) -#endif +#include "util.h" #if defined(LED_MATRIX_KEYPRESSES) || defined(LED_MATRIX_KEYRELEASES) # define LED_MATRIX_KEYREACTIVE_ENABLED @@ -92,7 +83,3 @@ typedef union { } led_eeconfig_t; _Static_assert(sizeof(led_eeconfig_t) == sizeof(uint32_t), "LED Matrix EECONFIG out of spec."); - -#if defined(_MSC_VER) -# pragma pack(pop) -#endif |