CCAux
2.20.0.0
CCAux API reference
|
Functions | |
EXTERN_C CCAUXDLL_API LIGHTSENSORHANDLE CCAUXDLL_CALLING_CONV | GetLightsensor (void) |
EXTERN_C CCAUXDLL_API void CCAUXDLL_CALLING_CONV | Lightsensor_release (LIGHTSENSORHANDLE) |
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV | Lightsensor_getIlluminance (LIGHTSENSORHANDLE, uint16_t *value) |
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_getAverageIlluminance (LIGHTSENSORHANDLE, uint16_t *value) |
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV | Lightsensor_startAverageCalc (LIGHTSENSORHANDLE, uint32_t averageWndSize, uint32_t rejectWndSize, uint32_t rejectDeltaInLux, LightSensorSamplingMode mode) |
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV | Lightsensor_stopAverageCalc (LIGHTSENSORHANDLE) |
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV | Lightsensor_getOperatingRange (LIGHTSENSORHANDLE, LightSensorOperationRange *range) |
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV | Lightsensor_setOperatingRange (LIGHTSENSORHANDLE, LightSensorOperationRange range) |
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV | Lightsensor_setActive (LIGHTSENSORHANDLE, ComponentLocation location) |
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV | Lightsensor_getActive (LIGHTSENSORHANDLE, ComponentLocation *location) |
Functions in the Lightsensor class
EXTERN_C CCAUXDLL_API LIGHTSENSORHANDLE CCAUXDLL_CALLING_CONV CrossControl::GetLightsensor | ( | void | ) |
Factory function that creates instances of the Lightsensor object.
Supported Platform(s): XL, XL5, XM, XM9, XS, XA, VC, VA, VS, V700, Yukon, V510, V710, V1000, V1200, X1200
Example Usage:
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV CrossControl::Lightsensor_getActive | ( | LIGHTSENSORHANDLE | , |
ComponentLocation * | location | ||
) |
Get active lightsensor.
Supported Platform(s): Yukon, V510, V710, V1000, V1200, X1200
location | Location of the active Lightsensor. |
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV CrossControl::Lightsensor_getAverageIlluminance | ( | LIGHTSENSORHANDLE | , |
uint16_t * | value | ||
) |
Get average illuminance (light) value from light sensor.
Supported Platform(s): XL, XL5, XM, XM9, XS, XA, VC, VA, VS, V700, Yukon, V510, V710, V1000, V1200, X1200
value | Illuminance value (Lux). |
Example Usage:
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV CrossControl::Lightsensor_getIlluminance | ( | LIGHTSENSORHANDLE | , |
uint16_t * | value | ||
) |
Get illuminance (light) value from light sensor.
Supported Platform(s): XL, XL5, XM, XM9, XS, XA, VC, VA, VS, V700, Yukon, V510, V710, V1000, V1200, X1200
value | Illuminace value (Lux). |
Example Usage:
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV CrossControl::Lightsensor_getIlluminance2 | ( | LIGHTSENSORHANDLE | , |
uint16_t * | value, | ||
uint8_t * | ch0, | ||
uint8_t * | ch1 | ||
) |
Get illuminance (light) value from light sensor. The parameters cho and ch1 are raw ADC values read from a TAOS TSL2550 lightsensor.
Supported Platform(s): XL, XL5, XM, XM9, XS, XA, VC, VA, VS, V700, Yukon, V510, V710, V1000, V1200, X1200
value | Illuminance value (Lux). |
ch0 | Channel0 value. (Not applicable on VC platform - always 0) |
ch1 | Channel1 value. (Not applicable on VC platform - always 0) |
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV CrossControl::Lightsensor_getOperatingRange | ( | LIGHTSENSORHANDLE | , |
LightSensorOperationRange * | range | ||
) |
Get operating range. The light sensor can operate in two ranges. Standard and extended range. In standard range, the range is smaller but resolution higher. See the TSL2550 data sheet for more information. On the VC platform, the ranges correspond to 1000 and 4000 lux maximum value.
Supported Platform(s): XL, XL5, XM, XM9, XS, XA, VC, VA, VS, Yukon, V510, V710, V1000, V1200, X1200
range | Operating range. RangeStandard or RangeExtended. |
EXTERN_C CCAUXDLL_API void CCAUXDLL_CALLING_CONV CrossControl::Lightsensor_release | ( | LIGHTSENSORHANDLE | ) |
Delete the Lightsensor object.
Supported Platform(s): XL, XL5, XM, XM9, XS, XA, VC, VA, VS, V700, Yukon, V510, V710, V1000, V1200, X1200
Example Usage:
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV CrossControl::Lightsensor_setActive | ( | LIGHTSENSORHANDLE | , |
ComponentLocation | location | ||
) |
Set active lightsensor.
Supported Platform(s): Yukon, V510, V710, V1000, V1200
location | Location of the Lightsensor to set Active. Max number depends from platform. |
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV CrossControl::Lightsensor_setOperatingRange | ( | LIGHTSENSORHANDLE | , |
LightSensorOperationRange | range | ||
) |
Set operating range. The light sensor can operate in two ranges. Standard and extended range. In standard range, the range is smaller but resolution higher. See the TSL2550 data sheet for more information. On the VC platform, the ranges correspond to 1000 and 4000 lux maximum value.
Supported Platform(s): XL, XL5, XM, XM9, XS, XA, VC, VA, VS, Yukon, V510, V710, V1000, V1200, X1200
range | Operating range to set. RangeStandard or RangeExtended. |
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV CrossControl::Lightsensor_startAverageCalc | ( | LIGHTSENSORHANDLE | , |
uint32_t | averageWndSize, | ||
uint32_t | rejectWndSize, | ||
uint32_t | rejectDeltaInLux, | ||
LightSensorSamplingMode | mode | ||
) |
Start average calculation. The average calculation works by calculating the average from a number of consecutive samples, the average window size. The reject window is used to discard sudden changes or single extreme values of the measurement. If the difference of the maximum value and the minimum value in the number of samples in the reject delta window is larger than the reject delta, those samples are discarded.
Supported Platform(s): XL, XL5, XM, XM9, XS, XA, VC, VA, VS, V700, Yukon, V510, V710, V1000, V1200, X1200
averageWndSize | The average window size in nr of samples. |
rejectWndSize | The reject window size in nr of samples. |
rejectDeltaInLux | The reject delta in lux. |
mode | The configured sampling mode. |
Example Usage:
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV CrossControl::Lightsensor_stopAverageCalc | ( | LIGHTSENSORHANDLE | ) |
Stop average calculation.
Supported Platform(s): XL, XL5, XM, XM9, XS, XA, VC, VA, VS, V700, Yukon, V510, V710, V1000, V1200, X1200
Example Usage: