Driver for an Asahi Kasei AK8975 electronic compass.
All correct at time of writing, but as always, manufacturers love to move things around on their website.
This code has been tested using an InvenSense MPU-6050 evaluation board with the MPU-6050 in bypass mode to attach the auxiliary I2C bus to the primary I2C bus.
The MPU-6050 evaluation board was attached to a SolderCore:
Although the AK8975 supports SPI mode, we have no way to test this and consequently do not offer an SPI initialization function.
|Communication||up to 400 kHz (I2C) and 3 MHz (SPI)|
|AK8975_I2C_ADDR||AK8975 8-bit I2C address selected by CAD1:0|
|ak8975_initialize_i2c||Initialize sensor on I2C bus|
|ak8975_initialize_transport||Initialize sensor on a transport|