#ifndef BMP280_H #define BMP280_H #include /* * BMP280 / BME280 barometer driver. * * Probes I2C1 at 0x76 then 0x77. * Returns chip_id (0x58=BMP280, 0x60=BME280) on success, negative if not found. * Requires i2c1_init() to have been called first. */ int bmp280_init(void); void bmp280_read(int32_t *pressure_pa, int16_t *temp_x10); /* Convert pressure (Pa) to altitude above sea level (cm), ISA p0=101325 Pa. */ int32_t bmp280_pressure_to_alt_cm(int32_t pressure_pa); #endif /* BMP280_H */