author | Arnaud Lenoir |
Thu, 10 Jun 2010 14:43:41 +0100 | |
changeset 9 | f3ff03287078 |
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 |
pm_thermalsensing_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 Thermal sensing 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 __PM_THERMALSENSING_CHIPSET_API_H__ |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
25 |
#define __PM_THERMALSENSING_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 |
|
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
28 |
// Include files |
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 |
#include <kern_priv.h> |
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 |
|
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 |
Description of the function pointer |
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 |
@note Description Callback Function which is being executed from DFC |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
37 |
|
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
38 |
@param TAny* Any type of parameter passed to the callback function |
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 (*TthermalSensorCbFn(TAny* aParam)); |
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 |
// Forward declarations |
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 |
class TthermalSensorCb; |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
45 |
class ChipsetThermalSensorHWPool; |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
46 |
class DThermalSensorHW; |
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 |
|
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
49 |
// Class declaration |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
50 |
/** |
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 |
* Thermal Sensor Callback function |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
53 |
* |
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 |
class TthermalSensorCb : public TDfc |
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 |
public : |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
59 |
/** |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
60 |
Description of TthermalSensorCb |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
61 |
This is the Thermal Sensor Callback Function |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
62 |
@param aFn Callback Function Pointer |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
63 |
@param aParam Any type of parameter passed to the callback function |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
64 |
@param aPriority Priority Assigned |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
65 |
@return KErrNone or a system wide error code to specify the effect of the method call. |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
66 |
@pre This can be called only after the ChipsetThermalSensorHWPool has been initialized |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
67 |
in the system. Preferable way to call this function is from a thread context with |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
68 |
interrupts enabled after all the kernel extensions have been initialized in the boot up. |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
69 |
*/ |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
70 |
IMPORT_C TthermalSensorCb(TthermalSensorCbFn aFn, TAny *aParam, TInt aPriority); |
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 |
Description of TthermalSensorCb |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
73 |
This is the Thermal Sensor Callback Function |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
74 |
@param aFn Callback Function Pointer |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
75 |
@param aParam Any type of parameter passed to the callback function |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
76 |
@param aPriority Priority Assigned |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
77 |
@param aQue Interrupt Handling DFC queue. The same queue is used by the HW specific interface |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
78 |
@return KErrNone or a system wide error code to specify the effect of the method call. |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
79 |
@pre This can be called only after the ChipsetThermalSensorHWPool has been initialized |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
80 |
in the system. Preferable way to call this function is from a thread context with |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
81 |
interrupts enabled after all the kernel extensions have been initialized in the boot up. |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
82 |
*/ |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
83 |
IMPORT_C TthermalSensorCb(TthermalSensorCbFn aFn, TAny *aParam, TInt aPriority, TDfcQue* aQue); |
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 |
private : |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
86 |
|
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
87 |
static void CallbackFunc( TAny *); |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
88 |
|
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
89 |
private : |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
90 |
/*** Any type of parameter passed to the callback function */ |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
91 |
TAny* iParam; |
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 |
/*** Callback Function Pointer */ |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
94 |
TthermalSensorCbFn iCallback; |
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 |
}; |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
97 |
|
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
98 |
/** |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
99 |
@brief Class acting as a container class for several sensor objects |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
100 |
|
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
101 |
This class acts as a repository using which the references to the specific thermal sensor |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
102 |
interface can be accessed. The recommendation is to implement this as a Singleton class. |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
103 |
*/ |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
104 |
class ChipsetThermalSensorHWPool |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
105 |
{ |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
106 |
// Methods |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
107 |
public : |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
108 |
enum TthermalSensorID |
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 |
/// Invalid Sensor ID to be used if system design does not have any thermal sensor. |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
111 |
EInvalidThermalSensor = 0x0, |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
112 |
/// Battery Specific Sensing |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
113 |
EBatteryThermalSensor, |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
114 |
/// DRAM Specific Sensing |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
115 |
EDRAMThermalSensor, |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
116 |
/// RF ASIC Specific Sensors |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
117 |
ERFThermalSensor, |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
118 |
/// Memory Card Specific Sensors |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
119 |
EMemoryCardThermalSensor, |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
120 |
/// SOC Specific Sensors |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
121 |
EAPEThermalSensor, |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
122 |
/// Camera Module Specific Sensors |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
123 |
ECameraThermalSensor, |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
124 |
/// GPS Module Specific Sensors |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
125 |
EGPSThermalSensor, |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
126 |
/// Display Module Specific Sensors |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
127 |
EDisplayThermalSensor, |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
128 |
/// Chipset Specific Sensors |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
129 |
EChipsetCustom1ThermalSensor, |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
130 |
EChipsetCustom2ThermalSensor, |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
131 |
EChipsetCustom3hermalSensor, |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
132 |
EChipsetCustom4ThermalSensor, |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
133 |
EChipsetCustom5ThermalSensor, |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
134 |
EChipsetCustom6ThermalSensor |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
135 |
}; |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
136 |
|
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 |
Description of GetThermalSensorHW |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
139 |
This is the method to get the pointer of the DThermalSensorHW object from the |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
140 |
ChipsetThermalSensorHWPool. |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
141 |
@param aId input parameter specifying the ID of the thermal sensor whose pointer we are |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
142 |
trying to reference. |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
143 |
@param aSensor output parameter giving the pointer of the thermal sensor object representing |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
144 |
the ID requested or NULL if the thermal sensor do not exist in the system. |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
145 |
@return KErrNone or a system wide error code to specify the effect of the method call. |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
146 |
@pre This can be called only after the ChipsetThermalSensorHWPool has been initialized |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
147 |
in the system. Preferable way to call this function is from a thread context with |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
148 |
interrupts enabled after all the kernel extensions have been initialized in the boot up. |
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 |
IMPORT_C static TInt GetThermalSensorHW(TthermalSensorID aId, DThermalSensorHW** aSensor); |
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 |
/** |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
154 |
Description of GetNumberOfSensors |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
155 |
This is the method to get the number of sensors supported by the chipset adaptation software. |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
156 |
In addition it should give the highest and lowest identifier for the sensors to optimize the search |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
157 |
possibilities for the client software. |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
158 |
@param aHighestID output parameter that gives the ID of the thermal sensor with the most positive value |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
159 |
or 0 if no sensor is present. |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
160 |
@param aLowestID output parameter that gives the ID of the thermal sensor with the least positive value |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
161 |
or 0 if no sensor is present. |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
162 |
@return number of sensors in the system (+ve value or 0) or |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
163 |
a system wide error code to specify the effect of the method call. |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
164 |
@pre This can be called only after the ChipsetThermalSensorHWPool has been initialized |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
165 |
in the system. |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
166 |
*/ |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
167 |
IMPORT_C static TInt GetNumberOfSensors(TthermalSensorID& aHighestID, TthermalSensorID& aLowestID); |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
168 |
|
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 |
|
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 |
* |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
174 |
* This class represents a generic thermal sensor that would be found in the HW. |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
175 |
* The pointer of the thermal sensor object would be passed to the client who can then call the virtual methods that are exposed by this interface. |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
176 |
* |
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 |
NONSHARABLE_CLASS( DThermalSensorHW ) : public DBase |
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 |
public : |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
181 |
/** |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
182 |
Constructor |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
183 |
Defined as a private to prevent clients to create own instances |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
184 |
from this class |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
185 |
@since ver 1 |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
186 |
@param none |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
187 |
@return none |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
188 |
@panic none |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
189 |
*/ |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
190 |
DThermalSensorHW(); |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
191 |
|
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 |
Virtual Destructor |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
194 |
@since ver 1 |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
195 |
@param none |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
196 |
@return none |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
197 |
@panic none |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
198 |
*/ |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
199 |
virtual ~DThermalSensorHW(); |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
200 |
|
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
201 |
/** |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
202 |
Description of InitHw |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
203 |
This is the method by which the HW is initialized in the system. |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
204 |
The implementation has to take care that the HW is initialized only once even though this method can be called multiple times. |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
205 |
The main motivation for this method is that the client becomes sure about the functional state of the HW after it calls this method. |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
206 |
There are several scenarios possible when the interface is called. For example, |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
207 |
• If the HW cannot be initialized then the implementation should return KErrNotReady or KErrNotSupported depending on the scenario. |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
208 |
• If the HW can be initialized then the call would do the necessary initializations and reply with KErrNone. |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
209 |
• If the HW is already initialized, then the call should return immediately without changing the HW state and return value should also be KErrNone. |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
210 |
@since ver 1 |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
211 |
@param none |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
212 |
@return KErrNone if success |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
213 |
otherwise system wide error code to let the client know about the status of the HW |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
214 |
@panic none |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
215 |
@ pre This can be called at any time after the kernel extensions have been loaded. |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
216 |
The preferable way to call this function is from a thread context with interrupts enabled. |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
217 |
*/ |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
218 |
virtual TInt InitHw() = 0; |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
219 |
|
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
220 |
/** |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
221 |
Description of SetupAlert |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
222 |
This is the method to set up a callback mechanism when temperature moves outside the range |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
223 |
[alerts should occur when temperature is higher than high temperature limit (aTmpHigh) and lower than the low temperature limit (aTmpHigh – aTmpDiff)] |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
224 |
presented in the arguments of this method. Only one client is permitted to call this API because this controls the functional behavior of the thermal sensor. |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
225 |
If the boundary condition is already set and another client calls this method the call would not have any functional effect and the callback would not be registered. |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
226 |
@since ver 1 |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
227 |
@param aTmpHigh The higher boundary of the temperature range in Kelvin. |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
228 |
The callback specified would be triggered if the temperature of the sensor becomes greater than this level |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
229 |
@param aTmpDiff difference between THIGH and TLOW |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
230 |
@param aCb this is the DFC that should be queued when the temperature of the sensor moves outside the range specified by the boundaries |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
231 |
@return KErrNone if success |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
232 |
KErrAlreadyExists if the boundary values are already specified |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
233 |
otherwise system wide error code |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
234 |
@panic none |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
235 |
@pre the preferable way to call this function is from a thread context with interrupts enabled after all the kernel extensions have been initialized in the boot up. |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
236 |
*/ |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
237 |
virtual TInt SetupAlert(TInt16 aTmpHigh, TInt16 aTmpDiff,TthermalSensorCb *aCb) = 0; |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
238 |
|
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
239 |
/** |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
240 |
Description of SetupCallBack |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
241 |
This is the method to register callbacks for the current prevailing boundary conditions for a particular sensor. |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
242 |
This function is needed because only the controlling client is allowed to call the SetupAlert API, hence this API needs to be used by all other observer clients |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
243 |
@since ver 1 |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
244 |
@param aCb This is the DFC that should be queued when the temperature of the sensor moves outside the range specified by the boundaries set before in the SetAlert method. |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
245 |
@return KErrNone if success |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
246 |
otherwise system wide error code |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
247 |
@panic none |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
248 |
@pre The preferable way to call this function is from a thread context with interrupts enabled after all the kernel extensions have been initialized in the boot up. |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
249 |
*/ |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
250 |
virtual TInt SetupCallBack(TthermalSensorCb *aCb) = 0; |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
251 |
|
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
252 |
/** |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
253 |
Description of StopAlert |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
254 |
This is the method to cancel callbacks or the entire alert mechanism for a particular sensor. |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
255 |
@since ver 1 |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
256 |
@param stopAll If this true then the Alert mechanism is stopped altogether and the sensing HW is disabled until the next InitHW is called. |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
257 |
It is recommended that only the client who has called SetupAlert successfully before calls this method. |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
258 |
In other cases only the callback function is removed. If the callback function was the one used in the SetupAlert call before |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
259 |
then the Alert mechanism is disabled also before the next SetupAlert is called. |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
260 |
@param aCb This is the DFC that should be removed from the list of callbacks. |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
261 |
@return KErrNone if success |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
262 |
otherwise system wide error code |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
263 |
@panic none |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
264 |
@pre This can only be called after SetupAlert API or SetupCallback API |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
265 |
The preferable way to call this function is from a thread context with interrupts enabled after all the kernel extensions have been initialized in the boot up. |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
266 |
*/ |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
267 |
virtual TInt StopAlert(TBool stopAll, TthermalSensorCb *aCb) = 0; |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
268 |
|
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
269 |
|
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
270 |
/** |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
271 |
Description of ReadTempData |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
272 |
This is the method to read temperature data from a particular sensor |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
273 |
@since ver 2 |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
274 |
@param tmpData stores the current temperature reading |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
275 |
@param aNewRead checks whether a new read is required for temperature |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
276 |
@return KErrNone if success |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
277 |
otherwise system wide error code |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
278 |
@panic none |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
279 |
@pre The preferable way to call this function is from a thread context with interrupts enabled after all the kernel extensions have been initialized in the boot up. |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
280 |
*/ |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
281 |
virtual TInt ReadTempData(TInt16& tmpData, TBool aNewRead) = 0; |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
282 |
|
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
283 |
/** |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
284 |
Description of PeformHWSelfTest |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
285 |
This is the method to performing self test on the underlying thermal sensor HW. This method should be self contained meaning it should be able to save the context , |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
286 |
perform the self test and then restore the context back exactly to the state before the self test. |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
287 |
@since ver 2 |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
288 |
@param none |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
289 |
@return KErrNone if success |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
290 |
otherwise system wide error code |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
291 |
@panic none |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
292 |
@pre The preferable way to call this function is from a thread context with interrupts enabled after all the kernel extensions have been initialized in the boot up. |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
293 |
*/ |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
294 |
virtual TInt PerformHWSelfTest(void) = 0; |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
295 |
}; |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
296 |
|
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
297 |
#endif // __PM_THERMALSENSING_CHIPSET_API_H__ |