comparison src/condat3/com/include/pwr.h @ 18:c8bd5a927942

src/condat3: import of "condat" tree from TCS3.2, pruned
author Mychaela Falconia <falcon@freecalypso.org>
date Tue, 27 Sep 2016 21:25:36 +0000
parents
children f3f58412df01
comparison
equal deleted inserted replaced
17:6323e661f2ed 18:c8bd5a927942
1 /*
2 +-----------------------------------------------------------------------------
3 | Project : GSM (6301)
4 | Modul :
5 +-----------------------------------------------------------------------------
6 | Copyright 2002 Texas Instruments Berlin, AG
7 | All rights reserved.
8 |
9 | This file is confidential and a trade secret of Texas
10 | Instruments Berlin, AG
11 | The receipt of or possession of this file does not convey
12 | any rights to reproduce or disclose its contents or to
13 | manufacture, use, or sell anything it may describe, in
14 | whole, or in part, without the specific written consent of
15 | Texas Instruments Berlin, AG.
16 +-----------------------------------------------------------------------------
17 | Purpose : Types definitions for the power driver
18 | .
19 +-----------------------------------------------------------------------------
20 $History: Pwr.h
21 Dec 05, 2006 REF:OMAPS00106691 a0393213(R.Prabakar)
22 Description:compiler error is arising in simulation build since timer.h is not included in simulation build
23 Solution :flag off timer.h and its dependencies in gdi
24
25 Oct 30,2006 ER:OMAPS00091029 x0039928(sumanth)
26 Bootup time measurement
27
28 Apr 17, 2006 REF: ER OMAPS00075178 x0pleela
29 Description: When the charger connect to phone(i-sample), the charger driver works, but the MMI and App don't work
30 Solution: Defined macros for charging events
31
32 */
33
34 #ifndef PWR_H
35 #define PWR_H
36
37 #ifndef _SIMULATION_
38 #include "timer.h" /*OMAPS00091029 x0039928(sumanth)*/
39 #endif
40
41 /*
42 * Power signals
43 */
44 #define PWR_SIGTYPE_EXTPOWER 1
45 #define PWR_SIGTYPE_CHARGER 2
46 #define PWR_SIGTYPE_BATLEVEL 3
47
48 /*
49 * Power Status
50 */
51 #define PWR_BATTERY_ON 0 // use battery power //x0pleela 10 Apr, 2006 ER: OMAPS00075178
52 #define PWR_EXTPOWER_ON 1
53 #define PWR_CHARGER_ON 6 //x0pleela 11 Apr, 2006 changed the value from 2 to 6
54
55 //x0pleela 10 Apr, 2006 ER: OMAPS00075178
56 #define PWR_CHARGER_BEGIN 2 // charger begin
57 #define PWR_CHARGER_STOP 3 // charger end
58 #define PWR_CHARGER_PLUG 4 // charger plug
59 #define PWR_CHARGER_UNPLUG 5 // charger unplug
60
61 /*
62 * Status Type
63 */
64 typedef struct pwr_Status_Type
65 {
66 UBYTE Status;
67 UBYTE BatteryLevel;
68 UBYTE ChargeLevel;
69 } pwr_Status_Type;
70
71 /*
72 * Driver Control Block
73 */
74 typedef struct pwr_DCB_Type
75 {
76 UBYTE RangeMin;
77 UBYTE RangeMax;
78 UBYTE Steps;
79 } pwr_DCB_Type;
80
81 /*OMAPS00091029 x0039928(sumanth)*/
82 #ifndef _SIMULATION_
83 typedef enum BootTimeEvent
84 {
85 EPreBoot=0,
86 EAppInit,
87 EModemBoot,
88 ENetworkSync
89 } BootTimeEvent;
90 #endif
91
92 #if defined (NEW_FRAME)
93 /*
94 * to achieve backward compatibility with older definitions
95 */
96 #define drv_SignalCB_Type T_DRV_CB_FUNC
97 #define drv_SignalID_Type T_DRV_SIGNAL
98 #define T_VSI_THANDLE USHORT
99 #endif
100 /*
101 * Prototypes
102 */
103 EXTERN UBYTE pwr_Init (drv_SignalCB_Type in_SignalCBPtr);
104 EXTERN void pwr_Exit (void);
105 EXTERN UBYTE pwr_SetSignal (drv_SignalID_Type * in_SignalIDPtr);
106 EXTERN UBYTE pwr_ResetSignal (drv_SignalID_Type * in_SignalIDPtr);
107 EXTERN UBYTE pwr_SetConfig (pwr_DCB_Type * in_DCBPtr);
108 EXTERN UBYTE pwr_GetConfig (pwr_DCB_Type * out_DCBPtr);
109 EXTERN UBYTE pwr_GetStatus (pwr_Status_Type * out_StatusPtr);
110
111 EXTERN UBYTE pwr_PowerOffMobile (void);
112 #ifndef _SIMULATION_
113 EXTERN void Bsp_get_boot_time(unsigned int * boot_time); /*OMAPS00091029 x0039928(sumanth)*/
114 void boot_time_snapshot(BootTimeEvent event);
115 #endif
116 #endif