From: Drashna Jaelre Date: Sat, 21 Jul 2018 21:16:14 +0000 (-0700) Subject: Fix RG Sleep issues for Teensy Controllers X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=32ff7be266793967b820da80ae6f3fca0a1688b4;p=qmk_firmware.git 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. --- diff --git a/tmk_core/common/avr/suspend.c b/tmk_core/common/avr/suspend.c index 3d4a48439..73fdda6cc 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();