summaryrefslogtreecommitdiff
path: root/src/drivers/ao_watchdog.h
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2019-08-12 17:30:48 -0700
committerKeith Packard <keithp@keithp.com>2019-08-12 17:30:48 -0700
commitfcb5d55e94058810fc8b31ad5e8caa99fa61200c (patch)
tree3f2192b8ca74fdfc5fa68e6cc59ee294dd02e315 /src/drivers/ao_watchdog.h
parent5e738fd2e3602c6a92f205df99361dbe06c1719e (diff)
altos: Use fast timer for buttons instead of edge-triggered ISR
If the button bounces between the triggering interrupt and the button state check, we could lose the final state change of the button and send an incorrect event to the application. In the worst case, the button would end up in exactly the wrong state, toggling in the wrong direction. Use the fast timer to poll all buttons instead so that there is only one check of each button at each poll interval (instead of the interrupt and the state check). This makes buttons reliably debounced. Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'src/drivers/ao_watchdog.h')
0 files changed, 0 insertions, 0 deletions