sys/power.h

#include <sys/power.h>

Power control hardware registers are not directly accessible. However, this header provides access to OS routines that perform control functions.

API Documentation

CE power control functions define file (APD/on/off/battery/charging)

Authors

Matt “MateoConLechuga” Waltz

Jacob “jacobly” Young

Defines

os_ApdFlags
os_ApdSubTimer
os_ApdTimer
os_BatteryStatus

Functions

void os_DisableAPD(void)

Routine to turn off APD.

void os_EnableAPD(void)

Routine to turn on APD.

void boot_TurnOn(void)

Turns on the calculator.

void boot_TurnOff(void)

Turns off the calculator (probably not a good idea to use, is likely to leak memory)

void boot_Set6MHzMode(void)

Runs the calulator at 6 MHz.

void boot_Set48MHzMode(void)

Runs the calulator at 48 MHz.

void boot_Set6MHzModeI(void)

Runs the calulator at 6 MHz (saves interrupt status)

void boot_Set48MHzModeI(void)

Runs the calulator at 48 MHz (saves interrupt status)

uint8_t boot_GetBatteryStatus(void)
Returns

Current battery status

uint8_t boot_BatteryCharging(void)
Returns

A non-zero value if the battery is charging.