Synopsis
CTL_STATUS_t wii_extension_controller_initialize(CTL_I2C_BUS_t *bus);
Description

wii_extension_controller_initialize initializes the extension controller on the I2C bus bus. The I2C driver must already have been initialized and the I2C clock frequency set.

Note

Experimentation reveals that the nunchuk will run from 100 kHz to about 300kHz, and not at the upper 400 kHz of high-speed I2C. This may be because of non-shielded prototyping wires used during driver development, so you may well have to experiment with a slower clock frequency; 275kHz works well.

Return Value

wii_extension_controller_initialize returns a standard status code.

Thread Safety

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