diff options
Diffstat (limited to 'src/system_fsm/include')
| -rw-r--r-- | src/system_fsm/include/system_events.hpp | 19 | ||||
| -rw-r--r-- | src/system_fsm/include/system_fsm.hpp | 1 |
2 files changed, 20 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 diff --git a/src/system_fsm/include/system_fsm.hpp b/src/system_fsm/include/system_fsm.hpp index 037c0a0e..725f2f50 100644 --- a/src/system_fsm/include/system_fsm.hpp +++ b/src/system_fsm/include/system_fsm.hpp @@ -38,6 +38,7 @@ class SystemState : public tinyfsm::Fsm<SystemState> { void react(const tinyfsm::Event& ev) {} void react(const FatalError&); + void react(const internal::GpioInterrupt&); virtual void react(const DisplayReady&) {} virtual void react(const BootComplete&) {} |
