d0k3 e434c5aac8 Updated I2C routines
Thank @profi200
2017-07-10 22:46:51 +02:00

20 lines
390 B
C

#include "power.h"
#include "i2c.h"
#include "cache.h"
#include "ui.h"
void Reboot() {
ClearScreenF(true, true, COLOR_STD_BG);
flushEntireDCache();
if (I2C_writeReg(I2C_DEV_MCU, 0x20, 1 << 2))
while(true);
}
void PowerOff()
{
ClearScreenF(true, true, COLOR_STD_BG);
flushEntireDCache();
if (I2C_writeReg(I2C_DEV_MCU, 0x20, 1 << 0))
while (true);
}