/***************************************************************************** * Copyright (C) 2016 MediaTek Inc. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. * * 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 http://www.gnu.org/licenses/gpl-2.0.html for more details. * * Accelerometer Sensor Driver * * 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 BOSCH_BARO_H #define BOSCH_BARO_H #include /* apply low pass filter on output */ /*#define CONFIG_BMP_LOWPASS*/ /*#define CONFIG_ID_TEMPERATURE*/ /*#define CONFIG_I2C_BASIC_FUNCTION*/ #define BMP_DRIVER_VERSION "V1.3" #define BMP_DEV_NAME "bmp280" #define C_MAX_FIR_LENGTH (32) #define MAX_SENSOR_NAME (32) #define BMP_DATA_NUM 1 #define BMP_PRESSURE 0 #define BMP_BUFSIZE 128 /* common definition */ #define BMP_GET_BITSLICE(regvar, bitname)\ ((regvar & bitname##__MSK) >> bitname##__POS) #define BMP_SET_BITSLICE(regvar, bitname, val)\ ((regvar & ~bitname##__MSK) | ((val<