summaryrefslogtreecommitdiffstats
path: root/tmk_core/protocol/arm_atsam/main_arm_atsam.c
diff options
context:
space:
mode:
authorDaniel Prilik <danielprilik@gmail.com>2019-04-03 18:30:47 -0700
committerDrashna Jaelre <drashna@live.com>2019-04-03 18:30:47 -0700
commit763b26cdb98c2702f7b2f8de239d4edba0fa4065 (patch)
treea99e15e1cb9be30eb5786e5ea1d3de809339b87b /tmk_core/protocol/arm_atsam/main_arm_atsam.c
parent63177760deaf23bb1f676974cecf211676285604 (diff)
RGB Matrix support for Massdrop CTRL/ALT (#5328)
* port Massdrop CTRL/ALT to use RGB Matrix Co-authored-by: Matt Schneeberger <helluvamatt@gmail.com> * Massdrop lighting support working This commit is to get the Massdrop lighting code working again through use of the compilation define USE_MASSDROP_CONFIGURATOR added to a keymap's rules.mk. Added keymaps for both CTRL and ALT named default_md and mac_md. These should be used if the Massdrop style lighting is desired. * Updating config based on testing results with patrickmt & compile errors * Updates for PR5328 For CTRL and ALT: Moved location of new RGB Matrix macros from config_led.h to config.h. Added RGB_MATRIX_LED_FLUSH_LIMIT (time between flushes) to config.h for correct LED driver update timing. Re-added missing breathing code for when Massdrop configurator mode is defined. * remove prilik keymap form PR
Diffstat (limited to 'tmk_core/protocol/arm_atsam/main_arm_atsam.c')
-rw-r--r--tmk_core/protocol/arm_atsam/main_arm_atsam.c16
1 files changed, 6 insertions, 10 deletions
diff --git a/tmk_core/protocol/arm_atsam/main_arm_atsam.c b/tmk_core/protocol/arm_atsam/main_arm_atsam.c
index eaad66e9fc..0974a230d4 100644
--- a/tmk_core/protocol/arm_atsam/main_arm_atsam.c
+++ b/tmk_core/protocol/arm_atsam/main_arm_atsam.c
@@ -203,13 +203,6 @@ void main_subtask_usb_state(void)
}
}
-void main_subtask_led(void)
-{
- if (g_usb_state != USB_FSMSTATUS_FSMSTATE_ON_Val) return; //Only run LED tasks if USB is operating
-
- led_matrix_task();
-}
-
void main_subtask_power_check(void)
{
static uint64_t next_5v_checkup = 0;
@@ -221,7 +214,9 @@ void main_subtask_power_check(void)
v_5v = adc_get(ADC_5V);
v_5v_avg = 0.9 * v_5v_avg + 0.1 * v_5v;
+#ifdef RGB_MATRIX_ENABLE
gcr_compute();
+#endif
}
}
@@ -240,7 +235,6 @@ void main_subtask_usb_extra_device(void)
void main_subtasks(void)
{
main_subtask_usb_state();
- main_subtask_led();
main_subtask_power_check();
main_subtask_usb_extra_device();
}
@@ -263,7 +257,9 @@ int main(void)
SR_EXP_Init();
+#ifdef RGB_MATRIX_ENABLE
i2c1_init();
+#endif // RGB_MATRIX_ENABLE
matrix_init();
@@ -281,8 +277,7 @@ int main(void)
DBG_LED_OFF;
- led_matrix_init();
-
+#ifdef RGB_MATRIX_ENABLE
while (I2C3733_Init_Control() != 1) {}
while (I2C3733_Init_Drivers() != 1) {}
@@ -292,6 +287,7 @@ int main(void)
for (uint8_t drvid = 0; drvid < ISSI3733_DRIVER_COUNT; drvid++)
I2C_LED_Q_ONOFF(drvid); //Queue data
+#endif // RGB_MATRIX_ENABLE
keyboard_setup();