38#ifndef DRIVER_BMP180_H
39#define DRIVER_BMP180_H
78 uint8_t (*
iic_read)(uint8_t addr, uint8_t reg, uint8_t *buf, uint16_t len);
79 uint8_t (*
iic_write)(uint8_t addr, uint8_t reg, uint8_t *buf, uint16_t len);
130#define DRIVER_BMP180_LINK_INIT(HANDLE, STRUCTURE) memset(HANDLE, 0, sizeof(STRUCTURE))
138#define DRIVER_BMP180_LINK_IIC_INIT(HANDLE, FUC) (HANDLE)->iic_init = FUC
146#define DRIVER_BMP180_LINK_IIC_DEINIT(HANDLE, FUC) (HANDLE)->iic_deinit = FUC
154#define DRIVER_BMP180_LINK_IIC_READ(HANDLE, FUC) (HANDLE)->iic_read = FUC
162#define DRIVER_BMP180_LINK_IIC_WRITE(HANDLE, FUC) (HANDLE)->iic_write = FUC
170#define DRIVER_BMP180_LINK_DELAY_MS(HANDLE, FUC) (HANDLE)->delay_ms = FUC
178#define DRIVER_BMP180_LINK_DEBUG_PRINT(HANDLE, FUC) (HANDLE)->debug_print = FUC
242 uint32_t *pressure_raw, uint32_t *pressure_pa);
uint8_t bmp180_deinit(bmp180_handle_t *handle)
close the chip
struct bmp180_info_s bmp180_info_t
bmp180 information structure definition
bmp180_mode_t
bmp180 mode enumeration definition
struct bmp180_handle_s bmp180_handle_t
bmp180 handle structure definition
uint8_t bmp180_init(bmp180_handle_t *handle)
initialize the chip
uint8_t bmp180_info(bmp180_info_t *info)
get chip's information
uint8_t bmp180_read_temperature(bmp180_handle_t *handle, uint16_t *raw, float *c)
read the temperature data
uint8_t bmp180_read_pressure(bmp180_handle_t *handle, uint32_t *raw, uint32_t *pa)
read the pressure data
uint8_t bmp180_read_temperature_pressure(bmp180_handle_t *handle, uint16_t *temperature_raw, float *temperature_c, uint32_t *pressure_raw, uint32_t *pressure_pa)
read the temperature and pressure data
uint8_t bmp180_get_mode(bmp180_handle_t *handle, bmp180_mode_t *mode)
get the measurement mode
uint8_t bmp180_set_mode(bmp180_handle_t *handle, bmp180_mode_t mode)
set the measurement mode
uint8_t bmp180_set_reg(bmp180_handle_t *handle, uint8_t reg, uint8_t value)
set the chip register
uint8_t bmp180_get_reg(bmp180_handle_t *handle, uint8_t reg, uint8_t *value)
get the chip register
bmp180 handle structure definition
void(* delay_ms)(uint32_t ms)
void(* debug_print)(const char *const fmt,...)
uint8_t(* iic_init)(void)
uint8_t(* iic_write)(uint8_t addr, uint8_t reg, uint8_t *buf, uint16_t len)
uint8_t(* iic_read)(uint8_t addr, uint8_t reg, uint8_t *buf, uint16_t len)
uint8_t(* iic_deinit)(void)
bmp180 information structure definition
float supply_voltage_max_v
char manufacturer_name[32]
float supply_voltage_min_v