From aa4c627377b07cc07cd1e904f9f7d2f24c1155a4 Mon Sep 17 00:00:00 2001 From: Selene ToyKeeper Date: Wed, 26 Apr 2023 01:34:53 -0600 Subject: made sleep voltage work on attiny1616 again (oops, it has no "ADC Noise Reduction" mode... needs different setup code) --- spaghetti-monster/fsm-standby.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'spaghetti-monster/fsm-standby.c') diff --git a/spaghetti-monster/fsm-standby.c b/spaghetti-monster/fsm-standby.c index 2ce3a24..5def07c 100644 --- a/spaghetti-monster/fsm-standby.c +++ b/spaghetti-monster/fsm-standby.c @@ -41,12 +41,8 @@ void sleep_until_eswitch_pressed() // configure sleep mode #ifdef TICK_DURING_STANDBY - // needs a special sleep mode to get accurate measurements - // quickly ... full power-down ends up using more power - // overall, and causes some weird issues when the MCU - // doesn't stay awake enough cycles to complete a reading - if (adc_active_now) - set_sleep_mode(SLEEP_MODE_ADC); + // needs a special sleep mode during measurements + if (adc_active_now) adc_sleep_mode(); else #endif set_sleep_mode(SLEEP_MODE_PWR_DOWN); -- cgit v1.2.3