3.2.18 STALS_ErrCode_t STALS_SetControl
STALS_ErrCode_t STALS_SetControl (void *pHandle, enum STALS_Control_Id_t ControlId, uint32_t
ControlValue )
This function sets a control to the STALS driver.
Table 34. Parameters
Parameter Description
pHandle Opaque pointer used as the id of the instance of the driver
ControlId Identifier of the params. See Section 3.5.5 enum STALS_Control_Id_t
ControlValue The value of the control
The following is an example pedestal:
AC_MODE (register 0x31) Pedestal on/off
0: pedestal added to help flicker detection in very low DC conditions
1: remove pedestal feature
• To enable the pedestal : STALS_SetControl(pHandle, STALS_PEDESTAL_ENABLE,
STALS_CONTROL_ENABLE);
• To disable the pedestal : STALS_SetControl(pHandle, STALS_PEDESTAL_ENABLE,
STALS_CONTROL_DISABLE);
AC_PEDESTAL (register 0x32) pedestal_value Pedestal_value (default = 5)
• To set pedestal value to 3: STALS_SetControl(pHandle, STALS_PEDESTAL_VALUE, 3);
Table 35. Return values
Return value
Description
STALS_NO_ERROR Success
STALS_ERROR_INVALID_PARAMS At least one of the provided parameters is invalid
STALS_ERROR_FNCT_DEPRECATED ALS_AUTOGAIN_CTRL is deprecated
3.2.19 STALS_ErrCode_t STALS_GetControl
STALS_ErrCode_t STALS_GetControl (void *pHandle, enum STALS_Control_Id_t ControlId, uint32_t
*pControlValue)
This function gets a control from the STALS driver.
Table 36. Parameters
Parameter Description
pHandle Opaque pointer used as the id of the instance of the driver
ControlId Identifier of the parameters. See Section 3.5.5 STALS_Control_Id_t
pControlValue Pointer on a parameter in which the parameter value is set
Table 37. Return values
Return value Description
STALS_NO_ERROR Success
STALS_ERROR_INVALID_PARAMS At least one of the provided parameters is invalid
STALS_ERROR_FNCT_DEPRECATED ALS_AUTOGAIN_CTRL is deprecated
UM2878
STALS API definition
UM2878 - Rev 1
page 15/27