/* BOSCH GYROSCOPE Sensor Driver Header File * * This software is licensed under the terms of the GNU General Public * License version 2, as published by the Free Software Foundation, and * may be copied, distributed, and modified under those terms. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * */ #ifndef BMG160_H #define BMG160_H #include /************************************************************* | sensor | chip id | bit number | 7-bit i2c address | -------------------------------------------------------------| | bmg160 | 0x0F | 16 |0x68(SDO:low),0x69(SDO:high)| *************************************************************/ /* * configuration */ #define BMG_DRIVER_VERSION "V1.4" /* apply low pass filter on output */ /* #define CONFIG_BMG_LOWPASS */ #define SW_CALIBRATION #define BMG_AXIS_X 0 #define BMG_AXIS_Y 1 #define BMG_AXIS_Z 2 #define BMG_AXES_NUM 3 #define BMG_DATA_LEN 6 #define BMG_DEV_NAME "bmg160" #define C_MAX_FIR_LENGTH (32) #define MAX_SENSOR_NAME (32) #define I2C_BUFFER_SIZE (256) /* common definition */ #define BMG_GET_BITSLICE(regvar, bitname)\ ((regvar & bitname##__MSK) >> bitname##__POS) #define BMG_SET_BITSLICE(regvar, bitname, val)\ ((regvar & ~bitname##__MSK) | ((val<