PowerManagement.h 786 Bytes
Newer Older
hu's avatar
hu committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43
#ifndef POWER_MANAGEMENT_H_
#define POWER_MANAGEMENT_H_



#include "TYW_stdint.h"

#define PowerExcuteWakeUpFlag 0x55u


typedef enum
{
    m_IGN_OFF_Init,
    m_IGN_OFF,
    m_IGN_Sleep_Init,
    m_IGN_Sleep,
    m_IGN_Wakeup,
    m_IGN_ON_Init,
    m_IGN_ON,
    m_IGN_LVP,
    m_IGN_OVP,
    m_IGN_LIMIT,
} Power_Status_t;

void Power_Management_Init ( uint8_t u8InitFlag );
void Power_Management_Service ( void );
void ClearNoInitArea(void);

Power_Status_t Power_KL30_Init ( void );
Power_Status_t Power_Wakeup_Init ( void );

void Power_IG_OFF_Init(void);
void Power_IG_ON_Init(void);
void Power_Sleep_Init(void);

Power_Status_t Power_Stay_ON(void);
Power_Status_t Power_Stay_OFF(void);
Power_Status_t Power_Stay_Protect(void);
Power_Status_t Power_Stay_Sleep( void );



#endif