Synopsis
CTL_STATUS_t sca3000_initialize_i2c(CTL_ACCELEROMETER_t *self,
                                    CTL_I2C_BUS_t *bus,
                                    int addr,
                                    SCA3000_DEVICE_t variant);
Description

sca3000_initialize_i2c initializes the accelerometer interface self with methods to communicate with an SCA3000 accelerometer on the I2C bus bus with 8-bit I2C address addr. The particular SCA3000 device variant is specified by variant.

Once the accelerometer interface is initialized, you can use all standard accelerometer methods from the sensor API on the interface.

Return Value

sca3000_initialize_i2c returns a standard status code.

Thread Safety

sca3000_initialize_i2c is thread-safe if a mutex is associated with the I2C bus bus.

See Also

<ctl_sensors.h>