Wolfvak 987b820c4a beginning of better ARM11:
- moved I2C code to the ARM11 (with an ugly hack that MUST be fixed)
- reworked the PXI protocol to have lower latencies and remove any potential async support
2019-06-03 02:27:41 +02:00

30 lines
550 B
C

#include "godmode.h"
#include "power.h"
#include "timer.h"
#include "pxi.h"
#include "i2c.h"
#include "vram.h"
void main(int argc, char** argv, int entrypoint)
{
(void) argc;
(void) argv;
PXI_Reset();
PXI_DoCMD(PXI_SCREENINIT, NULL, 0);
I2C_writeReg(I2C_DEV_MCU, 0x22, 0x2A);
#ifdef SCRIPT_RUNNER
// Run the script runner
if (ScriptRunner(entrypoint) == GODMODE_EXIT_REBOOT)
#else
// Run the main program
if (GodMode(entrypoint) == GODMODE_EXIT_REBOOT)
#endif
Reboot();
PowerOff();
}