EZR32 Wonder Gecko Software Documentation  ezr32wg-doc-5.1.2

Detailed Description

BMP driver and support functions.

DO_NOT_INCLUDE_WITH_DOXYGEN

Functions

uint32_t BMP_config (BMP_Config *cfg)
 Configure the barometric pressure sensor. More...
 
void BMP_deInit (void)
 De-initializes the barometric pressure module. More...
 
uint32_t BMP_getPressure (float *pressure)
 Initiates pressure measurement on the barometric pressure sensor and reads pressure from it. More...
 
uint32_t BMP_getTemperature (float *temperature)
 Initiates temperature measurement on the barometric pressure sensor and reads pressure from it. More...
 
uint32_t BMP_init (uint8_t *deviceId)
 Initializes the barometric pressure sensor chip. More...
 

Function Documentation

uint32_t BMP_config ( BMP_Config cfg)

Configure the barometric pressure sensor.

Parameters
[in]cfgStructure, which holds the configuration parameters
Returns
Returns zero on OK, non-zero otherwise

Definition at line 140 of file bmp.c.

References bmp280_set_power_mode(), bmp280_set_standby_durn(), bmp280_set_work_mode(), __BMP_Config::oversampling, __BMP_Config::powerMode, and __BMP_Config::standbyTime.

void BMP_deInit ( void  )

De-initializes the barometric pressure module.

Returns
None

Definition at line 124 of file bmp.c.

References bmp280_set_power_mode().

uint32_t BMP_getPressure ( float *  pressure)

Initiates pressure measurement on the barometric pressure sensor and reads pressure from it.

Parameters
[out]pressureThe measured pressure in millibars
Returns
Returns zero on OK, non-zero otherwise

Definition at line 205 of file bmp.c.

References bmp280_compensate_pressure_int64(), bmp280_compensate_temperature_int32(), bmp280_get_forced_uncomp_pressure_temperature(), bmp280_read_uncomp_pressure(), bmp280_read_uncomp_temperature(), and BMP_OK.

uint32_t BMP_getTemperature ( float *  temperature)

Initiates temperature measurement on the barometric pressure sensor and reads pressure from it.

Parameters
[out]temperatureThe measured temperature in degrees Celsius
Returns
Returns zero on OK, non-zero otherwise

Definition at line 167 of file bmp.c.

References bmp280_compensate_temperature_int32(), bmp280_get_forced_uncomp_pressure_temperature(), bmp280_read_uncomp_temperature(), and BMP_OK.

uint32_t BMP_init ( uint8_t *  deviceId)

Initializes the barometric pressure sensor chip.

Parameters
[out]deviceIdThe device ID of the connected chip
Returns
Returns zero on OK, non-zero otherwise

Definition at line 68 of file bmp.c.

References bmp280_init(), bmp280_set_power_mode(), bmp280_set_work_mode(), BMP_DEVICE_ID_BMP280, BMP_ERROR_DEVICE_ID_MISMATCH, BMP_I2C_BUS_ADDRESS, BMP_OK, BMP_REG_ADDR_ID, BOARD_envSensEnable(), bmp280_t::delay_msec, bmp280_t::dev_addr, and UTIL_delay().