summaryrefslogtreecommitdiff
path: root/src/system_fsm/include/system_events.hpp
diff options
context:
space:
mode:
authorjacqueline <me@jacqueline.id.au>2023-06-30 17:05:11 +1000
committerjacqueline <me@jacqueline.id.au>2023-06-30 17:05:11 +1000
commit0347555d5b2314e1be58261ef29fa13a76c039e6 (patch)
treee38879c0dc8bbf0a58057d22b26f28c0a9b86e93 /src/system_fsm/include/system_events.hpp
parent9763cc955c4f3b2c2af54b61c2c5ad77afef9603 (diff)
downloadtangara-fw-0347555d5b2314e1be58261ef29fa13a76c039e6.tar.gz
Start on converting gpio expander interupts to fsm events
Diffstat (limited to 'src/system_fsm/include/system_events.hpp')
-rw-r--r--src/system_fsm/include/system_events.hpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/system_fsm/include/system_events.hpp b/src/system_fsm/include/system_events.hpp
index ec202c69..0903cb77 100644
--- a/src/system_fsm/include/system_events.hpp
+++ b/src/system_fsm/include/system_events.hpp
@@ -47,6 +47,19 @@ struct StorageMounted : tinyfsm::Event {
struct StorageError : tinyfsm::Event {};
+struct KeyUpChanged : tinyfsm::Event {
+ bool falling;
+};
+struct KeyDownChanged : tinyfsm::Event {
+ bool falling;
+};
+struct KeyLockChanged : tinyfsm::Event {
+ bool falling;
+};
+struct HasPhonesChanged : tinyfsm::Event {
+ bool falling;
+};
+
namespace internal {
/*
@@ -55,6 +68,12 @@ namespace internal {
*/
struct ReadyToUnmount : tinyfsm::Event {};
+/*
+ * Sent when the actual unmount operation should be performed. Always dispatched
+ * by SysState in response to StoragePrepareToUnmount.
+ */
+struct GpioInterrupt : tinyfsm::Event {};
+
} // namespace internal
} // namespace system_fsm