author | arunabha |
Wed, 16 Dec 2009 17:45:00 +0000 | |
changeset 6 | 760f846bbee9 |
parent 0 | bb4b476bbb96 |
permissions | -rw-r--r-- |
0
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
1 |
/* |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
2 |
em_chipset_api.h |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
3 |
|
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
4 |
Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
5 |
All rights reserved. |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
6 |
|
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
7 |
This program and the accompanying materials are made available |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
8 |
under the terms of the Eclipse Public License v1.0 which accompanies |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
9 |
this distribution, and is available at |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
10 |
http://www.eclipse.org/legal/epl-v10.html |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
11 |
|
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
12 |
Initial Contributors: |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
13 |
Nokia Corporation - initial contribution. |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
14 |
|
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
15 |
Contributors: |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
16 |
*/ |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
17 |
|
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
18 |
/** @file |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
19 |
@brief Energy management chipset API |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
20 |
|
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
21 |
@publishedDeviceAbstraction |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
22 |
*/ |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
23 |
|
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
24 |
#ifndef EM_CHIPSET_API_H |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
25 |
#define EM_CHIPSET_API_H |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
26 |
|
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
27 |
#include <kernel.h> |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
28 |
#include <platform.h> |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
29 |
|
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
30 |
/* --------------------------------------------------------------------------- |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
31 |
* |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
32 |
* TYPES |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
33 |
* |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
34 |
*/ |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
35 |
|
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
36 |
/** |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
37 |
* Type definition for the call-back function used writing to |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
38 |
* asynchronous em callback. Callback is executed in the EM chipset's context. |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
39 |
*/ |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
40 |
typedef void (*HAL_EM_CALLBACK)(TUint event, TInt p1, TAny* p2); |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
41 |
|
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
42 |
/* --------------------------------------------------------------------------- |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
43 |
* |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
44 |
* FUNCTIONAL PROTOTYPES AND MACROS |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
45 |
* |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
46 |
*/ |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
47 |
|
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
48 |
class TEmHal |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
49 |
{ |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
50 |
// Class declaration |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
51 |
|
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
52 |
/** |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
53 |
Implements EmHal chipset |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
54 |
*/ |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
55 |
public: |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
56 |
|
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
57 |
/* --------------------------------------------------------------------------- |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
58 |
* |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
59 |
* CONSTANTS |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
60 |
* |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
61 |
*/ |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
62 |
|
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
63 |
enum THalEmChaEvtType |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
64 |
{ |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
65 |
EHalEMChaChargeStarted = 1, |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
66 |
EHalEmChaChargeStopped, |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
67 |
EHalEamChaChargeReady, |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
68 |
EHalEamChaChargeChargerType, |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
69 |
EHalEamChaChargeFull, |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
70 |
EHalEamChaChargeError |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
71 |
}; |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
72 |
|
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
73 |
enum THalEmChaChargerType |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
74 |
{ |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
75 |
EHalEmChaChargerNone = 1, |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
76 |
EHalEmChaChargerSpecial, |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
77 |
EHalEmChaChargerDynamo |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
78 |
}; |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
79 |
|
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
80 |
enum THalEmChaSource |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
81 |
{ |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
82 |
EHalEmChaSourceDynamo = 1, |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
83 |
EHalEmChaSourceUsb |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
84 |
}; |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
85 |
|
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
86 |
enum THalEmIbatEvtType |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
87 |
{ |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
88 |
EHalEmChaIbatStarted = 1, |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
89 |
EHalEmChaIbatStopped, |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
90 |
EHalEmChaIbatSampling, |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
91 |
EHalEmChaIbatError |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
92 |
}; |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
93 |
|
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
94 |
enum THalEmVbatEvtType |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
95 |
{ |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
96 |
EHalEmVbatTxOn = 1, |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
97 |
EHalEmVbatTxOff, |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
98 |
EHalEmVbatChOn, |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
99 |
EHalEmVbatChOff, |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
100 |
EHalEmVbatError |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
101 |
}; |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
102 |
|
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
103 |
enum THalEmBsiEvtType |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
104 |
{ |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
105 |
EHalEmBsiFloating = 1 |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
106 |
}; |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
107 |
|
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
108 |
enum THalEmDbiEvtType |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
109 |
{ |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
110 |
EHalEmDbiAuthenticationOk = 1, |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
111 |
EHalEmDbiAuthenticationFailed, |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
112 |
EHalEmDbiReadReady, |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
113 |
EHalEmDbiReadError, |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
114 |
EHalEmDbiWriteReady, |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
115 |
EHalEmDbiWriteError |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
116 |
}; |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
117 |
|
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
118 |
/* |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
119 |
* Constructor: |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
120 |
*/ |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
121 |
|
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
122 |
TEmHal(); |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
123 |
|
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
124 |
/* |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
125 |
* Extension entrypoint |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
126 |
*/ |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
127 |
|
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
128 |
IMPORT_C static TEmHal* hal_em_entry_point(); |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
129 |
|
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
130 |
/* |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
131 |
* INIT (setup): |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
132 |
*/ |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
133 |
|
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
134 |
virtual void hal_em_init(HAL_EM_CALLBACK cha_handler, |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
135 |
HAL_EM_CALLBACK ibat_handler, HAL_EM_CALLBACK vbat_handler, |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
136 |
HAL_EM_CALLBACK bsi_handler); |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
137 |
|
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
138 |
/* |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
139 |
* CHARGING: |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
140 |
*/ |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
141 |
virtual TInt hal_em_cha_charge(TInt action); |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
142 |
virtual TInt hal_em_cha_charge_pause(TInt action); |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
143 |
virtual TInt hal_em_cha_set_target_voltage(TInt mV); |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
144 |
virtual TInt hal_em_cha_set_termination_current(TInt mA); |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
145 |
virtual TInt hal_em_cha_set_in_current(TInt mA); |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
146 |
virtual TInt hal_em_cha_set_out_current(TInt mA); |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
147 |
virtual TInt hal_em_cha_set_min_vbus_volt(TInt mv); |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
148 |
virtual TInt hal_em_cha_set_charging_source(THalEmChaSource source); |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
149 |
|
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
150 |
/* |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
151 |
* IBAT |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
152 |
*/ |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
153 |
virtual TInt hal_em_ibat_read(); |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
154 |
virtual TUint hal_em_ibat_sample_time(); |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
155 |
virtual TUint hal_em_ibat_avg_time_get(); |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
156 |
virtual TInt hal_em_ibat_avg_time_set(TUint number); |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
157 |
virtual TInt hal_em_ibat_avg_get(); |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
158 |
virtual TInt hal_em_ibat_avg_start(); |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
159 |
virtual TInt hal_em_ibat_avg_stop(); |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
160 |
virtual TInt hal_em_ibat_avg_state_get(); |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
161 |
|
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
162 |
/* |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
163 |
* VBAT |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
164 |
*/ |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
165 |
|
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
166 |
virtual TInt hal_em_vbat_initial(); |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
167 |
virtual TInt hal_em_vbat_read(TUint *value); |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
168 |
virtual TInt hal_em_vbat_sync(TInt action); |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
169 |
|
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
170 |
/* |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
171 |
* BTEMP |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
172 |
*/ |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
173 |
virtual TInt hal_em_btemp_read(TUint *value); |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
174 |
|
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
175 |
/* |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
176 |
* BSI |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
177 |
*/ |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
178 |
virtual TInt hal_em_bsi_read(TUint *value); |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
179 |
|
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
180 |
/* WATCHDOG */ |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
181 |
virtual void hal_em_watchdog(); |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
182 |
|
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
183 |
/* DBI */ |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
184 |
|
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
185 |
virtual TInt hal_em_dbi_init(HAL_EM_CALLBACK dbi_handler); |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
186 |
virtual TInt hal_em_dbi_authenticate(TUint8 *challenge, |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
187 |
TUint8 challengelength, TUint8 *response, TUint8 responselength); |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
188 |
virtual TInt |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
189 |
hal_em_dbi_read(TUint address, TUint length, TUint8* readbuf); |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
190 |
virtual TInt hal_em_dbi_write(TUint address, TUint length, |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
191 |
TUint8* writebuf); |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
192 |
}; |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
193 |
|
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
194 |
#endif /* EM_CHIPSET_API_H */ |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
195 |
/* End of Include File */ |