LibDriver BMP180
Loading...
Searching...
No Matches
bmp180 base driver function

bmp180 base driver modules More...

Collaboration diagram for bmp180 base driver function:

Data Structures

struct  bmp180_handle_s
 bmp180 handle structure definition More...
struct  bmp180_info_s
 bmp180 information structure definition More...

Typedefs

typedef struct bmp180_handle_s bmp180_handle_t
 bmp180 handle structure definition
typedef struct bmp180_info_s bmp180_info_t
 bmp180 information structure definition

Enumerations

enum  bmp180_mode_t { BMP180_MODE_ULTRA_LOW = 0x00 , BMP180_MODE_STANDARD = 0x01 , BMP180_MODE_HIGH = 0x02 , BMP180_MODE_ULTRA_HIGH = 0x03 }
 bmp180 mode enumeration definition More...

Functions

uint8_t bmp180_info (bmp180_info_t *info)
 get chip's information
uint8_t bmp180_init (bmp180_handle_t *handle)
 initialize the chip
uint8_t bmp180_deinit (bmp180_handle_t *handle)
 close the chip
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_read_pressure (bmp180_handle_t *handle, uint32_t *raw, uint32_t *pa)
 read the pressure data
uint8_t bmp180_read_temperature (bmp180_handle_t *handle, uint16_t *raw, float *c)
 read the temperature data
uint8_t bmp180_set_mode (bmp180_handle_t *handle, bmp180_mode_t mode)
 set the measurement mode
uint8_t bmp180_get_mode (bmp180_handle_t *handle, bmp180_mode_t *mode)
 get the measurement mode

Detailed Description

bmp180 base driver modules

Typedef Documentation

◆ bmp180_handle_t

bmp180 handle structure definition

◆ bmp180_info_t

typedef struct bmp180_info_s bmp180_info_t

bmp180 information structure definition

Enumeration Type Documentation

◆ bmp180_mode_t

bmp180 mode enumeration definition

Enumerator
BMP180_MODE_ULTRA_LOW 

ultra low mode

BMP180_MODE_STANDARD 

standard mode

BMP180_MODE_HIGH 

high mode

BMP180_MODE_ULTRA_HIGH 

ultra high mode

Definition at line 63 of file driver_bmp180.h.

Function Documentation

◆ bmp180_deinit()

uint8_t bmp180_deinit ( bmp180_handle_t * handle)

close the chip

Parameters
[in]*handlepointer to a bmp180 handle structure
Returns
status code
  • 0 success
  • 1 iic deinit failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 277 of file driver_bmp180.c.

◆ bmp180_get_mode()

uint8_t bmp180_get_mode ( bmp180_handle_t * handle,
bmp180_mode_t * mode )

get the measurement mode

Parameters
[in]*handlepointer to a bmp180 handle structure
[out]*modepointer to a measurement mode buffer
Returns
status code
  • 0 success
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 335 of file driver_bmp180.c.

◆ bmp180_info()

uint8_t bmp180_info ( bmp180_info_t * info)

get chip's information

Parameters
[out]*infopointer to a bmp180 info structure
Returns
status code
  • 0 success
  • 2 handle is NULL
Note
none

Definition at line 824 of file driver_bmp180.c.

◆ bmp180_init()

uint8_t bmp180_init ( bmp180_handle_t * handle)

initialize the chip

Parameters
[in]*handlepointer to a bmp180 handle structure
Returns
status code
  • 0 success
  • 1 iic initialization failed
  • 2 handle is NULL
  • 3 linked functions is NULL
  • 4 id is error
  • 5 read calibration failed
Note
none

Definition at line 147 of file driver_bmp180.c.

◆ bmp180_read_pressure()

uint8_t bmp180_read_pressure ( bmp180_handle_t * handle,
uint32_t * raw,
uint32_t * pa )

read the pressure data

Parameters
[in]*handlepointer to a bmp180 handle structure
[out]*rawpointer to a raw pressure buffer
[out]*papointer to a converted pressure buffer
Returns
status code
  • 0 success
  • 1 pressure read failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 363 of file driver_bmp180.c.

◆ bmp180_read_temperature()

uint8_t bmp180_read_temperature ( bmp180_handle_t * handle,
uint16_t * raw,
float * c )

read the temperature data

Parameters
[in]*handlepointer to a bmp180 handle structure
[out]*rawpointer to a raw temperature buffer
[out]*cpointer to a converted temperature buffer
Returns
status code
  • 0 success
  • 1 temperature read failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 528 of file driver_bmp180.c.

◆ bmp180_read_temperature_pressure()

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

Parameters
[in]*handlepointer to a bmp180 handle structure
[out]*temperature_rawpointer to a raw temperature buffer
[out]*temperature_cpointer to a converted temperature buffer
[out]*pressure_rawpointer to a raw pressure buffer
[out]*pressure_papointer to a converted pressure buffer
Returns
status code
  • 0 success
  • 1 read failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 608 of file driver_bmp180.c.

◆ bmp180_set_mode()

uint8_t bmp180_set_mode ( bmp180_handle_t * handle,
bmp180_mode_t mode )

set the measurement mode

Parameters
[in]*handlepointer to a bmp180 handle structure
[in]modemeasurement mode
Returns
status code
  • 0 success
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 309 of file driver_bmp180.c.