// Copyright 2022 Darwin Schuppan // SPDX license identifier: MIT #pragma once #include #include #include #include static void (*full_reset)() = nullptr; void low_power_sleep_minutes(unsigned long t); static inline void wdt_enable_with_full_reset() { wdt_enable(WDTO_8S); /* Start watchdog timer for 8s. */ WDTCSR |= (1 << WDIE); /* Enable watchdog interrupt. */ } static inline void disable_recording_interrupts() { TIMSK1 &= ~(_BV(OCIE1A) | _BV(OCIE1B)); }