3 Bare driver basic functions
3.1 Power modes
The device supports the following three different power modes:
• OFF: State of the device when the device is not powered
• IDLE: This is the state of the device when not measuring the ambient light events and not detecting flicker.
On this device Idle and stopped are the same states. Powering on the device and calling the STALS_init
function sets the device in IDLE mode.
• STARTED: The device is running light count events and/or flicker detection. Power consumption can be
reduced by setting an intermeasurement period with the STALS_SetInterMeasurementTime function for the
light count measurement
Figure 5. Power modes
3.2 STALS API definition
3.2.1 STALS_ErrCode_t STALS_GetVersion
STALS_ErrCode_t STALS_GetVersion (uint32_t *pVersion, uint32_t *pRevision)
This function provides the driver version of the VD6283.
Table 1. Parameters
Parameter Description
pVersion Pointer on a value that contains the version of the driver once this function is called
pRevision Pointer on a value that contains the revision of the driver once this function is called
Note: The MAJOR number of version sits in the upper 16 bits of *pVersion. The MINOR number of version sits in the
lower 16 bits of *pVersion. The *pRevision value contains the revision of the driver.
Table 2. 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
UM2878
Bare driver basic functions
UM2878 - Rev 1
page 6/27