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

change sensor's settings More...

Collaboration diagram for Set Functions:

Functions

int8_t BME280_SetMode (BME280_t *Dev, uint8_t Mode)
 Function sets sensor's Operating Mode.
 
int8_t BME280_SetPOvs (BME280_t *Dev, uint8_t POvs)
 Function sets sensor's pressure Oversampling.
 
int8_t BME280_SetTOvs (BME280_t *Dev, uint8_t TOvs)
 Function sets sensor's temperature Oversampling.
 
int8_t BME280_SetHOvs (BME280_t *Dev, uint8_t HOvs)
 Function sets sensor's humidity Oversampling.
 
int8_t BME280_SetTStby (BME280_t *Dev, uint8_t TStby)
 Function sets sensor's Standby Time.
 
int8_t BME280_SetFilter (BME280_t *Dev, uint8_t Filter)
 Function sets sensor's IIR Filter coeficient.
 
int8_t BME280_Enable3WireSPI (BME280_t *Dev)
 Function enables 3-wire SPI bus.
 
int8_t BME280_Disable3WireSPI (BME280_t *Dev)
 Function disables 3-wire SPI bus.
 

Detailed Description

change sensor's settings

Note
USE_SETTERS in Library Configuration must be uncommented to use these functions
Sensor must be in BME280_SLEEPMODE to change settings. Only BME280_SetMode function can be used when sensors is in different working mode,

Function Documentation

◆ BME280_Disable3WireSPI()

int8_t BME280_Disable3WireSPI ( BME280_t Dev)

Function disables 3-wire SPI bus.

Note
Sensor must be in BME280_SLEEPMODE to set this parameter. Force BME280_SLEEPMODE with BME280_SetMode function before or use it directly after BME280_Init function only.

Function reads single register from sensor, and checks if current value matches value requested by user. If matches, function skips write operation and returns BME280_OK. If doesnt, it prepares and sends new register value.

Parameters
[in]*Devpointer to sensor's BME280_t structure
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
Here is the call graph for this function:

◆ BME280_Enable3WireSPI()

int8_t BME280_Enable3WireSPI ( BME280_t Dev)

Function enables 3-wire SPI bus.

Note
Sensor must be in BME280_SLEEPMODE to set this parameter. Force BME280_SLEEPMODE with BME280_SetMode function before or use it directly after BME280_Init function only.

Function reads single register from sensor, and checks if current value matches value requested by user. If matches, function skips write operation and returns BME280_OK. If doesnt, it prepares and sends new register value.

Parameters
[in]*Devpointer to sensor's BME280_t structure
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
Here is the call graph for this function:

◆ BME280_SetFilter()

int8_t BME280_SetFilter ( BME280_t Dev,
uint8_t  Filter 
)

Function sets sensor's IIR Filter coeficient.

Note
Sensor must be in BME280_SLEEPMODE to set this parameter. Force BME280_SLEEPMODE with BME280_SetMode function before or use it directly after BME280_Init function only.

Function reads single register from sensor, and checks if current value matches value requested by user. If matches, function skips write operation and returns BME280_OK. If doesnt, it prepares and sends new register value.

Parameters
[in]*Devpointer to sensor's BME280_t structure
[in]Filtervalue to be set, must be in range of IIR Filter
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
Here is the call graph for this function:

◆ BME280_SetHOvs()

int8_t BME280_SetHOvs ( BME280_t Dev,
uint8_t  HOvs 
)

Function sets sensor's humidity Oversampling.

Note
Sensor must be in BME280_SLEEPMODE to set this parameter. Force BME280_SLEEPMODE with BME280_SetMode function before or use it directly after BME280_Init function only.

Function reads single register from sensor, and checks if current value matches value requested by user. If matches, function skips write operation and returns BME280_OK. If doesnt, it prepares and sends new register value.

Parameters
[in]*Devpointer to sensor's BME280_t structure
[in]HOvsvalue to be set, must be in range of Oversampling
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
Here is the call graph for this function:

◆ BME280_SetMode()

int8_t BME280_SetMode ( BME280_t Dev,
uint8_t  Mode 
)

Function sets sensor's Operating Mode.

Function reads single register from sensor, and checks if current mode matches mode requested by user. If matches, function skips write operation and returns BME280_OK. If doesnt, it prepares and sends new register value, then sets correct operating mode inside *Dev structure.

Parameters
[in]*Devpointer to sensor's BME280_t structure
[in]Modevalue to be set, must be in range of Operating Mode
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
Here is the call graph for this function:

◆ BME280_SetPOvs()

int8_t BME280_SetPOvs ( BME280_t Dev,
uint8_t  POvs 
)

Function sets sensor's pressure Oversampling.

Note
Sensor must be in BME280_SLEEPMODE to set this parameter. Force BME280_SLEEPMODE with BME280_SetMode function before or use it directly after BME280_Init function only.

Function reads single register from sensor, and checks if current value matches value requested by user. If matches, function skips write operation and returns BME280_OK. If doesnt, it prepares and sends new register value.

Parameters
[in]*Devpointer to sensor's BME280_t structure
[in]POvsvalue to be set, must be in range of Oversampling
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
Here is the call graph for this function:

◆ BME280_SetTOvs()

int8_t BME280_SetTOvs ( BME280_t Dev,
uint8_t  TOvs 
)

Function sets sensor's temperature Oversampling.

Note
Sensor must be in BME280_SLEEPMODE to set this parameter. Force BME280_SLEEPMODE with BME280_SetMode function before or use it directly after BME280_Init function only.

Function reads single register from sensor, and checks if current value matches value requested by user. If matches, function skips write operation and returns BME280_OK. If doesnt, it prepares and sends new register value.

Parameters
[in]*Devpointer to sensor's BME280_t structure
[in]TOvsvalue to be set, must be in range of Oversampling
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
Here is the call graph for this function:

◆ BME280_SetTStby()

int8_t BME280_SetTStby ( BME280_t Dev,
uint8_t  TStby 
)

Function sets sensor's Standby Time.

Note
Sensor must be in BME280_SLEEPMODE to set this parameter. Force BME280_SLEEPMODE with BME280_SetMode function before or use it directly after BME280_Init function only.

Function reads single register from sensor, and checks if current value matches value requested by user. If matches, function skips write operation and returns BME280_OK. If doesnt, it prepares and sends new register value.

Parameters
[in]*Devpointer to sensor's BME280_t structure
[in]TStbyvalue to be set, must be in range of Standby Time
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
Here is the call graph for this function: