BME280 Driver 2.0.x
Driver for BME280 sensor
Loading...
Searching...
No Matches

force single measure and read data when finished More...

Collaboration diagram for Read in forced mode:

Functions

int8_t BME280_ReadAllForce (BME280_t *Dev, BME280_Data_t *Data)
 Function forces single measure and returns all data as integers.
 
int8_t BME280_ReadTempForce (BME280_t *Dev, int8_t *TempInt, uint8_t *TempFract)
 Function forces single measure and returns temperatrue as integers (forced mode)
 
int8_t BME280_ReadPressForce (BME280_t *Dev, uint16_t *PressInt, uint16_t *PressFract)
 Function forces single measure and returns pressure as integers (forced mode)
 
int8_t BME280_ReadHumForce (BME280_t *Dev, uint8_t *HumInt, uint16_t *HumFract)
 Function forces single measure and returns humidity as integers (forced mode)
 

Detailed Description

force single measure and read data when finished

Note
USE_FORCED_MODE in Library Configuration must be uncommented to use these functions

Function Documentation

◆ BME280_ReadAllForce()

int8_t BME280_ReadAllForce ( BME280_t Dev,
BME280_Data_t Data 
)

Function forces single measure and returns all data as integers.

Note
Sensor must be in BME280_SLEEPMODE to force a single measurement.

Function reads sensor's configuration to check conditions and calculate max. delay time required for measure cycle. Then sends command to force single measurement and calls used-defined delay function. When delay function returns ir reads all adc values from sensor, converts them into single variables and compensate with use BME280_calibration_data. Compensated values are then converted into BME280_Data_t structure.

Parameters
[in]*Devpointer to sensor's BME280_t structure
[out]*Datapointer to structure where result will be stored
Returns
BME280_OK success
BME280_PARAM_ERR wrong parameter passed
BME280_INTERFACE_ERR user defined read/write function returned non-zero value
BME280_NO_INIT_ERR sensor was not initialized before
BME280_CONDITION_ERR sensor is not in BME280_SLEEPMODE
BME280_BUSY_ERR sensor is busy so cannot proceed
Here is the call graph for this function:
Here is the caller graph for this function:

◆ BME280_ReadHumForce()

int8_t BME280_ReadHumForce ( BME280_t Dev,
uint8_t *  HumInt,
uint16_t *  HumFract 
)

Function forces single measure and returns humidity as integers (forced mode)

Note
Sensor must be in BME280_SLEEPMODE to force a single measurement.

Function reads sensor's configuration to check conditions and calculate max. delay time required for measure cycle. Then sends command to force single measurement and calls used-defined delay function. When delay function returns ir reads temperarure and humidity related adc values from sensor, converts them into single variables and compensate with use BME280_calibration_data. Compensated values are then converted into integer (*HumInt) and fractial part (*HumFract).

Parameters
[in]*Devpointer to sensor's BME280_t structure
[out]*HumIntpointer to variable where integer part of humidity will be stored
[out]*HumFractpointer to variable where fractial part of humidity will be stored
Returns
BME280_OK success
BME280_PARAM_ERR wrong parameter passed
BME280_INTERFACE_ERR user defined read/write function returned non-zero value
BME280_NO_INIT_ERR sensor was not initialized before
BME280_CONDITION_ERR sensor is not in BME280_SLEEPMODE
BME280_BUSY_ERR sensor is busy so cannot proceed
Here is the call graph for this function:

◆ BME280_ReadPressForce()

int8_t BME280_ReadPressForce ( BME280_t Dev,
uint16_t *  PressInt,
uint16_t *  PressFract 
)

Function forces single measure and returns pressure as integers (forced mode)

Note
Sensor must be in BME280_SLEEPMODE to force a single measurement.

Function reads sensor's configuration to check conditions and calculate max. delay time required for measure cycle. Then sends command to force single measurement and calls used-defined delay function. When delay function returns ir reads temperarure and pressure related adc values from sensor, converts them into single variables and compensate with use BME280_calibration_data. Compensated values are then converted into integer (*PressInt) and fractial part (*PressFract).

Parameters
[in]*Devpointer to sensor's BME280_t structure
[out]*PressIntpointer to variable where integer part of pressure will be stored
[out]*PressFractpointer to variable where fractial part of pressure will be stored
Returns
BME280_OK success
BME280_PARAM_ERR wrong parameter passed
BME280_INTERFACE_ERR user defined read/write function returned non-zero value
BME280_NO_INIT_ERR sensor was not initialized before
BME280_CONDITION_ERR sensor is not in BME280_SLEEPMODE
BME280_BUSY_ERR sensor is busy so cannot proceed
Here is the call graph for this function:

◆ BME280_ReadTempForce()

int8_t BME280_ReadTempForce ( BME280_t Dev,
int8_t *  TempInt,
uint8_t *  TempFract 
)

Function forces single measure and returns temperatrue as integers (forced mode)

Note
Sensor must be in BME280_SLEEPMODE to force a single measurement.

Function reads sensor's configuration to check conditions and calculate max. delay time required for measure cycle. Then sends command to force single measurement and calls used-defined delay function. When delay function returns ir reads temperature related adc values from sensor, converts them into single variables and compensate with use BME280_calibration_data. Compensated values are then converted into integer (*TempInt) and fractial part (*TempFract).

Parameters
[in]*Devpointer to sensor's BME280_t structure
[out]*TempIntpointer to variable where integer part of temperature will be stored
[out]*TempFractpointer to variable where fractial part of temperature will be stored
Returns
BME280_OK success
BME280_PARAM_ERR wrong parameter passed
BME280_INTERFACE_ERR user defined read/write function returned non-zero value
BME280_NO_INIT_ERR sensor was not initialized before
BME280_CONDITION_ERR sensor is not in BME280_SLEEPMODE
BME280_BUSY_ERR sensor is busy so cannot proceed
Here is the call graph for this function: