summaryrefslogtreecommitdiff
path: root/tmk_core/common/avr
diff options
context:
space:
mode:
authorDrashna Jaelre <drashna@live.com>2018-07-21 14:16:14 -0700
committerskullydazed <skullydazed@users.noreply.github.com>2018-09-11 13:05:17 -0700
commit32ff7be266793967b820da80ae6f3fca0a1688b4 (patch)
treede13da5daa983d1d7d0e010612b2a021db5d2fe2 /tmk_core/common/avr
parentdf8e417032bace12d69b5d75aebf257ea5dadb86 (diff)
Fix RG Sleep issues for Teensy Controllers
Appearenly, teensy controllers have some issues with waking up. If the rgblight is called "too soon", it will cause the controller to lock up, intermittently. Adding a 10 ms delay seems to fix this issue, as it lets it have enough time to handle things properly. This has been tested extensively on my Ergodox EZ, and can be seen in the @drashna userspace, under the "suspend_wakeup_init_user" function.
Diffstat (limited to 'tmk_core/common/avr')
-rw-r--r--tmk_core/common/avr/suspend.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/tmk_core/common/avr/suspend.c b/tmk_core/common/avr/suspend.c
index 3d4a48439b..73fdda6cc0 100644
--- a/tmk_core/common/avr/suspend.c
+++ b/tmk_core/common/avr/suspend.c
@@ -189,6 +189,9 @@ void suspend_wakeup_init(void)
#endif
led_set(host_keyboard_leds());
#if defined(RGBLIGHT_SLEEP) && defined(RGBLIGHT_ENABLE)
+#ifdef BOOTLOADER_TEENSY
+ wait_ms(10);
+#endif
rgblight_enable_noeeprom();
#ifdef RGBLIGHT_ANIMATIONS
rgblight_timer_enable();