Organize, alphabetize, and deprecate unneeded #includes from the barometer drivers.

This commit is contained in:
mcsauder
2019-07-08 21:32:52 -04:00
committed by Daniel Agar
parent aff13f6f64
commit d1e46737a3
20 changed files with 92 additions and 263 deletions
-32
View File
@@ -36,40 +36,8 @@
* Driver for the BMP280 barometric pressure sensor connected via I2C TODO or SPI.
*/
#include <px4_config.h>
#include <sys/types.h>
#include <stdint.h>
#include <stdbool.h>
#include <stdlib.h>
#include <semaphore.h>
#include <string.h>
#include <fcntl.h>
#include <poll.h>
#include <errno.h>
#include <stdio.h>
#include <math.h>
#include <unistd.h>
#include <px4_getopt.h>
#include <px4_log.h>
#include <nuttx/arch.h>
#include <nuttx/clock.h>
#include <arch/board/board.h>
#include <board_config.h>
#include "bmp280.h"
#include <lib/cdev/CDev.hpp>
#include <drivers/drv_baro.h>
#include <drivers/drv_hrt.h>
#include <drivers/device/ringbuffer.h>
#include <perf/perf_counter.h>
#include <systemlib/err.h>
#include <px4_work_queue/ScheduledWorkItem.hpp>
enum BMP280_BUS {
BMP280_BUS_ALL = 0,
BMP280_BUS_I2C_INTERNAL,
+17
View File
@@ -38,6 +38,23 @@
*/
#pragma once
#include <math.h>
#include <string.h>
#include <drivers/drv_baro.h>
#include <drivers/drv_hrt.h>
#include <drivers/device/i2c.h>
#include <drivers/device/ringbuffer.h>
#include <drivers/device/spi.h>
#include <lib/cdev/CDev.hpp>
#include <perf/perf_counter.h>
#include <px4_config.h>
#include <px4_getopt.h>
#include <px4_work_queue/ScheduledWorkItem.hpp>
#include "board_config.h"
#define BMP280_ADDR_CAL 0x88 /* address of 12x 2 bytes calibration data */
#define BMP280_ADDR_DATA 0xF7 /* address of 2x 3 bytes p-t data */
@@ -37,12 +37,8 @@
* SPI interface for BMP280
*/
#include <px4_config.h>
#include "bmp280.h"
#include <drivers/device/i2c.h>
#include "board_config.h"
#if defined(PX4_I2C_OBDEV_BMP280) || defined(PX4_I2C_EXT_OBDEV_BMP280)
@@ -37,12 +37,8 @@
* SPI interface for BMP280
*/
#include <px4_config.h>
#include "bmp280.h"
#include <drivers/device/spi.h>
#include "board_config.h"
/* SPI protocol address bits */
#define DIR_READ (1<<7) //for set