
3.2.4 STALS_ErrCode_t STALS_GetChannelColor
STALS_ErrCode_t STALS_GetChannelColor (void *pHandle, enum STALS_Channel_Id_t ChannelId, enum
STALS_Color_Id_t *pColor)
This function returns the color filter of the provided channel identifier.
Table 7. Parameters
Parameters Description
pHandle Opaque pointer used as the id of the instance of the driver
ChannelId See Section 3.5.1 Channel Id. Permitted values are 0 up to
STALS_ALS_MAX_CHANNELS - 1
pColor Pointer on a value in which the color of the channel is returned
Table 8. Return values
Return values Description
STALS_NO_ERROR Success
STALS_ERROR_INVALID_PARAMS At least one of the provided parameters to the function is invalid
3.2.5 STALS_ErrCode_t STALS_SetExposureTime
STALS_ErrCode_t STALS_SetExposureTime (void *pHandle, uint32_t ExpoTimeInUs, uint32_t
*pAppliedExpoTimeUs)
This function sets the exposure time in the device, after having tuned to the closest value that the device can
support.
Note that a fixed readout period of ~6 ms takes place just after exposure time. This is needed by the device to set
the event count values in the registers. It also returns the actual applied value in the device.
For VD6283 possible values are multiples of 1.6 ms with a range of 1.6 ms to 1.6 s.
Note: Exposure time is irrelevant for flicker detection.
Table 9. Parameters
Parameter Description
pHandle Opaque pointer used as the id of the instance of the driver
ExpoTimeInUs Exposure time in microseconds
pAppliedExpoTimeUs Pointer on in which the value of the actual exposure time is returned
Table 10. Return values
Return value Description
STALS_NO_ERROR Success
STALS_ERROR_INVALID_PARAMS At least one of the provided parameters to the function is invalid
STALS_ERROR_ALREADY_STARTED Exposure can not be set when the device is running
STALS_ERROR_WRITE Could not write any data in the device through I2C
UM2878
STALS API definition
UM2878 - Rev 1 page 8/27