CCAux  2.17.0.0
CCAux API reference
Lightsensor.h
Go to the documentation of this file.
1 /************************************************
2 *
3 * CROSSCONTROL AUX API
4 *
5 * Lightsensor.h
6 *
7 * Version 2.17.0.0", 2019-10-22
8 *
9 * (c) CrossControl 2010-2019
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 
64  EXTERN_C
65  CCAUXDLL_API
67  CCAUXDLL_CALLING_CONV
68  GetLightsensor(void);
69 
80  EXTERN_C
81  CCAUXDLL_API
82  void
83  CCAUXDLL_CALLING_CONV
85 
98  EXTERN_C
99  CCAUXDLL_API
100  eErr
101  CCAUXDLL_CALLING_CONV
103 
116  EXTERN_C
117  CCAUXDLL_API
118  eErr
119  CCAUXDLL_CALLING_CONV
121 
134  EXTERN_C
135  CCAUXDLL_API
136  eErr
137  CCAUXDLL_CALLING_CONV
139 
158  EXTERN_C
159  CCAUXDLL_API
160  eErr
161  CCAUXDLL_CALLING_CONV
163  uint32_t averageWndSize,
164  uint32_t rejectWndSize,
165  uint32_t rejectDeltaInLux,
167 
178  EXTERN_C
179  CCAUXDLL_API
180  eErr
181  CCAUXDLL_CALLING_CONV
183 
195  EXTERN_C
196  CCAUXDLL_API
197  eErr
198  CCAUXDLL_CALLING_CONV
200 
212  EXTERN_C
213  CCAUXDLL_API
214  eErr
215  CCAUXDLL_CALLING_CONV
217 
219 #ifdef __cplusplus
220 } /* namespace CrossControl */
221 #endif
222 
223 #endif /* CC_LIGHTSENSOR_H */
224 
eErr
Definition: CCAuxTypes.h:159
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV Lightsensor_getIlluminance(LIGHTSENSORHANDLE, uint16_t *value)
LightSensorSamplingMode
Definition: CCAuxTypes.h:139
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV Lightsensor_getIlluminance2(LIGHTSENSORHANDLE, uint16_t *value, uint8_t *ch0, uint8_t *ch1)
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV Lightsensor_setOperatingRange(LIGHTSENSORHANDLE, LightSensorOperationRange range)
Definition: About.h:30
LightSensorOperationRange
Definition: CCAuxTypes.h:132
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV Lightsensor_getOperatingRange(LIGHTSENSORHANDLE, LightSensorOperationRange *range)
unsigned short uint16_t
Definition: CCAuxTypes.h:48
unsigned int uint32_t
Definition: CCAuxTypes.h:49
unsigned char uint8_t
Definition: CCAuxTypes.h:47
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV Lightsensor_stopAverageCalc(LIGHTSENSORHANDLE)
EXTERN_C CCAUXDLL_API LIGHTSENSORHANDLE CCAUXDLL_CALLING_CONV GetLightsensor(void)
void * LIGHTSENSORHANDLE
Definition: Lightsensor.h:43
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV Lightsensor_getAverageIlluminance(LIGHTSENSORHANDLE, uint16_t *value)
EXTERN_C CCAUXDLL_API void CCAUXDLL_CALLING_CONV Lightsensor_release(LIGHTSENSORHANDLE)
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV Lightsensor_startAverageCalc(LIGHTSENSORHANDLE, uint32_t averageWndSize, uint32_t rejectWndSize, uint32_t rejectDeltaInLux, LightSensorSamplingMode mode)