Had to heaviiy modify these files to get code to compile with magnetometer code. This is very sloppy work from STM. Not what you would expect from a commercial product.