GodMode9/source/main.c

27 lines
538 B
C
Raw Normal View History

#include "godmode.h"
2017-06-09 01:45:00 +02:00
#include "power.h"
2017-08-22 23:23:17 -03:00
#include "pxi.h"
#include "i2c.h"
2017-10-26 20:27:02 -03:00
void main(int argc, char** argv, int entrypoint)
{
(void) argv; // unused for now
2017-08-22 23:23:17 -03:00
// Wait for ARM11
PXI_WaitRemote(PXI_READY);
PXI_DoCMD(PXI_SCREENINIT, NULL, 0);
I2C_writeReg(I2C_DEV_MCU, 0x22, 0x2A);
#ifdef AUTORUN_SCRIPT
// Run the script runner
if (ScriptRunner(argc) == GODMODE_EXIT_REBOOT)
#else
2017-07-26 21:39:30 +02:00
// Run the main program
if (GodMode(argc) == GODMODE_EXIT_REBOOT)
#endif
Reboot();
PowerOff();
}