#include #include #include #include "scode.h" #include "config.h" #include "gpio.h" #include "log.h" #include "fbinit.h" #include "fbprimitive.h" #include "fontengine.h" #include "time_func.h" #include "ep_init.h" #include "sysinput.h" int main(int argc, char *argv[]) { HRESULT hr; int running = 1; MSG msg; /* initialization sequence */ Time_init(); hr = Config_setup(argc, argv); if (FAILED(hr)) return EXIT_FAILURE; else if (hr != S_OK) return EXIT_SUCCESS; if (FAILED(Fb_setup())) return EXIT_FAILURE; if (FAILED(FontEng_setup())) return EXIT_FAILURE; if (FAILED(Gpio_setup())) return EXIT_FAILURE; if (FAILED(Epython_setup())) return EXIT_FAILURE; if (FAILED(Sys_enable_input())) return EXIT_FAILURE; Log(LINFO, "Pausing at startup."); sleep(2); /* wait to show off splash screen */ Fb_clear(); if (FAILED(Epython_run())) return EXIT_FAILURE; Log(LINFO, "Script returned with exit code %d", Sys_Exit_Code); return Sys_Exit_Code; }