#include "timer.h"
#include "led.h"
#include "host.h"
+#include "rgblight_reconfig.h"
#ifdef PROTOCOL_LUFA
#include "lufa.h"
sleep_disable();
}
+
+// TODO: This needs some cleanup
+
+/** \brief Run keyboard level Power down
+ *
+ * FIXME: needs doc
+ */
+__attribute__ ((weak))
+void suspend_power_down_user (void) { }
+/** \brief Run keyboard level Power down
+ *
+ * FIXME: needs doc
+ */
+__attribute__ ((weak))
+void suspend_power_down_kb(void) {
+ suspend_power_down_user();
+}
+
#ifndef NO_SUSPEND_POWER_DOWN
/** \brief Power down MCU with watchdog timer
*
*/
static uint8_t wdt_timeout = 0;
-/** \brief Run keyboard level Power down
- *
- * FIXME: needs doc
- */
-__attribute__ ((weak))
-void suspend_power_down_user (void) { }
-/** \brief Run keyboard level Power down
- *
- * FIXME: needs doc
- */
-__attribute__ ((weak))
-void suspend_power_down_kb(void) {
- suspend_power_down_user();
-}
-
/** \brief Power down
*
* FIXME: needs doc
*/
void suspend_power_down(void)
{
+ suspend_power_down_kb();
+
#ifndef NO_SUSPEND_POWER_DOWN
power_down(WDTO_15MS);
#endif
rgblight_timer_enable();
#endif
#endif
- suspend_wakeup_init_kb();
+ suspend_wakeup_init_kb();
}
#ifndef NO_SUSPEND_POWER_DOWN