diff options
author | ConfuSomu | 2021-03-01 15:13:17 -0500 |
---|---|---|
committer | ConfuSomu | 2021-03-01 15:13:17 -0500 |
commit | 03c6be69d3ba5ef7070cf857063d2bcfe12d9a3b (patch) | |
tree | 020e91b6427ee5c9c149b4478c48ee52ba834c95 /buttons.cpp | |
parent | 2e0650864058f3fb312d2527398fda8d7e97a60d (diff) | |
download | pico-watch-03c6be69d3ba5ef7070cf857063d2bcfe12d9a3b.tar pico-watch-03c6be69d3ba5ef7070cf857063d2bcfe12d9a3b.tar.gz pico-watch-03c6be69d3ba5ef7070cf857063d2bcfe12d9a3b.zip |
Wait for button press then hide popup
Diffstat (limited to 'buttons.cpp')
-rw-r--r-- | buttons.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/buttons.cpp b/buttons.cpp index 8ba7b81..cd94504 100644 --- a/buttons.cpp +++ b/buttons.cpp @@ -2,10 +2,12 @@ #include "pico/stdlib.h" #include "buttons.hpp" +#include "api.hpp" // From pico-watch.c: extern int app_btnpressed(int app_id, uint gpio); extern void app_switch(int old_appid, int new_appid); extern int current_app; +extern Api app_api; // Debounce control // See https://www.raspberrypi.org/forums/viewtopic.php?f=145&t=301522#p1812063 @@ -21,7 +23,7 @@ void gpio_interrupt_cb(uint gpio, uint32_t events) { app_switch(current_app, 0); else app_btnpressed(current_app, gpio); - + app_api.button_last_set(gpio); button_time = to_ms_since_boot(get_absolute_time()); } } |