API Reference
- Author
Ceyhun Şen
Defines
-
I2C_LIB
Library that includes I2C functions.
Change this definition to your MCU’s I2C HAL library. E.g. “stm32f4xx_hal.h”.
Enums
Functions
-
uint8_t bmp180_init(I2C_HandleTypeDef *hi2cx, bmp180_t *bmp180)
Initialize sensor and get calibration values.
- Parameters
hi2cx – I2C handle.
bmp180 –
bmp180_t
struct to initialize.
- Returns
0 on success, 1 on sensor is not ready, 2 on sensor error.
-
void bmp180_get_all(bmp180_t *bmp180)
Get all sensor data at once.
- Parameters
bmp180 –
bmp180_t
struct to write data.- Return values
None. –
-
void bmp180_get_temperature(bmp180_t *bmp180)
Get temperature data.
- Parameters
bmp180 –
bmp180_t
struct to write data.- Return values
None. –
-
void bmp180_get_pressure(bmp180_t *bmp180)
Get pressure data.
- Parameters
bmp180 –
bmp180_t
struct to write data.- Return values
None. –
-
struct bmp180_t
- #include <bmp180.h>
Holds sensor data, sensor settings and calibration values.
Public Members
-
I2C_HandleTypeDef *hi2cx
-
float temperature
-
int32_t pressure
-
float altitude
-
int32_t sea_pressure
-
enum _bmp180_oversampling_settings oversampling_setting
-
uint8_t oss
-
int16_t AC1
-
int16_t AC2
-
int16_t AC3
-
uint16_t AC4
-
uint16_t AC5
-
uint16_t AC6
-
int16_t B1
-
int16_t B2
-
int32_t B3
-
uint32_t B4
-
int32_t B5
-
int32_t B6
-
uint32_t B7
-
int16_t MB
-
int16_t MC
-
int16_t MD
-
I2C_HandleTypeDef *hi2cx