Synopsis
void wii_nunchuk_accelerometer_interface(CTL_ACCELEROMETER_t *self,
                                         CTL_I2C_BUS_t *bus);
Description

wii_nunchuk_accelerometer_interface initializes the abstract accelerometer interface self to sample the nunchuk's accelerometer when requested. Once created, you can read the accelerometer using ctl_accelerometer_measure on the interface bus.

Return Value

wii_nunchuk_accelerometer_interface returns a standard status code.

Thread Safety

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