8 #include "action_util.h"
11 #include "backlight.h"
14 void suspend_idle(uint8_t time) {
15 // TODO: this is not used anywhere - what units is 'time' in?
16 chThdSleepMilliseconds(time);
19 void suspend_power_down(void) {
20 // TODO: figure out what to power down and how
21 // shouldn't power down TPM/FTM if we want a breathing LED
22 // also shouldn't power down USB
24 // on AVR, this enables the watchdog for 15ms (max), and goes to
25 // SLEEP_MODE_PWR_DOWN
27 chThdSleepMilliseconds(17);
30 __attribute__ ((weak)) void matrix_power_up(void) {}
31 __attribute__ ((weak)) void matrix_power_down(void) {}
32 bool suspend_wakeup_condition(void)
37 for (uint8_t r = 0; r < MATRIX_ROWS; r++) {
38 if (matrix_get_row(r)) return true;
43 // run immediately after wakeup
44 void suspend_wakeup_init(void)
46 // clear keyboard state
47 // need to do it manually, because we're running from ISR
48 // and clear_keyboard() calls print
49 // so only clear the variables in memory
50 // the reports will be sent from main.c afterwards
51 // or if the PC asks for GET_REPORT
55 #ifdef MOUSEKEY_ENABLE
57 #endif /* MOUSEKEY_ENABLE */
58 #ifdef EXTRAKEY_ENABLE
60 host_consumer_send(0);
61 #endif /* EXTRAKEY_ENABLE */
62 #ifdef BACKLIGHT_ENABLE
64 #endif /* BACKLIGHT_ENABLE */