Compare commits

..

No commits in common. "25d7967d698c99220411f02014bcd47593f9d716" and "b6004c42e0be049d449b70e2b9ff600752dfd203" have entirely different histories.

View File

@ -61,10 +61,6 @@
END USER CONFIGURATION
**********************/
#if !defined(__AVR_ATmega328P__) || F_CPU != 16000000
#error "This program only works on ATmega328P devices with a clock frequency of 16MHz!"
#endif
void (*full_reset)() = nullptr;
static int serial_putch(char c, FILE *f) {
@ -134,7 +130,7 @@ ISR (WDT_vect) {
/* Based on https://github.com/rocketscream/Low-Power. */
static void low_power_sleep_minutes(unsigned long t) {
wdt_int_sleep_mode = true;
ADCSRA &= ~_BV(ADEN); /* Disable ADC. */
ADCSRA &= ~(1 << ADEN); /* Disable ADC. */
for (unsigned long i = 0; 8ul * i < 60ul * t; i++) {
// Power Down for 8s
wdt_enable(WDTO_8S); /* Start watchdog timer for 8s. */
@ -150,7 +146,7 @@ static void low_power_sleep_minutes(unsigned long t) {
sei();
} while (0);
}
ADCSRA |= _BV(ADEN); /* Re-enable ADC. */
ADCSRA |= (1 << ADEN); /* Re-enable ADC. */
wdt_int_sleep_mode = false;
}