mirror of
https://github.com/d0k3/GodMode9.git
synced 2025-06-26 13:42:47 +00:00
- 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
30 lines
550 B
C
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();
|
|
}
|