3.2.12 STALS_ErrCode_t STALS_GetGain
STALS_ErrCode_t STALS_GetGain (void *pHandle, enum STALS_Channel_Id_t ChannelId, uint16_t
*pAppliedGain)
This function gets the actual gain applied in the device.
Table 23. Parameters
Parameter Description
pHandle Opaque pointer used as the id of the instance of the driver
ChannelId This id identifies the channel number. See Section 3.5.1 STALS_Channel_Id_t
pAppliedGain
Pointer in which the value of the actual gain applied in the device is returned. Value
in 8.8 fixed point unit
Table 24.
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
3.2.13 STALS_ErrCode_t STALS_SetFlickerOutputType
STALS_ErrCode_t STALS_SetFlickerOutputType (void *pHandle, enum STALS_FlickerOutputType_t
FlickerOutputType)
This function sets the gpio settings of GPIO2 and GPIO1 according to FlickerOutputType.
Note that those parameters are effectively applied when flicker is started.
Table 25. Parameters
Parameters Description
pHandle Opaque pointer used as the id of the instance of the driver
FlickerOutputType
Data output type for the flicker mode. See
Section 3.5.7 STALS_FlickerOutputType_t
Table 26. Return values
Return values Description
STALS_NO_ERROR Success
STALS_ERROR_INVALID_PARAMS At least one of the provided parameters is invalid
STALS_ERROR_WRITE Could not write any data to the device through I2C
STALS_ERROR_READ Could not read any data from the device through I2C
UM2878
STALS API definition
UM2878 - Rev 1
page 12/27