Move LED/RGB Matrix code into their own directories (#13257)
This commit is contained in:
parent
c03cb4edd7
commit
d61e5c0027
@ -230,9 +230,12 @@ ifneq (,$(filter $(MCU), atmega16u2 atmega32u2 at90usb162))
|
||||
# ATmegaxxU2 does not have hardware MUL instruction - lib8tion must be told to use software multiplication routines
|
||||
OPT_DEFS += -DLIB8_ATTINY
|
||||
endif
|
||||
SRC += $(QUANTUM_DIR)/process_keycode/process_backlight.c
|
||||
SRC += $(QUANTUM_DIR)/led_matrix.c
|
||||
SRC += $(QUANTUM_DIR)/led_matrix_drivers.c
|
||||
COMMON_VPATH += $(QUANTUM_DIR)/led_matrix
|
||||
COMMON_VPATH += $(QUANTUM_DIR)/led_matrix/animations
|
||||
COMMON_VPATH += $(QUANTUM_DIR)/led_matrix/animations/runners
|
||||
SRC += process_backlight.c
|
||||
SRC += led_matrix.c
|
||||
SRC += led_matrix_drivers.c
|
||||
CIE1931_CURVE := yes
|
||||
|
||||
ifeq ($(strip $(LED_MATRIX_DRIVER)), IS31FL3731)
|
||||
@ -255,9 +258,12 @@ ifneq (,$(filter $(MCU), atmega16u2 atmega32u2 at90usb162))
|
||||
# ATmegaxxU2 does not have hardware MUL instruction - lib8tion must be told to use software multiplication routines
|
||||
OPT_DEFS += -DLIB8_ATTINY
|
||||
endif
|
||||
SRC += $(QUANTUM_DIR)/color.c
|
||||
SRC += $(QUANTUM_DIR)/rgb_matrix.c
|
||||
SRC += $(QUANTUM_DIR)/rgb_matrix_drivers.c
|
||||
COMMON_VPATH += $(QUANTUM_DIR)/rgb_matrix
|
||||
COMMON_VPATH += $(QUANTUM_DIR)/rgb_matrix/animations
|
||||
COMMON_VPATH += $(QUANTUM_DIR)/rgb_matrix/animations/runners
|
||||
SRC += color.c
|
||||
SRC += rgb_matrix.c
|
||||
SRC += rgb_matrix_drivers.c
|
||||
CIE1931_CURVE := yes
|
||||
RGB_KEYCODES_ENABLE := yes
|
||||
|
||||
|
18
quantum/led_matrix/animations/led_matrix_effects.inc
Normal file
18
quantum/led_matrix/animations/led_matrix_effects.inc
Normal file
@ -0,0 +1,18 @@
|
||||
// Add your new core led matrix effect here, order determines enum order
|
||||
#include "solid_anim.h"
|
||||
#include "alpha_mods_anim.h"
|
||||
#include "breathing_anim.h"
|
||||
#include "band_anim.h"
|
||||
#include "band_pinwheel_anim.h"
|
||||
#include "band_spiral_anim.h"
|
||||
#include "cycle_left_right_anim.h"
|
||||
#include "cycle_up_down_anim.h"
|
||||
#include "cycle_out_in_anim.h"
|
||||
#include "dual_beacon_anim.h"
|
||||
#include "solid_reactive_simple_anim.h"
|
||||
#include "solid_reactive_wide.h"
|
||||
#include "solid_reactive_cross.h"
|
||||
#include "solid_reactive_nexus.h"
|
||||
#include "solid_splash_anim.h"
|
||||
#include "wave_left_right_anim.h"
|
||||
#include "wave_up_down_anim.h"
|
@ -0,0 +1,6 @@
|
||||
#include "effect_runner_dx_dy_dist.h"
|
||||
#include "effect_runner_dx_dy.h"
|
||||
#include "effect_runner_i.h"
|
||||
#include "effect_runner_sin_cos_i.h"
|
||||
#include "effect_runner_reactive.h"
|
||||
#include "effect_runner_reactive_splash.h"
|
@ -42,19 +42,14 @@ const led_point_t k_led_matrix_center = LED_MATRIX_CENTER;
|
||||
// clang-format on
|
||||
|
||||
// Generic effect runners
|
||||
#include "led_matrix_runners/effect_runner_dx_dy_dist.h"
|
||||
#include "led_matrix_runners/effect_runner_dx_dy.h"
|
||||
#include "led_matrix_runners/effect_runner_i.h"
|
||||
#include "led_matrix_runners/effect_runner_sin_cos_i.h"
|
||||
#include "led_matrix_runners/effect_runner_reactive.h"
|
||||
#include "led_matrix_runners/effect_runner_reactive_splash.h"
|
||||
#include "led_matrix_runners.inc"
|
||||
|
||||
// ------------------------------------------
|
||||
// -----Begin led effect includes macros-----
|
||||
#define LED_MATRIX_EFFECT(name)
|
||||
#define LED_MATRIX_CUSTOM_EFFECT_IMPLS
|
||||
|
||||
#include "led_matrix_animations/led_matrix_effects.inc"
|
||||
#include "led_matrix_effects.inc"
|
||||
#ifdef LED_MATRIX_CUSTOM_KB
|
||||
# include "led_matrix_kb.inc"
|
||||
#endif
|
||||
@ -325,7 +320,7 @@ static void led_task_render(uint8_t effect) {
|
||||
case LED_MATRIX_##name: \
|
||||
rendering = name(&led_effect_params); \
|
||||
break;
|
||||
#include "led_matrix_animations/led_matrix_effects.inc"
|
||||
#include "led_matrix_effects.inc"
|
||||
#undef LED_MATRIX_EFFECT
|
||||
|
||||
#if defined(LED_MATRIX_CUSTOM_KB) || defined(LED_MATRIX_CUSTOM_USER)
|
@ -56,7 +56,7 @@ enum led_matrix_effects {
|
||||
// --------------------------------------
|
||||
// -----Begin led effect enum macros-----
|
||||
#define LED_MATRIX_EFFECT(name, ...) LED_MATRIX_##name,
|
||||
#include "led_matrix_animations/led_matrix_effects.inc"
|
||||
#include "led_matrix_effects.inc"
|
||||
#undef LED_MATRIX_EFFECT
|
||||
|
||||
#if defined(LED_MATRIX_CUSTOM_KB) || defined(LED_MATRIX_CUSTOM_USER)
|
@ -1,18 +0,0 @@
|
||||
// Add your new core led matrix effect here, order determins enum order, requires "led_matrix_animations/ directory
|
||||
#include "led_matrix_animations/solid_anim.h"
|
||||
#include "led_matrix_animations/alpha_mods_anim.h"
|
||||
#include "led_matrix_animations/breathing_anim.h"
|
||||
#include "led_matrix_animations/band_anim.h"
|
||||
#include "led_matrix_animations/band_pinwheel_anim.h"
|
||||
#include "led_matrix_animations/band_spiral_anim.h"
|
||||
#include "led_matrix_animations/cycle_left_right_anim.h"
|
||||
#include "led_matrix_animations/cycle_up_down_anim.h"
|
||||
#include "led_matrix_animations/cycle_out_in_anim.h"
|
||||
#include "led_matrix_animations/dual_beacon_anim.h"
|
||||
#include "led_matrix_animations/solid_reactive_simple_anim.h"
|
||||
#include "led_matrix_animations/solid_reactive_wide.h"
|
||||
#include "led_matrix_animations/solid_reactive_cross.h"
|
||||
#include "led_matrix_animations/solid_reactive_nexus.h"
|
||||
#include "led_matrix_animations/solid_splash_anim.h"
|
||||
#include "led_matrix_animations/wave_left_right_anim.h"
|
||||
#include "led_matrix_animations/wave_up_down_anim.h"
|
37
quantum/rgb_matrix/animations/rgb_matrix_effects.inc
Normal file
37
quantum/rgb_matrix/animations/rgb_matrix_effects.inc
Normal file
@ -0,0 +1,37 @@
|
||||
// Add your new core rgb matrix effect here, order determines enum order
|
||||
#include "solid_color_anim.h"
|
||||
#include "alpha_mods_anim.h"
|
||||
#include "gradient_up_down_anim.h"
|
||||
#include "gradient_left_right_anim.h"
|
||||
#include "breathing_anim.h"
|
||||
#include "colorband_sat_anim.h"
|
||||
#include "colorband_val_anim.h"
|
||||
#include "colorband_pinwheel_sat_anim.h"
|
||||
#include "colorband_pinwheel_val_anim.h"
|
||||
#include "colorband_spiral_sat_anim.h"
|
||||
#include "colorband_spiral_val_anim.h"
|
||||
#include "cycle_all_anim.h"
|
||||
#include "cycle_left_right_anim.h"
|
||||
#include "cycle_up_down_anim.h"
|
||||
#include "rainbow_moving_chevron_anim.h"
|
||||
#include "cycle_out_in_anim.h"
|
||||
#include "cycle_out_in_dual_anim.h"
|
||||
#include "cycle_pinwheel_anim.h"
|
||||
#include "cycle_spiral_anim.h"
|
||||
#include "dual_beacon_anim.h"
|
||||
#include "rainbow_beacon_anim.h"
|
||||
#include "rainbow_pinwheels_anim.h"
|
||||
#include "raindrops_anim.h"
|
||||
#include "jellybean_raindrops_anim.h"
|
||||
#include "hue_breathing_anim.h"
|
||||
#include "hue_pendulum_anim.h"
|
||||
#include "hue_wave_anim.h"
|
||||
#include "typing_heatmap_anim.h"
|
||||
#include "digital_rain_anim.h"
|
||||
#include "solid_reactive_simple_anim.h"
|
||||
#include "solid_reactive_anim.h"
|
||||
#include "solid_reactive_wide.h"
|
||||
#include "solid_reactive_cross.h"
|
||||
#include "solid_reactive_nexus.h"
|
||||
#include "splash_anim.h"
|
||||
#include "solid_splash_anim.h"
|
@ -0,0 +1,6 @@
|
||||
#include "effect_runner_dx_dy_dist.h"
|
||||
#include "effect_runner_dx_dy.h"
|
||||
#include "effect_runner_i.h"
|
||||
#include "effect_runner_sin_cos_i.h"
|
||||
#include "effect_runner_reactive.h"
|
||||
#include "effect_runner_reactive_splash.h"
|
@ -42,19 +42,14 @@ const led_point_t k_rgb_matrix_center = RGB_MATRIX_CENTER;
|
||||
__attribute__((weak)) RGB rgb_matrix_hsv_to_rgb(HSV hsv) { return hsv_to_rgb(hsv); }
|
||||
|
||||
// Generic effect runners
|
||||
#include "rgb_matrix_runners/effect_runner_dx_dy_dist.h"
|
||||
#include "rgb_matrix_runners/effect_runner_dx_dy.h"
|
||||
#include "rgb_matrix_runners/effect_runner_i.h"
|
||||
#include "rgb_matrix_runners/effect_runner_sin_cos_i.h"
|
||||
#include "rgb_matrix_runners/effect_runner_reactive.h"
|
||||
#include "rgb_matrix_runners/effect_runner_reactive_splash.h"
|
||||
#include "rgb_matrix_runners.inc"
|
||||
|
||||
// ------------------------------------------
|
||||
// -----Begin rgb effect includes macros-----
|
||||
#define RGB_MATRIX_EFFECT(name)
|
||||
#define RGB_MATRIX_CUSTOM_EFFECT_IMPLS
|
||||
|
||||
#include "rgb_matrix_animations/rgb_matrix_effects.inc"
|
||||
#include "rgb_matrix_effects.inc"
|
||||
#ifdef RGB_MATRIX_CUSTOM_KB
|
||||
# include "rgb_matrix_kb.inc"
|
||||
#endif
|
||||
@ -360,7 +355,7 @@ static void rgb_task_render(uint8_t effect) {
|
||||
case RGB_MATRIX_##name: \
|
||||
rendering = name(&rgb_effect_params); \
|
||||
break;
|
||||
#include "rgb_matrix_animations/rgb_matrix_effects.inc"
|
||||
#include "rgb_matrix_effects.inc"
|
||||
#undef RGB_MATRIX_EFFECT
|
||||
|
||||
#if defined(RGB_MATRIX_CUSTOM_KB) || defined(RGB_MATRIX_CUSTOM_USER)
|
@ -72,7 +72,7 @@ enum rgb_matrix_effects {
|
||||
// --------------------------------------
|
||||
// -----Begin rgb effect enum macros-----
|
||||
#define RGB_MATRIX_EFFECT(name, ...) RGB_MATRIX_##name,
|
||||
#include "rgb_matrix_animations/rgb_matrix_effects.inc"
|
||||
#include "rgb_matrix_effects.inc"
|
||||
#undef RGB_MATRIX_EFFECT
|
||||
|
||||
#if defined(RGB_MATRIX_CUSTOM_KB) || defined(RGB_MATRIX_CUSTOM_USER)
|
@ -1,37 +0,0 @@
|
||||
// Add your new core rgb matrix effect here, order determins enum order, requires "rgb_matrix_animations/ directory
|
||||
#include "rgb_matrix_animations/solid_color_anim.h"
|
||||
#include "rgb_matrix_animations/alpha_mods_anim.h"
|
||||
#include "rgb_matrix_animations/gradient_up_down_anim.h"
|
||||
#include "rgb_matrix_animations/gradient_left_right_anim.h"
|
||||
#include "rgb_matrix_animations/breathing_anim.h"
|
||||
#include "rgb_matrix_animations/colorband_sat_anim.h"
|
||||
#include "rgb_matrix_animations/colorband_val_anim.h"
|
||||
#include "rgb_matrix_animations/colorband_pinwheel_sat_anim.h"
|
||||
#include "rgb_matrix_animations/colorband_pinwheel_val_anim.h"
|
||||
#include "rgb_matrix_animations/colorband_spiral_sat_anim.h"
|
||||
#include "rgb_matrix_animations/colorband_spiral_val_anim.h"
|
||||
#include "rgb_matrix_animations/cycle_all_anim.h"
|
||||
#include "rgb_matrix_animations/cycle_left_right_anim.h"
|
||||
#include "rgb_matrix_animations/cycle_up_down_anim.h"
|
||||
#include "rgb_matrix_animations/rainbow_moving_chevron_anim.h"
|
||||
#include "rgb_matrix_animations/cycle_out_in_anim.h"
|
||||
#include "rgb_matrix_animations/cycle_out_in_dual_anim.h"
|
||||
#include "rgb_matrix_animations/cycle_pinwheel_anim.h"
|
||||
#include "rgb_matrix_animations/cycle_spiral_anim.h"
|
||||
#include "rgb_matrix_animations/dual_beacon_anim.h"
|
||||
#include "rgb_matrix_animations/rainbow_beacon_anim.h"
|
||||
#include "rgb_matrix_animations/rainbow_pinwheels_anim.h"
|
||||
#include "rgb_matrix_animations/raindrops_anim.h"
|
||||
#include "rgb_matrix_animations/jellybean_raindrops_anim.h"
|
||||
#include "rgb_matrix_animations/hue_breathing_anim.h"
|
||||
#include "rgb_matrix_animations/hue_pendulum_anim.h"
|
||||
#include "rgb_matrix_animations/hue_wave_anim.h"
|
||||
#include "rgb_matrix_animations/typing_heatmap_anim.h"
|
||||
#include "rgb_matrix_animations/digital_rain_anim.h"
|
||||
#include "rgb_matrix_animations/solid_reactive_simple_anim.h"
|
||||
#include "rgb_matrix_animations/solid_reactive_anim.h"
|
||||
#include "rgb_matrix_animations/solid_reactive_wide.h"
|
||||
#include "rgb_matrix_animations/solid_reactive_cross.h"
|
||||
#include "rgb_matrix_animations/solid_reactive_nexus.h"
|
||||
#include "rgb_matrix_animations/splash_anim.h"
|
||||
#include "rgb_matrix_animations/solid_splash_anim.h"
|
Loading…
Reference in New Issue
Block a user