Wolfvak bf45ee3900 - added new SPI and CODEC drivers ported from linux, thanks to xerpi
- circle pad simulates dpad keys (up, right, down, left)
- raw touchscreen data is provided but currently unused
- added a simple shared memory region thing
- fixed the 10ms delay to be _after_ the backlights are turned on, thanks to profi again

as always, other stuff I probably forgot about
2019-06-03 02:27:42 +02:00

36 lines
727 B
C

#include "godmode.h"
#include "power.h"
#include "timer.h"
#include "pxi.h"
#include "i2c.h"
#include "arm.h"
#include "shmem.h"
void main(int argc, char** argv, int entrypoint)
{
(void) argc;
(void) argv;
PXI_Reset();
// Don't even try to send any messages until the
// ARM11 says it's ready
PXI_Barrier(ARM11_READY_BARRIER);
// A pointer to the shared memory region is
// stored in the thread ID register in the ARM9
ARM_InitSHMEM();
#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();
}