aboutsummaryrefslogtreecommitdiff
path: root/spaghetti-monster
diff options
context:
space:
mode:
authorSelene ToyKeeper2019-11-20 15:30:52 -0700
committerSelene ToyKeeper2019-11-20 15:30:52 -0700
commitaab53694667203ca4af4e523e3246f81d4724207 (patch)
treed65799ccc6ce2a01873199a1d7fe8cdaf224cbd6 /spaghetti-monster
parentmerged irq-refactor branch, which fixes some small but long-standing issues: (diff)
parentfixed unintentional wakeup right after going to sleep (diff)
downloadanduril-aab53694667203ca4af4e523e3246f81d4724207.tar.gz
anduril-aab53694667203ca4af4e523e3246f81d4724207.tar.bz2
anduril-aab53694667203ca4af4e523e3246f81d4724207.zip
merged tiny fix from irq-refactor branch (fixed spurious wakeup)
Diffstat (limited to 'spaghetti-monster')
-rw-r--r--spaghetti-monster/fsm-standby.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/spaghetti-monster/fsm-standby.c b/spaghetti-monster/fsm-standby.c
index e4ef92c..9398f52 100644
--- a/spaghetti-monster/fsm-standby.c
+++ b/spaghetti-monster/fsm-standby.c
@@ -43,6 +43,8 @@ void sleep_until_eswitch_pressed()
while (button_is_pressed()) {}
empty_event_sequence(); // cancel pending input on suspend
+ PCINT_on(); // wake on e-switch event
+
#ifdef TICK_DURING_STANDBY
// detect which type of event caused a wake-up
irq_adc = 0;
@@ -53,8 +55,6 @@ void sleep_until_eswitch_pressed()
go_to_standby = 0;
#endif
- PCINT_on(); // wake on e-switch event
-
// configure sleep mode
set_sleep_mode(SLEEP_MODE_PWR_DOWN);
If you find this content useful please consider a small donation via bitcoin: bitcoin:1mxKyQsHHugqRxPKgwaA7wUwJEGCNthn2?amount=0.001&message=Donation Scraping git contents via cgit is very resource intensive. The continued hosting of these git repositories is entirely financed by your bitcoin contributions. For donations of a least 1 mBTC you include your IP address in the message of your bitcoin donation. This will remove this message in the future for requests from your IP, which will significantly reduce token usage. In any case, any contributions to bitcoin address 1mxKyQsHHugqRxPKgwaA7wUwJEGCNthn2 are very welcome. Thanks in advance for you contribution to a self-sustaining ecosystem.