BMP180 temperature and pressure sensor¶
Device driver interface for the BMP180 sensor.
This driver provides [S]ensor [A]ctuator [U]ber [L]ayer capabilities.
-
enum
bmp180_oversampling_mode_t
¶ - BMP180_ULTRALOWPOWER
= 0
- BMP180_STANDARD
- BMP180_HIGHRES
- BMP180_ULTRAHIGHRES
- BMP180_ULTRALOWPOWER
-
enum
@113
¶ - BMP180_OK
= 0
- everything was fine
- BMP180_ERR_NODEV
- did not detect BMP180
- BMP180_ERR_NOCAL
- error when reading calibration values
- BMP180_OK
-
int
bmp180_init
(bmp180_t * dev, const bmp180_params_t * params)¶ Initialize the given BMP180 device.
Parameters
dev: Initialized device descriptor of BMP180 device params: Initialization parameters Return values
- BMP180_OK on success
- -BMP180_ERR_NODEV if not a BMP180 at given address
- -BMP180_ERR_NOCAL if an error occured when reading calibration values
-
int16_t
bmp180_read_temperature
(const bmp180_t * dev)¶ Read temperature value from the given BMP180 device, returned in d°C.
Parameters
dev: Device descriptor of BMP180 device to read from Return values
- Temperature in d°C
-
uint32_t
bmp180_read_pressure
(const bmp180_t * dev)¶ Read pressure value from the given BMP180 device, returned in Pa.
Parameters
dev: Device descriptor of BMP180 device to read from Return values
- Pressure in Pa
-
int16_t
bmp180_altitude
(const bmp180_t * dev, uint32_t pressure_0)¶ Compute altitude, returned in m.
Parameters
dev: Device descriptor of BMP180 device to read from pressure_0: The pressure at sea level in Pa Return values
- Altitude in m
-
uint32_t
bmp180_sealevel_pressure
(const bmp180_t * dev, int16_t altitude)¶ Compute pressure at sea level, returned in Pa.
Parameters
dev: Device descriptor of BMP180 device to read from altitude: Altitude in m Return values
- Pressure at sea level in Pa
-
struct
bmp180_calibration_t
¶ Calibration struct for the BMP180 sensor.
-
int16_t
ac1
¶ ac1 coefficient
-
int16_t
ac2
¶ ac2 coefficient
-
int16_t
ac3
¶ ac3 coefficient
-
int16_t
b1
¶ b1 coefficient
-
int16_t
b2
¶ b2 coefficient
-
int16_t
mb
¶ mb coefficient
-
int16_t
mc
¶ mc coefficient
-
int16_t
md
¶ md coefficient
-
uint16_t
ac4
¶ ac4 coefficient
-
uint16_t
ac5
¶ ac5 coefficient
-
uint16_t
ac6
¶ ac6 coefficient
-
int16_t
-
struct
bmp180_params_t
¶ Device initialization parameters.
-
i2c.h::i2c_t
i2c_dev
¶ I2C device which is used.
-
uint8_t
i2c_addr
¶ I2C address.
-
bmp180.h::bmp180_oversampling_mode_t
oversampling
¶ Oversampling mode.
-
-
struct
bmp180_t
¶ Device descriptor for the BMP180 sensor.
-
bmp180_params_t
params
¶ Device initialization parameters.
-
bmp180_calibration_t
calibration
¶ Device calibration.
-
bmp180_params_t