3.2.2 STALS_ErrCode_t STALS_Init
STALS_ErrCode_t STALS_Init(char *pDeviceName, void *pClient, void **pHandle )
This function initializes the STALS driver.
Table 3. Parameters
Parameter Description
pDeviceName Name of the device. Shall be VD6283
pClient
Pointer on a client specific platform specific structure, provided up to the underlying
platform adaptation layers
pHandle Pointer on an opaque pointer to be used as the id of the instance of the driver
Note: If the slave address is set to the default address of the device, then the GPIO pin does not need to be set to
low. To set a new I2C slave address, the GPIO1 pin MUST be set to low. The Init function then performs an I2C
transaction with this I2C slave address. As this transaction is the first one after the power up of the device, it will
set this new slave address and all further I2C address shall be performed with this I2C slave address.
A call to the STALS_Init function shall be done to set the VD6283 device in IDLE mode.
The VD6283 device needs a delay between powering it and calling STALS_Init. Please refer to the device user
manual for more details.
Table 4. Return values
Return value
Description
STALS_NO_ERROR Success
STALS_ERROR_INIT Could not initialize the driver
STALS_ERROR_INVALID_PARAMS At least one of the provided parameters to the function is invalid
STALS_ERROR_WRITE Could not write any data into the device through I2C
3.2.3 STALS_ErrCode_t STALS_Term
STALS_ErrCode_t STALS_Term (void *pHandle)
This function terminates the provided STALS driver instance.
Table 5. Parameters
Parameter Description
pHandle Opaque pointer used as the id of the instance of the driver
Table 6. 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
STALS API definition
UM2878 - Rev 1
page 7/27