BME280 Driver 2.0.x
Driver for BME280 sensor
Loading...
Searching...
No Matches
bme280_definitions.h File Reference

Defined types for BME280 Driver. More...

#include <stdint.h>
Include dependency graph for bme280_definitions.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  BME280_calibration_data
 Keeps calibration data that were read from sensor. More...
 
struct  BME280_Driver_t
 Keeps all data specific for used platform. More...
 
struct  BME280_t
 Keeps all data related to a single sensor. More...
 
struct  BME280_Config_t
 Contains all sensor's settings. More...
 
struct  BME280_Data_t
 Contains result of measure (no floating points variables) More...
 
struct  BME280_DataF_t
 Contains result of measure (with floating points variables) More...
 

Macros

#define BME280_OK   (0)
 operation completed successfully
 
#define BME280_PARAM_ERR   (-1)
 wrong parameters were passed to the function
 
#define BME280_INTERFACE_ERR   (-2)
 user-defined function to communicate with sensor returned non-zero value
 
#define BME280_ID_ERR   (-3)
 device ID doesn't match with BME280_ID
 
#define BME280_NO_INIT_ERR   (-4)
 device wasn't initialized properly and operation cannot be performed
 
#define BME280_CONDITION_ERR   (-5)
 device is set to wrong operation mode, cannot perform operation
 
#define BME280_BUSY_ERR   (-6)
 device is busy
 
#define BME280_I2CADDR_SDOL   (0x76)
 if SDO pin is connected to GND
 
#define BME280_I2CADDR_SDOH   (0x77)
 if SDO pin is connected to VCC
 
#define BME280_ID   (0x60)
 Chip ID.
 
#define BME280_ID_ADDR   (0xD0)
 address of Chip ID
 
#define BME280_RESET_ADDR   (0xE0)
 address of Reset register
 
#define BME280_RESET_VALUE   (0xB6)
 value that should be written to Reset register
 
#define BME280_CALIB_DATA1_ADDR   (0x88)
 address of first block with calibration data
 
#define BME280_CALIB_DATA1_LEN   (25U)
 lenght of first block with calibration data
 
#define BME280_CALIB_DATA2_ADDR   (0xE1)
 address of second block with calibration data
 
#define BME280_CALIB_DATA2_LEN   (7U)
 lenght of second block with calibration data
 
#define BME280_CTRL_HUM_ADDR   (0xF2)
 address of ctrl_hum register
 
#define BME280_CTRL_MEAS_ADDR   (0xF4)
 address of ctrl_meas register
 
#define BME280_CONFIG_ADDR   (0xF5)
 address of config register
 
#define BME280_PRESS_ADC_ADDR   (0xF7)
 address of pressure adc data
 
#define BME280_PRESS_ADC_LEN   (3U)
 lenght of pressure adc data
 
#define BME280_TEMP_ADC_ADDR   (0xFA)
 address of temperature adc data
 
#define BME280_TEMP_ADC_LEN   (3U)
 lenght of temperature adc data
 
#define BME280_HUM_ADC_ADDR   (0xFD)
 address of humidity adc data
 
#define BME280_HUM_ADC_LEN   (2U)
 lenght of humidity adc data
 
#define BME280_STATUS_ADDR   (0xF3)
 address of status register
 
#define BME280_OVERSAMPLING_SKIPP   (0x00)
 no oversampling (skipp measure)
 
#define BME280_OVERSAMPLING_X1   (0x01)
 oversampling x1
 
#define BME280_OVERSAMPLING_X2   (0x02)
 oversampling x2
 
#define BME280_OVERSAMPLING_X4   (0x03)
 oversampling x4
 
#define BME280_OVERSAMPLING_X8   (0x04)
 oversampling x8
 
#define BME280_OVERSAMPLING_X16   (0x05)
 oversampling x16
 
#define BME280_SLEEPMODE   (0x00)
 sleep mode
 
#define BME280_FORCEDMODE   (0x01)
 forced mode
 
#define BME280_NORMALMODE   (0x03)
 normal mode
 
#define BME280_STBY_0_5MS   (0x00)
 0,5ms
 
#define BME280_STBY_62_5MS   (0x01)
 62,5ms
 
#define BME280_STBY_125MS   (0x02)
 125ms
 
#define BME280_STBY_250MS   (0x03)
 250ms
 
#define BME280_STBY_500MS   (0x04)
 500ms
 
#define BME280_STBY_1000MS   (0x05)
 1000ms
 
#define BME280_STBY_10MS   (0x06)
 10ms
 
#define BME280_STBY_20MS   (0x07)
 20ms
 
#define BME280_FILTER_OFF   (0x00)
 no IIR filter
 
#define BME280_FILTER_2   (0x01)
 IIR filter coefficient 2.
 
#define BME280_FILTER_4   (0x02)
 IIR filter coefficient 4.
 
#define BME280_FILTER_8   (0x03)
 IIR filter coefficient 8.
 
#define BME280_FILTER_16   (0x04)
 IIR filter coefficient 16.
 

Typedefs

typedef int8_t(* bme280_readregisters) (uint8_t reg_addr, uint8_t *rxbuff, uint8_t rxlen, void *driver)
 
typedef int8_t(* bme280_writeregister) (uint8_t reg_addr, uint8_t value, void *driver)
 
typedef void(* bme280_delayms) (uint8_t delay_time)
 
typedef int32_t BME280_S32_t
 signed 32-bit integer variable
 
typedef uint32_t BME280_U32_t
 unsigned 32-bit integer variable
 
typedef int64_t BME280_S64_t
 signed 64-bit integer variable
 

Detailed Description

Defined types for BME280 Driver.

Author
Ɓukasz Juraszek / JuraszekL
Date
20.04.2023
Note
https://github.com/JuraszekL/BME280_Driver