Driver for the LSM303D accelerometer and magnetometer.
This driver does not work with other LSM303 sensors.
Documentation for the LSM303D: https://www.st.com/en/mems-and-sensors/lsm303d.html#documentation The Datasheet is DS9097.
The heading functionality was inspired by https://github.com/pololu/lsm303-arduino It could maybe be improved by using DT0058 (on the ST site), or by using AN3192