Device driver interface for the BMP180 sensor.
More...
Device driver interface for the BMP180 sensor.
This driver provides [S]ensor [A]ctuator [U]ber [L]ayer capabilities.
◆ anonymous enum
Status and error return codes.
Enumerator |
---|
BMP180_OK | everything was fine
|
BMP180_ERR_NODEV | did not detect BMP180
|
BMP180_ERR_NOCAL | error when reading calibration values
|
Definition at line 81 of file bmp180.h.
◆ bmp180_altitude()
int16_t bmp180_altitude |
( |
const bmp180_t * |
dev, |
|
|
uint32_t |
pressure_0 |
|
) |
| |
Compute altitude, returned in m.
- Parameters
-
[in] | dev | Device descriptor of BMP180 device to read from |
[in] | pressure_0 | The pressure at sea level in Pa |
- Returns
- Altitude in m
◆ bmp180_init()
Initialize the given BMP180 device.
- Parameters
-
[out] | dev | Initialized device descriptor of BMP180 device |
[in] | params | Initialization parameters |
- Returns
- BMP180_OK on success
-
-BMP180_ERR_NODEV if not a BMP180 at given address
-
-BMP180_ERR_NOCAL if an error occurred when reading calibration values
◆ bmp180_read_pressure()
uint32_t bmp180_read_pressure |
( |
const bmp180_t * |
dev | ) |
|
Read pressure value from the given BMP180 device, returned in Pa.
- Parameters
-
[in] | dev | Device descriptor of BMP180 device to read from |
- Returns
- Pressure in Pa
◆ bmp180_read_temperature()
int16_t bmp180_read_temperature |
( |
const bmp180_t * |
dev | ) |
|
Read temperature value from the given BMP180 device, returned in d°C.
- Parameters
-
[in] | dev | Device descriptor of BMP180 device to read from |
- Returns
- Temperature in d°C
◆ bmp180_sealevel_pressure()
uint32_t bmp180_sealevel_pressure |
( |
const bmp180_t * |
dev, |
|
|
int16_t |
altitude |
|
) |
| |
Compute pressure at sea level, returned in Pa.
- Parameters
-
[in] | dev | Device descriptor of BMP180 device to read from |
[in] | altitude | Altitude in m |
- Returns
- Pressure at sea level in Pa