X-Git-Url: https://git.friedersdorff.com/?a=blobdiff_plain;f=common%2Fsuspend.c;h=5b378892f30f5112ec6725f8c22b619e592ec3f6;hb=0bfba7acc4e05e66c8ab448286fc51bc94d03a57;hp=6029fe7ffa409c2caa3351f3a9d60a16b0bfb7eb;hpb=afc3148e2341e4be982cdb628543e30923cfdaf7;p=max%2Ftmk_keyboard.git diff --git a/common/suspend.c b/common/suspend.c index 6029fe7f..5b378892 100644 --- a/common/suspend.c +++ b/common/suspend.c @@ -1,10 +1,14 @@ #include "suspend.h" #include "matrix.h" #include "action.h" +#include "backlight.h" void suspend_power_down(void) { +#ifdef BACKLIGHT_ENABLE + backlight_set(0); +#endif #ifndef NO_SUSPEND_POWER_DOWN // Enable watchdog to wake from MCU sleep cli(); @@ -47,9 +51,11 @@ bool suspend_wakeup_condition(void) // run immediately after wakeup void suspend_wakeup_init(void) { - // clear matrix and keyboard state - matrix_init(); + // clear keyboard state clear_keyboard(); +#ifdef BACKLIGHT_ENABLE + backlight_init(); +#endif } #ifndef NO_SUSPEND_POWER_DOWN