M5Unified
sdl_main.cpp
Go to the documentation of this file.
1 #include <M5GFX.h>
2 #if defined ( SDL_h_ )
3 
4 void setup(void);
5 void loop(void);
6 
7 __attribute__((weak))
8 int user_func(bool* running)
9 {
10  setup();
11  do
12  {
13  loop();
14  } while (*running);
15  return 0;
16 }
17 
18 int main(int, char**)
19 {
20  // The second argument is effective for step execution with breakpoints.
21  // You can specify the time in milliseconds to perform slow execution that ensures screen updates.
22  return lgfx::Panel_sdl::main(user_func, 128);
23 }
24 
25 #endif
struct __attribute__((packed)) rtc_time_t
void loop(void)
Definition: user_code.cpp:19
void setup(void)
Definition: user_code.cpp:3