fix typo
This commit is contained in:
parent
618c75b72b
commit
dac3a33e9e
@ -5,9 +5,9 @@
|
|||||||
|
|
||||||
void (*full_reset)() = nullptr;
|
void (*full_reset)() = nullptr;
|
||||||
|
|
||||||
static volatile bool wdt_int_sleep_mode = false;
|
static volatile bool wdt_in_sleep_mode = false;
|
||||||
ISR (WDT_vect) {
|
ISR (WDT_vect) {
|
||||||
if (wdt_int_sleep_mode)
|
if (wdt_in_sleep_mode)
|
||||||
wdt_disable();
|
wdt_disable();
|
||||||
else
|
else
|
||||||
full_reset();
|
full_reset();
|
||||||
@ -15,7 +15,7 @@ ISR (WDT_vect) {
|
|||||||
|
|
||||||
/* Based on https://github.com/rocketscream/Low-Power. */
|
/* Based on https://github.com/rocketscream/Low-Power. */
|
||||||
void low_power_sleep_minutes(unsigned long t) {
|
void low_power_sleep_minutes(unsigned long t) {
|
||||||
wdt_int_sleep_mode = true;
|
wdt_in_sleep_mode = true;
|
||||||
ADCSRA &= ~_BV(ADEN); /* Disable ADC. */
|
ADCSRA &= ~_BV(ADEN); /* Disable ADC. */
|
||||||
for (unsigned long i = 0; 8ul * i < 60ul * t; i++) {
|
for (unsigned long i = 0; 8ul * i < 60ul * t; i++) {
|
||||||
// Power Down for 8s
|
// Power Down for 8s
|
||||||
@ -33,5 +33,5 @@ void low_power_sleep_minutes(unsigned long t) {
|
|||||||
} while (0);
|
} while (0);
|
||||||
}
|
}
|
||||||
ADCSRA |= _BV(ADEN); /* Re-enable ADC. */
|
ADCSRA |= _BV(ADEN); /* Re-enable ADC. */
|
||||||
wdt_int_sleep_mode = false;
|
wdt_in_sleep_mode = false;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user