]> git.donarmstrong.com Git - qmk_firmware.git/commitdiff
Fix RG Sleep issues for Teensy Controllers
authorDrashna Jaelre <drashna@live.com>
Sat, 21 Jul 2018 21:16:14 +0000 (14:16 -0700)
committerskullydazed <skullydazed@users.noreply.github.com>
Tue, 11 Sep 2018 20:05:17 +0000 (13:05 -0700)
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.

tmk_core/common/avr/suspend.c

index 3d4a48439be4291589dddb5b974a0b54f9518b45..73fdda6cc0471c612cb204293b63003ca2dee76f 100644 (file)
@@ -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();