diff options
Diffstat (limited to 'tmk_core/common/avr/suspend.c')
-rw-r--r-- | tmk_core/common/avr/suspend.c | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/tmk_core/common/avr/suspend.c b/tmk_core/common/avr/suspend.c index 213f03f6f..4cdd6a420 100644 --- a/tmk_core/common/avr/suspend.c +++ b/tmk_core/common/avr/suspend.c | |||
@@ -41,6 +41,10 @@ __asm__ __volatile__ ( \ | |||
41 | ) | 41 | ) |
42 | 42 | ||
43 | 43 | ||
44 | /** \brief Suspend idle | ||
45 | * | ||
46 | * FIXME: needs doc | ||
47 | */ | ||
44 | void suspend_idle(uint8_t time) | 48 | void suspend_idle(uint8_t time) |
45 | { | 49 | { |
46 | cli(); | 50 | cli(); |
@@ -52,7 +56,8 @@ void suspend_idle(uint8_t time) | |||
52 | } | 56 | } |
53 | 57 | ||
54 | #ifndef NO_SUSPEND_POWER_DOWN | 58 | #ifndef NO_SUSPEND_POWER_DOWN |
55 | /* Power down MCU with watchdog timer | 59 | /** \brief Power down MCU with watchdog timer |
60 | * | ||
56 | * wdto: watchdog timer timeout defined in <avr/wdt.h> | 61 | * wdto: watchdog timer timeout defined in <avr/wdt.h> |
57 | * WDTO_15MS | 62 | * WDTO_15MS |
58 | * WDTO_30MS | 63 | * WDTO_30MS |
@@ -67,6 +72,10 @@ void suspend_idle(uint8_t time) | |||
67 | */ | 72 | */ |
68 | static uint8_t wdt_timeout = 0; | 73 | static uint8_t wdt_timeout = 0; |
69 | 74 | ||
75 | /** \brief Power down | ||
76 | * | ||
77 | * FIXME: needs doc | ||
78 | */ | ||
70 | static void power_down(uint8_t wdto) | 79 | static void power_down(uint8_t wdto) |
71 | { | 80 | { |
72 | #ifdef PROTOCOL_LUFA | 81 | #ifdef PROTOCOL_LUFA |
@@ -111,6 +120,10 @@ static void power_down(uint8_t wdto) | |||
111 | } | 120 | } |
112 | #endif | 121 | #endif |
113 | 122 | ||
123 | /** \brief Suspend power down | ||
124 | * | ||
125 | * FIXME: needs doc | ||
126 | */ | ||
114 | void suspend_power_down(void) | 127 | void suspend_power_down(void) |
115 | { | 128 | { |
116 | #ifndef NO_SUSPEND_POWER_DOWN | 129 | #ifndef NO_SUSPEND_POWER_DOWN |
@@ -131,7 +144,10 @@ bool suspend_wakeup_condition(void) | |||
131 | return false; | 144 | return false; |
132 | } | 145 | } |
133 | 146 | ||
134 | // run immediately after wakeup | 147 | /** \brief run immediately after wakeup |
148 | * | ||
149 | * FIXME: needs doc | ||
150 | */ | ||
135 | void suspend_wakeup_init(void) | 151 | void suspend_wakeup_init(void) |
136 | { | 152 | { |
137 | // clear keyboard state | 153 | // clear keyboard state |