void bmp280_periodic(struct bmp280_t *bmp)
Should be called periodically to request sensor readings.
uint8_t slave_addr
The I2C slave address on the bus.
struct bmp280_reg_calib_data_t calib
calibration data
void bmp280_init(struct bmp280_t *bmp)
Initialize the bmp280 sensor instance.
enum bmp280_status_t status
state machine status
volatile bool data_available
data ready flag
void bmp280_read_eeprom_calib(struct bmp280_t *bmp)
uint8_t slave_idx
Slave index used for Slave Select.
uint8_t config_idx
The current configuration index.
float temperature
temperature in deg Celcius
uint32_t raw_temperature
uncompensated temperature
@ BMP280_STATUS_READ_DATA_REGS
@ BMP280_STATUS_READ_STATUS_REG
@ BMP280_STATUS_GET_CALIB
@ BMP280_STATUS_CONFIGURE
enum bmp280_bus_t bus
The communication bus used to connect the device SPI/I2C.
enum bmp_device_t device
The device type detected.
uint8_t tx_buf[50]
Transmit buffer.
struct spi_transaction trans
Transaction used during configuration and measurements.
void bmp280_event(struct bmp280_t *bmp)
Should be called in the event thread.
float pressure
pressure in Pascal
struct i2c_transaction trans
Transaction used during configuration and measurements.
struct spi_periph * p
Peripheral device for communication.
struct i2c_periph * p
Peripheral device for communication.
bool initialized
config done flag
uint32_t raw_pressure
uncompensated pressure
I2C transaction structure.
SPI peripheral structure.
SPI transaction structure.
Architecture independent I2C (Inter-Integrated Circuit Bus) API.
Architecture independent SPI (Serial Peripheral Interface) API.
unsigned short uint16_t
Typedef defining 16 bit unsigned short type.
unsigned int uint32_t
Typedef defining 32 bit unsigned int type.
short int16_t
Typedef defining 16 bit short type.
unsigned char uint8_t
Typedef defining 8 bit unsigned char type.