blob: 9b7e41084ebdc88e486317e6459bfcab18bbb9de [file] [log] [blame]
lh9ed821d2023-04-07 01:36:19 -07001/*********************************************************************
2 Copyright 2007 by ZTE Corporation.
3 *
4 * FileName:: hal_pmmanager.c
5 * File Mark:
6* Description: This file contains the hardware interface for rtc driver
7* Others:
8* Version: v0.5
9* Author: zhangyingjun
10* Date: 2009-02-23
11
12* History 1:
13* Date:
14* Version:
15* Author:
16* Modification:
17* History 2:
18**********************************************************************/
19
20/**************************************************************************
21 * Include files *
22 **************************************************************************/
23
24#ifndef _HAL_POWERON_DEF_H
25#define _HAL_POWERON_DEF_H
26
27#define OS_FLASH_KPD_POWERON_FLAG 0x163FFFFC
28#define OS_FLASH_ALARM_POWERON_FLAG 0x163FFFFD
29#define OS_FLASH_CHARGER_POWERON_FLAG 0x163FFFFE
30#define OS_FLASH_SOFTRESET_FLAG 0x163FFFFF /*use check softreset power on */
31
32#define DPRAM_TRACE_LOADING_FLAG 0x40000000 + 0x1400
33#define TRACE_LOADING_FLAG_VALUE 0xAABB
34
35#define SOFTRESET_POWRON_FLAG_VALUE 0xAA
36#define KPD_POWER_FLAG_VALUE 0xBB
37#define ALARM_POWER_FLAG_VALUE 0xCC
38#define CHARGER_POWER_FLAG_VALUE 0xDD
39typedef enum
40{
41 POWER_ON_STATE_NORMAL = 0,
42 POWER_ON_STATE_CLOCK = 1,
43 POWER_ON_STATE_CHARGING = 2,
44 POWER_ON_STATE_SOFTRESET = 3,
45 POWER_ON_STATE_INVALID = 4,
46 POWER_ON_STATE_INIT = 5
47}T_POWER_ON_State;
48
49typedef enum
50{
51 POWER_ON_EVENT_NORMAL = 0,
52 POWER_ON_EVENT_CLOCK = 1,
53 POWER_ON_EVENT_CHARGING = 2,
54 POWER_ON_EVENT_SOFTRESET =3,
55 POWER_ON_EVENT_INVALID = 4,
56 POWER_ON_EVENT_INIT = 5
57}T_POWER_ON_EVENT;
58
59typedef struct
60{
61 T_POWER_ON_State normal_Power_on_CurrentState;
62 T_POWER_ON_State rtc_Power_on_CurrentState;
63 T_POWER_ON_State charger_Power_on_CurrentState;
64 T_POWER_ON_State softreset_Power_on_CurrentState;
65}
66T_POWER_ON_CURRENT_STATE;
67
68SINT32 zDrvPmmanager_Initiate(VOID);
69//T_POWER_ON_CURRENT_STATE hal_sysm_power_on_state_get(VOID);
70
71#endif