GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — InfiniTime/src/buttonhandler/ButtonHandler.h at develop · CoderCharmander/InfiniTime Expand file tree/ Copy pathButtonHandler.hMore file actions 24 lines (21 loc) · 620 Bytes / Copy pathButtonHandler.hFile metadata and controls24 lines (21 loc) · 620 Bytes 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 #pragma once #include "buttonhandler/ButtonActions.h" #include "systemtask/SystemTask.h" #include <FreeRTOS.h> #include <timers.h> namespace Pinetime { namespace Controllers { class ButtonHandler { public: enum class Events : uint8_t { Press, Release, Timer }; void Init(Pinetime::System::SystemTask* systemTask); ButtonActions HandleEvent(Events event); private: enum class States : uint8_t { Idle, Pressed, Holding, LongHeld }; TickType_t releaseTime = 0; TimerHandle_t buttonTimer; bool buttonPressed = false; States state = States::Idle; }; } } |
| You are visitor 01402520 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |