1 /* bmm050.c - bmm050 compass driver
4 * This software program is licensed subject to the GNU General Public License
5 * (GPL).Version 2,June 1991, available at http://www.fsf.org/copyleft/gpl.html
7 * (C) Copyright 2011 Bosch Sensortec GmbH
12 * Definitions for bmm050 magnetic sensor chip.
17 #include <linux/ioctl.h>
19 #define CALIBRATION_DATA_SIZE 12
22 * 0x12 (SDO connected to GND, CSB2 connected to VDDIO)
23 * 0x13 (SDO connected to VDDIO, CSB2 connected to VDDIO)
25 #define BMM050_I2C_ADDR 0x13
27 // conversion of magnetic data (for bmm050) to uT units
28 // conversion of magnetic data to uT units
29 // 32768 = 1Guass = 100 uT
30 // 100 / 32768 = 25 / 8096
32 // 360 / 65536 = 45 / 8192
36 #define CONVERT_M_DIV 4
38 #define CONVERT_O_DIV 71 //(C_PI_F32X * AXIS_RESOLUTION_FACTOR / 180)
40 #define CONVERT_G_DIV 938
42 #define CONVERT_VRV_DIV 16384
44 #endif /* __BMM050_H__ */