![]() |
CCAux
2.17.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) |
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, XM, XM9, XS, XA, VC, VA, VS
Example Usage:
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, XM, XM9, XS, XA, VC, VA, VS
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, XM, XM9, XS, XA, VC, VA, VS
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, XM, XM9, XS, XA, VC, VA, VS
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, XM, XM9, XS, XA, VC, VA, VS
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, XM, XM9, XS, XA, VC, VA, VS
Example Usage:
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, XM, XM9, XS, XA, VC, VA, VS
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, XM, XM9, XS, XA, VC, VA, VS
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, XM, XM9, XS, XA, VC, VA, VS
Example Usage: