00001
00025
00026 #define SLEEP_NONE 0
00027 #define SLEEP_IDLE 0
00028 #define SLEEP_ADCNR 2
00029 #define SLEEP_POWERDOWN 4
00030 #define SLEEP_POWERSAVE 6
00031 #define SLEEP_POWEROFF 8
00032
00033
00034 void DoShutdown(unsigned char reason);
00035 #define SHUTDOWN_REASON_UNDERVOLTAGE 1
00036 #define SHUTDOWN_REASON_CHARGE_OVERCURRENT 2
00037 #define SHUTDOWN_REASON_DISCHARGE_OVERCURRENT 3
00038 #define SHUTDOWN_REASON_OVERVOLTAGE 4
00039 #define SHUTDOWN_REASON_SHORTCIRCUIT 5
00040 #define SHUTDOWN_REASON_OVERTEMPERATURE 6
00041 #define SHUTDOWN_REASON_UNKNOWNSTATE 7
00042
00043 void ChangePowerMode(unsigned char newmode, unsigned char shutdown_reason);
00044 #define POWERMODE_POWEROFF 0
00045 #define POWERMODE_POWERSAVE 1
00046 #define POWERMODE_IDLE 2
00047 #define POWERMODE_ACTIVE 3
00048
00049
00050 #ifdef MODULE_PWRMGMT
00051
00052 unsigned char PowerMode = 0;
00053
00054 #else
00055
00056 extern unsigned char PowerMode;
00057
00058 #endif
00059