From 9bc63ebe0ab806e08cf79270528896ddbd6ea9d4 Mon Sep 17 00:00:00 2001 From: fauxpark Date: Tue, 21 Jan 2020 19:02:57 +1100 Subject: [PATCH 1/3] Rename ledmatrix.c to match .c file --- quantum/led_matrix.c | 2 +- quantum/{ledmatrix.h => led_matrix.h} | 0 quantum/led_matrix_drivers.c | 2 +- quantum/quantum.h | 2 +- 4 files changed, 3 insertions(+), 3 deletions(-) rename quantum/{ledmatrix.h => led_matrix.h} (100%) diff --git a/quantum/led_matrix.c b/quantum/led_matrix.c index 5c24c797a91f..eb523990a6c1 100644 --- a/quantum/led_matrix.c +++ b/quantum/led_matrix.c @@ -20,7 +20,7 @@ #include #include #include "quantum.h" -#include "ledmatrix.h" +#include "led_matrix.h" #include "progmem.h" #include "config.h" #include "eeprom.h" diff --git a/quantum/ledmatrix.h b/quantum/led_matrix.h similarity index 100% rename from quantum/ledmatrix.h rename to quantum/led_matrix.h diff --git a/quantum/led_matrix_drivers.c b/quantum/led_matrix_drivers.c index 6877bf4c6bbb..9decaa33c2f2 100644 --- a/quantum/led_matrix_drivers.c +++ b/quantum/led_matrix_drivers.c @@ -18,7 +18,7 @@ #include #include #include "quantum.h" -#include "ledmatrix.h" +#include "led_matrix.h" /* Each driver needs to define a struct: * diff --git a/quantum/quantum.h b/quantum/quantum.h index 14ffab15c6b5..cb0af306ac93 100644 --- a/quantum/quantum.h +++ b/quantum/quantum.h @@ -31,7 +31,7 @@ #ifdef BACKLIGHT_ENABLE # ifdef LED_MATRIX_ENABLE -# include "ledmatrix.h" +# include "led_matrix.h" # else # include "backlight.h" # endif From 7afd9a82a4b9378d420df9afc7c28c4c0e18813b Mon Sep 17 00:00:00 2001 From: fauxpark Date: Sat, 29 Aug 2020 03:43:03 +1000 Subject: [PATCH 2/3] Rename Massdrop led_matrix to md_rgb_matrix --- keyboards/massdrop/alt/alt.h | 2 +- keyboards/massdrop/alt/config_led.c | 4 ++-- keyboards/massdrop/alt/keymaps/default_md/keymap.c | 2 +- .../massdrop/alt/keymaps/reywood/rgb_matrix_user.c | 4 ++-- keyboards/massdrop/ctrl/config_led.c | 4 ++-- keyboards/massdrop/ctrl/ctrl.h | 2 +- keyboards/massdrop/ctrl/keymaps/default_md/keymap.c | 2 +- keyboards/massdrop/ctrl/keymaps/endgame/config_led.c | 4 ++-- .../massdrop/ctrl/keymaps/matthewrobo/config_led.c | 6 +++--- .../ctrl/keymaps/responsive_pattern/keymap.c | 2 +- tmk_core/common/arm_atsam/suspend.c | 2 +- tmk_core/protocol/arm_atsam.mk | 4 ++-- tmk_core/protocol/arm_atsam/arm_atsam_protocol.h | 2 +- .../arm_atsam/{led_matrix.c => md_rgb_matrix.c} | 12 ++++++------ .../arm_atsam/{led_matrix.h => md_rgb_matrix.h} | 2 +- ...ed_matrix_programs.c => md_rgb_matrix_programs.c} | 2 +- 16 files changed, 28 insertions(+), 28 deletions(-) rename tmk_core/protocol/arm_atsam/{led_matrix.c => md_rgb_matrix.c} (98%) rename tmk_core/protocol/arm_atsam/{led_matrix.h => md_rgb_matrix.h} (99%) rename tmk_core/protocol/arm_atsam/{led_matrix_programs.c => md_rgb_matrix_programs.c} (99%) diff --git a/keyboards/massdrop/alt/alt.h b/keyboards/massdrop/alt/alt.h index f1adcd67c7d5..03960954506a 100644 --- a/keyboards/massdrop/alt/alt.h +++ b/keyboards/massdrop/alt/alt.h @@ -5,7 +5,7 @@ #include "matrix.h" #include "i2c_master.h" -#include "led_matrix.h" //For led keycodes +#include "md_rgb_matrix.h" //For led keycodes #include "usb/udi_cdc.h" #include "usb/usb2422.h" diff --git a/keyboards/massdrop/alt/config_led.c b/keyboards/massdrop/alt/config_led.c index dfd35a8491bd..136117703c19 100644 --- a/keyboards/massdrop/alt/config_led.c +++ b/keyboards/massdrop/alt/config_led.c @@ -1,7 +1,7 @@ #ifdef RGB_MATRIX_ENABLE #include "alt.h" -#include "led_matrix.h" +#include "md_rgb_matrix.h" #include "rgb_matrix.h" #include "config_led.h" @@ -52,7 +52,7 @@ led_config_t g_led_config = { { #ifdef USB_LED_INDICATOR_ENABLE void rgb_matrix_indicators_kb(void) { - led_matrix_indicators(); + md_rgb_matrix_indicators(); } #endif // USB_LED_INDICATOR_ENABLE diff --git a/keyboards/massdrop/alt/keymaps/default_md/keymap.c b/keyboards/massdrop/alt/keymaps/default_md/keymap.c index 9894caf48eea..810585a3df47 100644 --- a/keyboards/massdrop/alt/keymaps/default_md/keymap.c +++ b/keyboards/massdrop/alt/keymaps/default_md/keymap.c @@ -173,7 +173,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { led_instruction_t led_instructions[] = { //LEDs are normally inactive, no processing is performed on them //Flags are used in matching criteria for an LED to be active and indicate how to color it - //Flags can be found in tmk_core/protocol/arm_atsam/led_matrix.h (prefixed with LED_FLAG_) + //Flags can be found in tmk_core/protocol/arm_atsam/md_rgb_matrix.h (prefixed with LED_FLAG_) //LED IDs can be found in config_led.h in the keyboard's directory //Examples are below diff --git a/keyboards/massdrop/alt/keymaps/reywood/rgb_matrix_user.c b/keyboards/massdrop/alt/keymaps/reywood/rgb_matrix_user.c index 36131e20209b..925780ebacba 100644 --- a/keyboards/massdrop/alt/keymaps/reywood/rgb_matrix_user.c +++ b/keyboards/massdrop/alt/keymaps/reywood/rgb_matrix_user.c @@ -1,5 +1,5 @@ #include "quantum.h" -#include "led_matrix.h" +#include "md_rgb_matrix.h" extern issi3733_led_t *led_cur; extern uint8_t led_per_run; @@ -76,7 +76,7 @@ void rgb_matrix_init_user(void) { led_cur_index = 0; } -void led_matrix_run(void) { +void rgb_matrix_run(void) { uint8_t led_this_run = 0; if (led_cur == 0) { //Denotes start of new processing cycle in the case of chunked processing diff --git a/keyboards/massdrop/ctrl/config_led.c b/keyboards/massdrop/ctrl/config_led.c index 0cfe4ee216c4..f711c6a4fe27 100644 --- a/keyboards/massdrop/ctrl/config_led.c +++ b/keyboards/massdrop/ctrl/config_led.c @@ -1,7 +1,7 @@ #ifdef RGB_MATRIX_ENABLE #include "ctrl.h" -#include "led_matrix.h" +#include "md_rgb_matrix.h" #include "rgb_matrix.h" #include "config_led.h" @@ -75,7 +75,7 @@ led_config_t g_led_config = { { #ifdef USB_LED_INDICATOR_ENABLE void rgb_matrix_indicators_kb(void) { - led_matrix_indicators(); + md_rgb_matrix_indicators(); } #endif // USB_LED_INDICATOR_ENABLE diff --git a/keyboards/massdrop/ctrl/ctrl.h b/keyboards/massdrop/ctrl/ctrl.h index c83efca16d15..1650beb9a444 100644 --- a/keyboards/massdrop/ctrl/ctrl.h +++ b/keyboards/massdrop/ctrl/ctrl.h @@ -5,7 +5,7 @@ #include "matrix.h" #include "i2c_master.h" -#include "led_matrix.h" //For led keycodes +#include "md_rgb_matrix.h" //For led keycodes #include "usb/udi_cdc.h" #include "usb/usb2422.h" diff --git a/keyboards/massdrop/ctrl/keymaps/default_md/keymap.c b/keyboards/massdrop/ctrl/keymaps/default_md/keymap.c index 93289f8aaeff..9ecebefa2a77 100644 --- a/keyboards/massdrop/ctrl/keymaps/default_md/keymap.c +++ b/keyboards/massdrop/ctrl/keymaps/default_md/keymap.c @@ -186,7 +186,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { led_instruction_t led_instructions[] = { //LEDs are normally inactive, no processing is performed on them //Flags are used in matching criteria for an LED to be active and indicate how to color it - //Flags can be found in tmk_core/protocol/arm_atsam/led_matrix.h (prefixed with LED_FLAG_) + //Flags can be found in tmk_core/protocol/arm_atsam/md_rgb_matrix.h (prefixed with LED_FLAG_) //LED IDs can be found in config_led.h in the keyboard's directory //Examples are below diff --git a/keyboards/massdrop/ctrl/keymaps/endgame/config_led.c b/keyboards/massdrop/ctrl/keymaps/endgame/config_led.c index 448793cf5d90..ec32b652da32 100644 --- a/keyboards/massdrop/ctrl/keymaps/endgame/config_led.c +++ b/keyboards/massdrop/ctrl/keymaps/endgame/config_led.c @@ -1,7 +1,7 @@ #ifdef RGB_MATRIX_ENABLE #include "ctrl.h" -#include "led_matrix.h" +#include "md_rgb_matrix.h" #include "rgb_matrix.h" #include "config_led.h" @@ -75,7 +75,7 @@ led_config_t g_led_config = { { #ifdef USB_LED_INDICATOR_ENABLE void rgb_matrix_indicators_kb(void) { - led_matrix_indicators(); + md_rgb_matrix_indicators(); } #endif // USB_LED_INDICATOR_ENABLE diff --git a/keyboards/massdrop/ctrl/keymaps/matthewrobo/config_led.c b/keyboards/massdrop/ctrl/keymaps/matthewrobo/config_led.c index a4ce649d3b33..a1c1dec5431a 100644 --- a/keyboards/massdrop/ctrl/keymaps/matthewrobo/config_led.c +++ b/keyboards/massdrop/ctrl/keymaps/matthewrobo/config_led.c @@ -19,7 +19,7 @@ along with this program. If not, see . #ifdef RGB_MATRIX_ENABLE # include "ctrl.h" -# include "led_matrix.h" +# include "md_rgb_matrix.h" # include "rgb_matrix.h" # include "config_led.h" // clang-format off @@ -91,7 +91,7 @@ led_config_t g_led_config = { { // clang-format on # ifdef USB_LED_INDICATOR_ENABLE -void rgb_matrix_indicators_kb(void) { led_matrix_indicators(); } +void rgb_matrix_indicators_kb(void) { md_rgb_matrix_indicators(); } # endif // USB_LED_INDICATOR_ENABLE -#endif +#endif \ No newline at end of file diff --git a/keyboards/massdrop/ctrl/keymaps/responsive_pattern/keymap.c b/keyboards/massdrop/ctrl/keymaps/responsive_pattern/keymap.c index dbf90b50a1f7..d20dffef1488 100644 --- a/keyboards/massdrop/ctrl/keymaps/responsive_pattern/keymap.c +++ b/keyboards/massdrop/ctrl/keymaps/responsive_pattern/keymap.c @@ -659,7 +659,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { led_instruction_t led_instructions[] = { //LEDs are normally inactive, no processing is performed on them //Flags are used in matching criteria for an LED to be active and indicate how to color it - //Flags can be found in tmk_core/protocol/arm_atsam/led_matrix.h (prefixed with LED_FLAG_) + //Flags can be found in tmk_core/protocol/arm_atsam/md_rgb_matrix.h (prefixed with LED_FLAG_) //LED IDs can be found in config_led.h in the keyboard's directory //Examples are below diff --git a/tmk_core/common/arm_atsam/suspend.c b/tmk_core/common/arm_atsam/suspend.c index d1077be4c20c..e51426128d85 100644 --- a/tmk_core/common/arm_atsam/suspend.c +++ b/tmk_core/common/arm_atsam/suspend.c @@ -1,6 +1,6 @@ #include "matrix.h" #include "i2c_master.h" -#include "led_matrix.h" +#include "md_rgb_matrix.h" #include "suspend.h" /** \brief Suspend idle diff --git a/tmk_core/protocol/arm_atsam.mk b/tmk_core/protocol/arm_atsam.mk index 8d6f724f0996..0e4a20f475e4 100644 --- a/tmk_core/protocol/arm_atsam.mk +++ b/tmk_core/protocol/arm_atsam.mk @@ -5,8 +5,8 @@ SRC += $(ARM_ATSAM_DIR)/clks.c SRC += $(ARM_ATSAM_DIR)/d51_util.c SRC += $(ARM_ATSAM_DIR)/i2c_master.c ifeq ($(RGB_MATRIX_ENABLE),custom) - SRC += $(ARM_ATSAM_DIR)/led_matrix_programs.c - SRC += $(ARM_ATSAM_DIR)/led_matrix.c + SRC += $(ARM_ATSAM_DIR)/md_rgb_matrix_programs.c + SRC += $(ARM_ATSAM_DIR)/md_rgb_matrix.c endif SRC += $(ARM_ATSAM_DIR)/main_arm_atsam.c SRC += $(ARM_ATSAM_DIR)/spi.c diff --git a/tmk_core/protocol/arm_atsam/arm_atsam_protocol.h b/tmk_core/protocol/arm_atsam/arm_atsam_protocol.h index 8cb00b872ae9..d126c66e7d11 100644 --- a/tmk_core/protocol/arm_atsam/arm_atsam_protocol.h +++ b/tmk_core/protocol/arm_atsam/arm_atsam_protocol.h @@ -35,7 +35,7 @@ along with this program. If not, see . # include "main_arm_atsam.h" # ifdef RGB_MATRIX_ENABLE -# include "led_matrix.h" +# include "md_rgb_matrix.h" # include "rgb_matrix.h" # endif # include "issi3733_driver.h" diff --git a/tmk_core/protocol/arm_atsam/led_matrix.c b/tmk_core/protocol/arm_atsam/md_rgb_matrix.c similarity index 98% rename from tmk_core/protocol/arm_atsam/led_matrix.c rename to tmk_core/protocol/arm_atsam/md_rgb_matrix.c index 69cb03a9f78b..6c4eac122f45 100644 --- a/tmk_core/protocol/arm_atsam/led_matrix.c +++ b/tmk_core/protocol/arm_atsam/md_rgb_matrix.c @@ -23,7 +23,7 @@ along with this program. If not, see . #ifdef USE_MASSDROP_CONFIGURATOR __attribute__((weak)) led_instruction_t led_instructions[] = {{.end = 1}}; -static void led_matrix_massdrop_config_override(int i); +static void md_rgb_matrix_config_override(int i); #endif // USE_MASSDROP_CONFIGURATOR void SERCOM1_0_Handler(void) { @@ -188,7 +188,7 @@ void issi3733_prepare_arrays(void) { } } -void led_matrix_prepare(void) { +void md_rgb_matrix_prepare(void) { for (uint8_t i = 0; i < ISSI3733_LED_COUNT; i++) { *led_map[i].rgb.r = 0; *led_map[i].rgb.g = 0; @@ -199,7 +199,7 @@ void led_matrix_prepare(void) { void led_set_one(int i, uint8_t r, uint8_t g, uint8_t b) { if (i < ISSI3733_LED_COUNT) { #ifdef USE_MASSDROP_CONFIGURATOR - led_matrix_massdrop_config_override(i); + md_rgb_matrix_massdrop_config_override(i); #else led_buffer[i].r = r; led_buffer[i].g = g; @@ -219,7 +219,7 @@ void init(void) { issi3733_prepare_arrays(); - led_matrix_prepare(); + md_rgb_matrix_prepare(); gcr_min_counter = 0; v_5v_cat_hit = 0; @@ -290,7 +290,7 @@ void flush(void) { i2c_led_q_run(); } -void led_matrix_indicators(void) { +void md_rgb_matrix_indicators(void) { uint8_t kbled = keyboard_leds(); if (kbled && rgb_matrix_config.enable) { for (uint8_t i = 0; i < ISSI3733_LED_COUNT; i++) { @@ -397,7 +397,7 @@ static void led_run_pattern(led_setup_t* f, float* ro, float* go, float* bo, flo } } -static void led_matrix_massdrop_config_override(int i) { +static void md_rgb_matrix_config_override(int i) { float ro = 0; float go = 0; float bo = 0; diff --git a/tmk_core/protocol/arm_atsam/led_matrix.h b/tmk_core/protocol/arm_atsam/md_rgb_matrix.h similarity index 99% rename from tmk_core/protocol/arm_atsam/led_matrix.h rename to tmk_core/protocol/arm_atsam/md_rgb_matrix.h index 8eaa5623bda5..322b0f99d163 100644 --- a/tmk_core/protocol/arm_atsam/led_matrix.h +++ b/tmk_core/protocol/arm_atsam/md_rgb_matrix.h @@ -86,7 +86,7 @@ extern uint8_t gcr_actual_last; void gcr_compute(void); -void led_matrix_indicators(void); +void md_rgb_matrix_indicators(void); /*------------------------- Legacy Lighting Support ------------------------*/ diff --git a/tmk_core/protocol/arm_atsam/led_matrix_programs.c b/tmk_core/protocol/arm_atsam/md_rgb_matrix_programs.c similarity index 99% rename from tmk_core/protocol/arm_atsam/led_matrix_programs.c rename to tmk_core/protocol/arm_atsam/md_rgb_matrix_programs.c index 360102ba8455..b43008cc5b52 100644 --- a/tmk_core/protocol/arm_atsam/led_matrix_programs.c +++ b/tmk_core/protocol/arm_atsam/md_rgb_matrix_programs.c @@ -17,7 +17,7 @@ along with this program. If not, see . #ifdef USE_MASSDROP_CONFIGURATOR -# include "led_matrix.h" +# include "md_rgb_matrix.h" // Teal <-> Salmon led_setup_t leds_teal_salmon[] = { From fef807f3ab953220f40f8138969093c7e331ed24 Mon Sep 17 00:00:00 2001 From: fauxpark Date: Sat, 28 Nov 2020 21:47:48 +1100 Subject: [PATCH 3/3] Fix a couple function names --- keyboards/massdrop/alt/keymaps/reywood/rgb_matrix_user.c | 2 +- tmk_core/protocol/arm_atsam/md_rgb_matrix.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/keyboards/massdrop/alt/keymaps/reywood/rgb_matrix_user.c b/keyboards/massdrop/alt/keymaps/reywood/rgb_matrix_user.c index 925780ebacba..9ea8fbede49f 100644 --- a/keyboards/massdrop/alt/keymaps/reywood/rgb_matrix_user.c +++ b/keyboards/massdrop/alt/keymaps/reywood/rgb_matrix_user.c @@ -76,7 +76,7 @@ void rgb_matrix_init_user(void) { led_cur_index = 0; } -void rgb_matrix_run(void) { +void md_rgb_matrix_run(void) { uint8_t led_this_run = 0; if (led_cur == 0) { //Denotes start of new processing cycle in the case of chunked processing diff --git a/tmk_core/protocol/arm_atsam/md_rgb_matrix.c b/tmk_core/protocol/arm_atsam/md_rgb_matrix.c index 6c4eac122f45..439aaf8b3809 100644 --- a/tmk_core/protocol/arm_atsam/md_rgb_matrix.c +++ b/tmk_core/protocol/arm_atsam/md_rgb_matrix.c @@ -199,7 +199,7 @@ void md_rgb_matrix_prepare(void) { void led_set_one(int i, uint8_t r, uint8_t g, uint8_t b) { if (i < ISSI3733_LED_COUNT) { #ifdef USE_MASSDROP_CONFIGURATOR - md_rgb_matrix_massdrop_config_override(i); + md_rgb_matrix_config_override(i); #else led_buffer[i].r = r; led_buffer[i].g = g;