38 #ifndef POKITTOBUTTONS_H 39 #define POKITTOBUTTONS_H 42 #include "Pokitto_settings.h" 43 #include "GBcompatibility.h" 47 #include "HWButtons.h" 48 #define CHWLONGPRESSTIMEOUT 100 50 #include "PokittoSimulator.h" 51 #define CHWLONGPRESSTIMEOUT 1000 60 static uint8_t buttons_state, buttons_held, buttons_released;
61 static void initButtons();
62 static void pollButtons();
63 static uint8_t leftBtn();
64 static uint8_t rightBtn();
65 static uint8_t upBtn();
66 static uint8_t downBtn();
67 static uint8_t aBtn();
68 static uint8_t bBtn();
69 static uint8_t cBtn();
70 static uint8_t leftHeld();
71 static uint8_t rightHeld();
72 static uint8_t upHeld();
73 static uint8_t downHeld();
74 static uint8_t aHeld();
75 static uint8_t bHeld();
76 static uint8_t cHeld();
78 static uint8_t leftReleased();
79 static uint8_t rightReleased();
80 static uint8_t upReleased();
81 static uint8_t downReleased();
82 static uint8_t aReleased();
83 static uint8_t bReleased();
84 static uint8_t cReleased();
89 static bool pressed(uint8_t button);
90 static bool released(uint8_t button);
91 static bool held(uint8_t button, uint8_t time);
92 static bool repeat(uint8_t button, uint8_t period);
93 static uint8_t
timeHeld(uint8_t button);
94 static uint8_t pins[NUM_BTN];
95 static uint8_t states[NUM_BTN];
96 static uint8_t heldStates[NUM_BTN];
98 static uint16_t cHWLongPress;
103 #endif // POKITTOBUTTONS_H
Definition: PokittoBacklight.h:42