26 #include <avr/power.h> 40 static uint8_t
set(uint8_t mode)
41 __attribute__((always_inline))
53 static void sleep(uint8_t mode = POWER_SLEEP_MODE);
56 __attribute__((always_inline))
63 __attribute__((always_inline))
70 __attribute__((always_inline))
72 power_timer0_enable();
76 __attribute__((always_inline))
78 power_timer0_disable();
82 __attribute__((always_inline))
84 power_timer1_enable();
88 __attribute__((always_inline))
90 power_timer1_disable();
93 #if defined(power_timer2_enable) 94 static void timer2_enable()
95 __attribute__((always_inline))
97 power_timer2_enable();
100 static void timer2_disable()
101 __attribute__((always_inline))
103 power_timer2_disable();
107 #if defined(power_timer3_enable) 108 static void timer3_enable()
109 __attribute__((always_inline))
111 power_timer3_enable();
114 static void timer3_disable()
115 __attribute__((always_inline))
117 power_timer3_disable();
121 #if defined(power_timer4_enable) 122 static void timer4_enable()
123 __attribute__((always_inline))
125 power_timer4_enable();
128 static void timer4_disable()
129 __attribute__((always_inline))
131 power_timer4_disable();
135 #if defined(power_timer5_enable) 136 __attribute__((always_inline))
137 static void timer5_enable()
139 power_timer5_enable();
142 static void timer5_disable()
143 __attribute__((always_inline))
145 power_timer5_disable();
149 #if defined(power_usart0_enable) 150 static void usart0_enable()
151 __attribute__((always_inline))
153 power_usart0_enable();
156 static void usart0_disable()
157 __attribute__((always_inline))
159 power_usart0_disable();
163 #if defined(power_usart1_enable) 164 static void usart1_enable()
165 __attribute__((always_inline))
167 power_usart1_enable();
170 static void usart1_disable()
171 __attribute__((always_inline))
173 power_usart1_disable();
177 #if defined(power_usart2_enable) 178 static void usart2_enable()
179 __attribute__((always_inline))
181 power_usart2_enable();
184 static void usart2_disable()
185 __attribute__((always_inline))
187 power_usart2_disable();
191 #if defined(power_usart3_enable) 192 static void usart3_enable()
193 __attribute__((always_inline))
195 power_usart3_enable();
198 static void usart3_disable()
199 __attribute__((always_inline))
201 power_usart3_disable();
205 #if defined(power_usb_enable) 206 static void usb_enable()
207 __attribute__((always_inline))
212 static void usb_disable()
213 __attribute__((always_inline))
219 #if defined(power_usi_enable) 220 static void usi_enable()
221 __attribute__((always_inline))
226 static void usi_disable()
227 __attribute__((always_inline))
233 #if defined(power_spi_enable) 234 static void spi_enable()
235 __attribute__((always_inline))
240 static void spi_disable()
241 __attribute__((always_inline))
247 #if defined(power_twi_enable) 248 static void twi_enable()
249 __attribute__((always_inline))
254 static void twi_disable()
255 __attribute__((always_inline))
262 __attribute__((always_inline))
269 __attribute__((always_inline))
282 static const uint8_t POWER_SLEEP_MODE = 0xff;
285 static uint8_t s_mode;
static void timer1_disable()
static void all_disable()
static void sleep(uint8_t mode=POWER_SLEEP_MODE)
static void timer0_disable()
static void adc_disable()
static void timer1_enable()
static void timer0_enable()