CCAux
2.8.3.0
CCAux API reference
Main Page
Namespaces
Data Structures
Files
File List
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
IncludeFiles
Lightsensor.h
Go to the documentation of this file.
1
/************************************************
2
*
3
* CROSSCONTROL AUX API
4
*
5
* Lightsensor.h
6
*
7
* Version 2.8.3.0, 2016-04-06
8
*
9
* (c) maximatecc 2013
10
*
11
12
* File description:
13
* Light Sensor access.
14
* The lightsensor suported by this implementation is a TAOS TSL2550 for
15
* platforms other than VC.
16
* On the VC platform, the sensor is the Intersil ISL29035.
17
*
18
* Note that reading the light sensor using average calculation at the
19
* same time as running the automatic backlight control is not supported.
20
* Also note that Lux values mentioned below (and in the Backlight class)
21
* are not necessarily true lux values. The values received are lower than
22
* true lux values, due to the light guide in the front panel, where some
23
* light is lost. It is still a measurement of the illuminance (in Lux).
24
*
25
* Use the function GetLightsensor() to get a handle to pass on to the other functions.
26
* Use the method Lightsensor_release(LIGHTSENSORHANDLE) to return the handle.
27
*
28
* Example Usage:
29
* @include lightsensor_example.cpp
30
*
31
************************************************/
32
#ifndef CC_LIGHTSENSOR_H
33
#define CC_LIGHTSENSOR_H
34
35
#include "
CCAuxErrors.h
"
36
#include "
CCAuxTypes.h
"
37
#include "
CCPlatform.h
"
38
39
#ifdef __cplusplus
40
namespace
CrossControl {
41
#endif
42
43
typedef
void
*
LIGHTSENSORHANDLE
;
44
58
EXTERN_C
59
CCAUXDLL_API
60
LIGHTSENSORHANDLE
61
CCAUXDLL_CALLING_CONV
62
GetLightsensor
(
void
);
63
74
EXTERN_C
75
CCAUXDLL_API
76
void
77
CCAUXDLL_CALLING_CONV
78
Lightsensor_release
(
LIGHTSENSORHANDLE
);
79
92
EXTERN_C
93
CCAUXDLL_API
94
eErr
95
CCAUXDLL_CALLING_CONV
96
Lightsensor_getIlluminance
(
LIGHTSENSORHANDLE
,
unsigned
short
* value);
97
110
EXTERN_C
111
CCAUXDLL_API
112
eErr
113
CCAUXDLL_CALLING_CONV
114
Lightsensor_getIlluminance2
(
LIGHTSENSORHANDLE
,
unsigned
short
* value,
unsigned
char
* ch0,
unsigned
char
* ch1);
115
128
EXTERN_C
129
CCAUXDLL_API
130
eErr
131
CCAUXDLL_CALLING_CONV
132
Lightsensor_getAverageIlluminance
(
LIGHTSENSORHANDLE
,
unsigned
short
* value);
133
152
EXTERN_C
153
CCAUXDLL_API
154
eErr
155
CCAUXDLL_CALLING_CONV
156
Lightsensor_startAverageCalc
(
LIGHTSENSORHANDLE
,
157
unsigned
long
averageWndSize,
158
unsigned
long
rejectWndSize,
159
unsigned
long
rejectDeltaInLux,
160
LightSensorSamplingMode
mode);
161
172
EXTERN_C
173
CCAUXDLL_API
174
eErr
175
CCAUXDLL_CALLING_CONV
176
Lightsensor_stopAverageCalc
(
LIGHTSENSORHANDLE
);
177
189
EXTERN_C
190
CCAUXDLL_API
191
eErr
192
CCAUXDLL_CALLING_CONV
193
Lightsensor_getOperatingRange
(
LIGHTSENSORHANDLE
,
LightSensorOperationRange
* range);
194
206
EXTERN_C
207
CCAUXDLL_API
208
eErr
209
CCAUXDLL_CALLING_CONV
210
Lightsensor_setOperatingRange
(
LIGHTSENSORHANDLE
,
LightSensorOperationRange
range);
211
212
#ifdef __cplusplus
213
}
/* namespace CrossControl */
214
#endif
215
216
#endif
/* CC_LIGHTSENSOR_H */
217
Generated on Wed Apr 6 2016 19:46:22 for CCAux by
1.8.3.1