12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091 |
- //==================================================================
- //
- // Filename: mapp_pwr.h
- // Description:
- //
- //------------------------------------------------------------------
- //
- // version:
- // date: 00:08am, 09.Apr.2012, by Sirius
- // Description:
- //
- //------------------------------------------------------------------
- //==================================================================
- #ifndef _MAPP_PWR_H_
- #define _MAPP_PWR_H_
- /*------------------------------------------------------------------------------
- * I N C L U D E
- *------------------------------------------------------------------------------*/
- #include "stm32f0xx.h"
- #include "general.h"
- /*------------------------------------------------------------------------------
- * D E F I N E
- *------------------------------------------------------------------------------*/
- /*------------------------------------------------------------------------------
- * S T R U C T
- *------------------------------------------------------------------------------*/
- /* System power state */
- typedef enum {
- POWER_ON_RESET,
- POWER_ON_WAIT,
- POWER_ON_RESET9212,
- POWER_ON_CONFIG,
- POWER_ON_INIT,
- POWER_LED_IO_INIT,
- POWER_SYSTEM_RUN,
- POWER_OFF_INIT,
- POWER_OFF_SLEEP,
- NumOfPwrState
- } T_PWR_STATE;
- /* System sleep mode */
- typedef enum {
- SLEEP_INTO_NORMAL,
- SLEEP_INTO_STOP,
- SLEEP_INTO_STANDBY,
- NumOfSleepMode
- } T_SLEEP_MODE;
- /* System power off source */
- typedef enum {
- PWR_OFF_BY_ACC,
- PWR_OFF_BY_KEY,
- NumOfPwrOffSrc
- } T_PWR_OFF_SRC;
- typedef struct {
- T_PWR_STATE state; /* Power state */
- VU16 taskTmr; /* Power process timer */
- T_SLEEP_MODE sleepMode; /* Sleep mode */
- VU16 CanLostTmr; /* Sleep mode */
- BOOL sleepState; /* Sleep State */
- T_PWR_OFF_SRC offsrc;
- } T_PWR_CFG;
- extern T_PWR_CFG gtPwrCfg;
- /*------------------------------------------------------------------------------
- * E X T E R N
- *------------------------------------------------------------------------------*/
- /*------------------------------------------------------------------------------
- * P R O T O T Y P E
- *------------------------------------------------------------------------------*/
- void PwrVarInit(void);
- void PwrTask(void);
- void PwrTaskTmr(void);
- void PwrWakeupISRHandler(void);
- #endif /* _MAPP_PWR_H_ */
- /*------------------------------- E O F ----------------------------------------*/
|