#include "suspend_avr.h"
#include "suspend.h"
#include "timer.h"
+#include "led.h"
#ifdef PROTOCOL_LUFA
#include "lufa.h"
#endif
// Watchdog Interrupt Mode
wdt_intr_enable(wdto);
+#ifdef BACKLIGHT_ENABLE
+ backlight_set(0);
+#endif
+
+ // Turn off LED indicators
+ led_set(0);
+
// TODO: more power saving
// See PicoPower application note
// - I/O port input with pullup
power_down(WDTO_15MS);
}
+__attribute__ ((weak)) void matrix_power_up(void) {}
+__attribute__ ((weak)) void matrix_power_down(void) {}
bool suspend_wakeup_condition(void)
{
+#ifdef BACKLIGHT_ENABLE
+ backlight_set(0);
+#endif
matrix_power_up();
matrix_scan();
matrix_power_down();
// clear keyboard state
clear_keyboard();
#ifdef BACKLIGHT_ENABLE
+ backlight_set(0);
backlight_init();
#endif
+led_set(host_keyboard_leds());
}
#ifndef NO_SUSPEND_POWER_DOWN
}
}
#endif
+