summaryrefslogtreecommitdiffstats
path: root/tmk_core/protocol/arm_atsam/led_matrix.c
diff options
context:
space:
mode:
authorSean Dwyer <sean.dwyer@gmail.com>2018-11-06 20:54:53 +0100
committerDrashna Jaelre <drashna@live.com>2018-11-06 20:54:53 +0100
commit63e212c0b78be664785433c11cd728f15f50cd6a (patch)
treef20c10f2e0b3201d003e664bcd80f481c9982047 /tmk_core/protocol/arm_atsam/led_matrix.c
parent388df5359b913eaf1ce6fb0ef624e430ad010ea5 (diff)
downloadqmk_firmware-63e212c0b78be664785433c11cd728f15f50cd6a.tar.gz
qmk_firmware-63e212c0b78be664785433c11cd728f15f50cd6a.tar.xz
Add localized LED flash effect on keypress to Massdrop ALT (#4340)
Diffstat (limited to 'tmk_core/protocol/arm_atsam/led_matrix.c')
-rw-r--r--tmk_core/protocol/arm_atsam/led_matrix.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/tmk_core/protocol/arm_atsam/led_matrix.c b/tmk_core/protocol/arm_atsam/led_matrix.c
index 7ee1dad22..c328fdc4c 100644
--- a/tmk_core/protocol/arm_atsam/led_matrix.c
+++ b/tmk_core/protocol/arm_atsam/led_matrix.c
@@ -257,13 +257,15 @@ issi3733_led_t *led_cur;
uint8_t led_per_run = 15;
float breathe_mult;
-void led_matrix_run(led_setup_t *f)
+__attribute__ ((weak))
+void led_matrix_run(void)
{
float ro;
float go;
float bo;
float px;
uint8_t led_this_run = 0;
+ led_setup_t *f = (led_setup_t*)led_setups[led_animation_id];
if (led_cur == 0) //Denotes start of new processing cycle in the case of chunked processing
{
@@ -459,13 +461,19 @@ uint8_t led_matrix_init(void)
//Run led matrix code once for initial LED coloring
led_cur = 0;
- led_matrix_run((led_setup_t*)led_setups[led_animation_id]);
+ rgb_matrix_init_user();
+ led_matrix_run();
DBGC(DC_LED_MATRIX_INIT_COMPLETE);
return 0;
}
+__attribute__ ((weak))
+void rgb_matrix_init_user(void) {
+
+}
+
#define LED_UPDATE_RATE 10 //ms
//led data processing can take time, so process data in chunks to free up the processor
@@ -502,7 +510,7 @@ void led_matrix_task(void)
if (led_cur != lede)
{
//m15_off; //debug profiling
- led_matrix_run((led_setup_t*)led_setups[led_animation_id]);
+ led_matrix_run();
//m15_on; //debug profiling
}
}