GodMode9/source/main.c
d0k3 6adf9d254d At least this shows something now...
... still faulty, though.
2016-02-25 16:57:10 +01:00

26 lines
361 B
C

#include "common.h"
#include "godmode.h"
#include "draw.h"
#include "fs.h"
#include "i2c.h"
void Reboot()
{
i2cWriteRegister(I2C_DEV_MCU, 0x20, 1 << 2);
while(true);
}
void PowerOff()
{
i2cWriteRegister(I2C_DEV_MCU, 0x20, 1 << 0);
while (true);
}
int main()
{
(GodMode() == GODMODE_EXIT_REBOOT) ? Reboot() : PowerOff();
return 0;
}