Go to the documentation of this file.
79 #if defined(MODULE_BME280_SPI) || defined(MODULE_BMP280_SPI)
80 #define BMX280_USE_SPI
93 #if defined(MODULE_BME280_SPI) || defined(MODULE_BME280_I2C)
94 #define BMX280_RAW_LEN (8U)
96 #define BMX280_RAW_LEN (6U)
131 BMX280_SB_0_5 = 0x00,
132 BMX280_SB_62_5 = 0x20,
133 BMX280_SB_125 = 0x40,
134 BMX280_SB_250 = 0x60,
135 BMX280_SB_500 = 0x80,
136 BMX280_SB_1000 = 0xa0,
145 BMX280_FILTER_OFF = 0x00,
146 BMX280_FILTER_2 = 0x04,
147 BMX280_FILTER_4 = 0x08,
148 BMX280_FILTER_8 = 0x0c,
149 BMX280_FILTER_16 = 0x10,
156 BMX280_MODE_SLEEP = 0x00,
157 BMX280_MODE_FORCED = 0x01,
158 BMX280_MODE_NORMAL = 0x03,
170 BMX280_OSRS_SKIPPED = 0x00,
171 BMX280_OSRS_X1 = 0x01,
172 BMX280_OSRS_X2 = 0x02,
173 BMX280_OSRS_X4 = 0x03,
174 BMX280_OSRS_X8 = 0x04,
175 BMX280_OSRS_X16 = 0x05,
184 #ifdef BMX280_USE_SPI
238 #if defined(MODULE_BME280_SPI) || defined(MODULE_BME280_I2C)
242 extern const saul_driver_t bme280_relative_humidity_saul_driver;
287 #if defined(MODULE_BME280_SPI) || defined(MODULE_BME280_I2C) || defined(DOXYGEN)
@ BMX280_OK
everything was fine
int16_t dig_H5
H5 coefficient.
bmx280_mode_t run_mode
ctrl_meas mode
uint8_t dig_H3
H3 coefficient.
int16_t dig_P6
P6 coefficient.
@ BMX280_ERR_NODEV
did not detect BME280 or BMP280
int16_t dig_P3
P3 coefficient.
uint8_t i2c_addr
I2C address.
int8_t dig_H6
H6 coefficient.
Low-level SPI peripheral driver interface definition.
const saul_driver_t bmx280_pressure_saul_driver
Export of SAUL interface for pressure sensor.
int16_t dig_P4
P4 coefficient.
unsigned int i2c_t
Default i2c_t type definition.
bmx280_osrs_t temp_oversample
ctrl_meas osrs_t
#define BMX280_RAW_LEN
Select the number or raw data bytes depending on the device type.
int16_t dig_H4
H4 coefficient.
uint32_t bmx280_read_pressure(bmx280_t *dev)
Read air pressure value from the given BMX280 device.
uint8_t spi3w_en
Enables 3-wire SPI interface.
bmx280_osrs_t press_oversample
ctrl_meas osrs_p
uint16_t dig_P1
P1 coefficient.
bmx280_t_sb_t
Values for t_sb field of the BMX280 config register.
int16_t dig_T2
T2 coefficient.
Calibration struct for the BMX280 sensor.
@ BMX280_ERR_BUS
bus error
bmx280_osrs_t
Values for oversampling settings.
spi_clk_t
Available SPI clock speeds.
int16_t bmx280_read_temperature(bmx280_t *dev)
Read temperature value from the given BMX280 device.
int32_t t_fine
temperature compensation value
int16_t dig_P7
P7 coefficient.
int16_t dig_P2
P2 coefficient.
Definition of the RIOT actuator/sensor interface.
Parameters for the BMX280 sensor.
bmx280_osrs_t humid_oversample
ctrl_hum osrs_h
const saul_driver_t bmx280_temperature_saul_driver
Export of SAUL interface for temperature sensor.
uint16_t dig_T1
T1 coefficient.
i2c_t i2c_dev
I2C device which is used.
uint16_t bme280_read_humidity(bmx280_t *dev)
Read humidity value from the given BME280 device.
int16_t dig_P9
P9 coefficient.
Device descriptor for the BMX280 sensor.
int16_t dig_H2
H2 coefficient.
bmx280_params_t params
Device Parameters.
bmx280_t_sb_t t_sb
standby
int16_t dig_P5
P5 coefficient.
Definition of the generic [S]ensor [A]ctuator [U]ber [L]ayer.
uint8_t dig_H1
H1 coefficient.
bmx280_mode_t
Values for mode field of the BMX280 ctrl_meas register.
bmx280_filter_t filter
filter coefficient
bmx280_filter_t
Values for filter field of the BMX280 config register.
Low-level I2C peripheral driver interface definition.
int16_t dig_T3
T3 coefficient.
int16_t dig_P8
P8 coefficient.
bmx280_calibration_t calibration
Calibration Data.
unsigned int spi_t
Default type for SPI devices.
int bmx280_init(bmx280_t *dev, const bmx280_params_t *params)
Initialize the given BMX280 device.