diff options
| author | Selene ToyKeeper | 2018-06-17 19:40:38 -0600 |
|---|---|---|
| committer | Selene ToyKeeper | 2018-06-17 19:40:38 -0600 |
| commit | 3dcfc924bf18c48b76f4b950471160436fddb316 (patch) | |
| tree | f3a7c80d8a2cdb116f3217d6750f6a7faf0852d5 /spaghetti-monster/fsm-standby.h | |
| parent | Implemented halfsleep mode. (diff) | |
| download | anduril-3dcfc924bf18c48b76f4b950471160436fddb316.tar.gz anduril-3dcfc924bf18c48b76f4b950471160436fddb316.tar.bz2 anduril-3dcfc924bf18c48b76f4b950471160436fddb316.zip | |
Changed halfsleep mode to TICK_DURING_STANDBY. Added blinking indicator LED support to Anduril.
Diffstat (limited to 'spaghetti-monster/fsm-standby.h')
| -rw-r--r-- | spaghetti-monster/fsm-standby.h | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/spaghetti-monster/fsm-standby.h b/spaghetti-monster/fsm-standby.h index bd362a3..2cea080 100644 --- a/spaghetti-monster/fsm-standby.h +++ b/spaghetti-monster/fsm-standby.h @@ -25,9 +25,26 @@ // set this to nonzero to enter standby mode next time the system is idle volatile uint8_t go_to_standby = 0; -#ifdef USE_HALFSLEEP_MODE -// half-sleep "twilight" mode with WDT on but running slowly -volatile uint8_t halfsleep_mode = 0; +#ifdef TICK_DURING_STANDBY +#ifndef STANDBY_TICK_SPEED +#define STANDBY_TICK_SPEED 5 // every 0.512 s +/* + * From the Attiny85 manual: + * 0: 16 ms + * 1: 32 ms + * 2: 64 ms + * 3: 0.125 s + * 4: 0.25 s + * 5: 0.5 s + * 6: 1.0 s + * 7: 2.0 s + * 32: 4.0 s + * 33: 8.0 s + * (other values may have unexpected effects; not sure why the final bit is + * separated from the others, in the "32" position instead of "8", but that's + * how it is) + */ +#endif #endif #define standby_mode sleep_until_eswitch_pressed |
