blob: dc9fde72fffa3bba2f86c62f75988b246e2c79ea [file] [log] [blame]
lh9ed821d2023-04-07 01:36:19 -07001/***********************************************************************
2* Copyright (C) 2001, ZTE Corporation.
3*
4* File Name: drvs_comm.h
5* File Mark:
6* Description: comm hal interface declaration.
7* Others:
8* Version: v1.0
9* Author: zhangyingjun
10* Date: 2009-05-26
11*
12* History 1:
13* Date:
14* Version:
15* Author:
16* Modification:
17
18* History 2:
19**********************************************************************/
20
21#ifndef _DRVS_COMM_H_
22#define _DRVS_COMM_H_
23
24/**************************************************************************
25 * Include files *
26 **************************************************************************/
27
28
29
30
31
32 /**************************************************************************
33 * Macro *
34 **************************************************************************/
35
36
37
38/**************************************************************************
39 * Types *
40 **************************************************************************/
41/*the diffrent reset info*/
42typedef enum
43{
44 RESET_TO_NORMAL, /*reset to idle*/
45 RESET_TO_CHARGER, /*reset to charger*/
46 RESET_TO_ALRAM, /*reset to alarm*/
47 RESET_TO_EXCEPTRESET,
48 MAX_RESET_TYPE,
49} T_ZDrvSys_RESET_TYPE;
50
51/*the power on info*/
52typedef enum
53{
54 POWER_ON_NORMAL = 0,
55 POWER_ON_FOTA,
56 POWER_ON_CHARGING,
57 POWER_ON_RTC,
58 POWER_ON_RESET,
59 POWER_ON_HDT_TEST,
60 POWER_ON_EXCEPTRESET,
61 POWER_ON_LOCALUPDATE,
62 POWER_ON_BOOST_IN,
63 POWER_ON_AMT,
64 POWER_ON_PRODUCTION,
65 POWER_ON_INVALID,
66}T_ZDrvSys_PowerOn_Type;
67
68typedef struct _HAL_COMM_OPT_
69{
70 SINT32 (*halComm_ShutDown)(VOID); /*system powerdown Device Initialize Handler*/
71 SINT32 (*halComm_Soft_Reset)(T_ZDrvSys_RESET_TYPE reset_type); /*system reset Handler*/
72 T_ZDrvSys_PowerOn_Type (*halComm_Get_PowerOnStat)(VOID);
73}HAL_COMM_OPT, *HAL_COMM_OPT_PTR;
74
75
76/**************************************************************************
77 * Global Variable *
78 **************************************************************************/
79
80
81
82/**************************************************************************
83 * Function Prototypes *
84 **************************************************************************/
85
86/*******************************************************************************
87 * Function: zDrv_ShutDown
88 * Description: shut down the mobile
89 * Parameters:
90 * Input: None
91 * Output: None
92 *
93 * Returns:
94* DRV_SUCCESS:success to init
95* DRV_ERROR:fail to init
96 * Others: None
97 ********************************************************************************/
98SINT32 zDrv_ShutDown(VOID);
99
100
101/*******************************************************************************
102 * Function: zDrv_Soft_Reset
103 * Description: reset the mobile
104 * Parameters:
105 * Input: None
106 * Output: None
107 *
108 * Returns:
109* DRV_SUCCESS:success to reset
110* DRV_ERROR:fail to shutdown
111* others: others error code. for detailed information, please refer to the header file of hal layer
112 * Others: None
113 ********************************************************************************/
114SINT32 zDrv_Soft_Reset(T_ZDrvSys_RESET_TYPE reset_type);
115
116/**************************************************************************
117* Function: halChg_SetInstance
118* Description: this function used for put semp
119* Parameters:
120* Input:
121* None
122* Outpu: None
123* Returns:
124* None
125* Others: None
126**************************************************************************/
127VOID zDrvComm_SetOperations(HAL_COMM_OPT_PTR CommObjPtr);
128
129/**************************************************************************
130* Function: zDrvComm_GetPowerOnState
131* Description: get the systerm power on reason.
132* Parameters:
133* Input:
134* None
135* Outpu: None
136* Returns:
137* T_ZDrvSys_PowerOn_Type
138* Others: None
139**************************************************************************/
140T_ZDrvSys_PowerOn_Type zDrvComm_GetPowerOnState(VOID);
141
142#endif /* HAL_COMM_H */
143/*last line of file ends with a newline*/