BME280 Driver 2.0.x
Driver for BME280 sensor
|
Use these functions only. More...
Modules | |
Get Functions | |
Read sensor's settings. | |
Set Functions | |
change sensor's settings | |
Read Functions (int) | |
read measured data from sensor as integers | |
Read Functions (float) | |
read measured data from sensor as floating point values | |
Functions | |
int8_t | BME280_Init (BME280_t *Dev, BME280_Driver_t *Driver) |
Function to initialize sensor and resources. | |
int8_t | BME280_Reset (BME280_t *Dev) |
Function to perform sensor's software reset. | |
int8_t | BME280_ConfigureAll (BME280_t *Dev, BME280_Config_t *Config) |
Function to set all sensor settings at once. | |
Use these functions only.
int8_t BME280_ConfigureAll | ( | BME280_t * | Dev, |
BME280_Config_t * | Config | ||
) |
Function to set all sensor settings at once.
Function writes all 3 config registers without reading them before. It can be usefull after power-up or reset. It sets current operating mode inside *Dev structure at the end.
[in] | *Dev | pointer to sensor's BME280_t structure |
[in] | *Config | pointer to BME280_Config_t structure which contains all paramaters to be set |
int8_t BME280_Init | ( | BME280_t * | Dev, |
BME280_Driver_t * | Driver | ||
) |
Function to initialize sensor and resources.
Init funtion performs sensor reset and checks BME280_ID. It doesn't set any sensor's parameters. Calibration data specific for each one sensor are read while Init function. If operation is completed with success function sets "initialized" value in BME280_t structure.
[in] | *Dev | pointer to BME280_t structure which should be initialized |
[in] | *Driver | pointer to BME280_Driver_t structure where all platform specific data are stored. This structure MUST exist while program is running - do not use local structures to init sensor! |
int8_t BME280_Reset | ( | BME280_t * | Dev | ) |
Function to perform sensor's software reset.
Function sends BME280_RESET_VALUE to BME280_RESET_ADDR. To perform this operation bme280_writeregister function must be set inside BME280_t *Dev structure. Function sets "sleep_mode" inside *Dev structure after reset.
[in] | *Dev | pointer to sensor's BME280_t structure |