28 #ifndef _NANO_ENGINE_CORE_H_ 29 #define _NANO_ENGINE_CORE_H_ 41 #define ENGINE_DEFAULT_FPS (15) 55 BUTTON_NONE = 0B00000000,
56 BUTTON_DOWN = 0B00000001,
57 BUTTON_LEFT = 0B00000010,
58 BUTTON_RIGHT = 0B00000100,
59 BUTTON_UP = 0B00001000,
60 BUTTON_A = 0B00010000,
61 BUTTON_B = 0B00100000,
62 BUTTON_C = 0B01000000,
63 BUTTON_CENTER = 0B10000000,
84 static bool pressed(uint8_t buttons);
100 static bool clicked(uint8_t buttons);
142 static void connectKY40encoder(uint8_t pina_clk, uint8_t pinb_dt, int8_t pinc_sw = -1);
180 static uint8_t s_zkeypadPin;
181 static const uint8_t *s_gpioKeypadPins;
182 static uint8_t s_ky40_clk;
183 static uint8_t s_ky40_dt;
184 static uint8_t s_ky40_sw;
185 static uint8_t zkeypadButtons();
186 static uint8_t arduboyButtons();
187 static uint8_t gpioButtons();
188 #ifndef SDL_EMULATION 189 static uint8_t wioButtons();
191 static uint8_t ky40Buttons();
217 void setFrameRate(uint8_t fps);
258 uint8_t m_cpuLoad = 0;
260 uint32_t m_lastFrameTs = 0;
295 void notify(
const char *str);
300 template <
class C,
class D>
void displayBuffer() __attribute__((noinline))
refreshes content on oled display. Refreshes content on oled display. Call it, if you want to update ...
void display()
refreshes content on oled display. Refreshes content on oled display. Call it, if you want to update ...
void loopCallback(TLoopCallback callback)
uint16_t m_frameDurationMs
void displayPopup(const char *msg)
prints popup message over display content prints popup message over display content ...
uint32_t lcd_millis(void)
void notify(const char *str)
shows notification to a user for 1 seconds Shows notification to a user for 1 seconds ...
#define ENGINE_DEFAULT_FPS
uint8_t(* TNanoEngineGetButtons)(void)
void(* TLoopCallback)(void)
void lcd_delay(unsigned long ms)