From 0347555d5b2314e1be58261ef29fa13a76c039e6 Mon Sep 17 00:00:00 2001 From: jacqueline Date: Fri, 30 Jun 2023 17:05:11 +1000 Subject: Start on converting gpio expander interupts to fsm events --- src/system_fsm/include/system_events.hpp | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'src/system_fsm/include/system_events.hpp') 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 -- cgit v1.2.3