|
Paparazzi UAS v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
|
Sensor driver for BMP280 sensor. More...
Include dependency graph for bmp280.h:
This graph shows which files directly or indirectly include this file:Go to the source code of this file.
Data Structures | |
| struct | bmp280_i2c_t |
| struct | bmp280_spi_t |
| struct | bmp280_reg_calib_data_t |
| struct | bmp280_t |
| union | bmp280_t.__unnamed315__ |
Enumerations | |
| enum | bmp280_bus_t { BMP280_SPI , BMP280_I2C } |
| enum | bmp_device_t { BMP_UNKOWN , BMP_280 } |
| enum | bmp280_status_t { BMP280_STATUS_UNINIT , BMP280_STATUS_IDLE , BMP280_STATUS_GET_CALIB , BMP280_STATUS_CONFIGURE , BMP280_STATUS_READ_STATUS_REG , BMP280_STATUS_READ_DATA_REGS } |
Functions | |
| void | bmp280_read_eeprom_calib (struct bmp280_t *bmp) |
| void | bmp280_init (struct bmp280_t *bmp) |
| Initialize the bmp280 sensor instance. | |
| void | bmp280_periodic (struct bmp280_t *bmp) |
| Should be called periodically to request sensor readings. | |
| void | bmp280_event (struct bmp280_t *bmp) |
| Should be called in the event thread. | |
Sensor driver for BMP280 sensor.
Definition in file bmp280.h.
| struct bmp280_i2c_t |
Collaboration diagram for bmp280_i2c_t:| Data Fields | ||
|---|---|---|
| struct i2c_periph * | p | Peripheral device for communication. |
| uint8_t | slave_addr | The I2C slave address on the bus. |
| struct i2c_transaction | trans | Transaction used during configuration and measurements. |
| struct bmp280_spi_t |
Collaboration diagram for bmp280_spi_t:| Data Fields | ||
|---|---|---|
| struct spi_periph * | p | Peripheral device for communication. |
| uint8_t | rx_buf[50] | |
| uint8_t | slave_idx | Slave index used for Slave Select. |
| struct spi_transaction | trans | Transaction used during configuration and measurements. |
| uint8_t | tx_buf[50] | Transmit buffer. |
| struct bmp280_reg_calib_data_t |
| struct bmp280_t |
Collaboration diagram for bmp280_t:| Data Fields | ||
|---|---|---|
| union bmp280_t.__unnamed315__ | __unnamed__ | |
| enum bmp280_bus_t | bus | The communication bus used to connect the device SPI/I2C. |
| struct bmp280_reg_calib_data_t | calib | calibration data |
| uint8_t | config_idx | The current configuration index. |
| volatile bool | data_available | data ready flag |
| enum bmp_device_t | device | The device type detected. |
| bool | initialized | config done flag |
| float | pressure | pressure in Pascal |
| uint32_t | raw_pressure | uncompensated pressure |
| uint32_t | raw_temperature | uncompensated temperature |
| uint8_t * | rx_buffer | |
| uint16_t * | rx_length | |
| enum bmp280_status_t | status | state machine status |
| float | temperature | temperature in deg Celcius |
| uint8_t * | tx_buffer | |
| union bmp280_t.__unnamed315__ |
| Data Fields | ||
|---|---|---|
| struct bmp280_i2c_t | i2c | I2C specific configuration. |
| struct bmp280_spi_t | spi | SPI specific configuration. |
Should be called in the event thread.
| bmp | The bmp280 instance |
Definition at line 157 of file bmp280.c.
References bmp280_config(), BMP280_EOC_BIT, BMP280_I2C, BMP280_ID_NB, BMP280_NVRAM_COPY_BIT, BMP280_SPI, BMP280_STATUS_CONFIGURE, BMP280_STATUS_GET_CALIB, BMP280_STATUS_IDLE, BMP280_STATUS_READ_DATA_REGS, BMP280_STATUS_READ_STATUS_REG, BMP280_STATUS_UNINIT, BMP_280, compensate_pressure(), compensate_temperature(), foo, I2CTransDone, I2CTransFailed, I2CTransSuccess, parse_calib_data(), parse_sensor_data(), SPITransDone, SPITransFailed, and SPITransSuccess.
Referenced by baro_bmp280_event().
Here is the call graph for this function:
Here is the caller graph for this function:Initialize the bmp280 sensor instance.
| bmp | The structure containing the configuration of the bmp280 instance |
Definition at line 48 of file bmp280.c.
References BMP280_SPI, BMP280_STATUS_UNINIT, foo, I2CTransDone, SPICphaEdge2, SPICpolIdleHigh, SPIDiv16, SPIDss8bit, SPIMSBFirst, SPISelectUnselect, and SPITransDone.
Referenced by baro_bmp280_init().
Here is the caller graph for this function:Should be called periodically to request sensor readings.
| bmp | The bmp280 instance |
Definition at line 101 of file bmp280.c.
References BMP280_CALIB_DATA_LEN, BMP280_CALIB_LSB_DATA_ADDR, BMP280_CHIP_ID_REG_ADDR, bmp280_config(), BMP280_DATA_START_REG_ADDR, BMP280_I2C, BMP280_P_T_DATA_LEN, bmp280_register_read(), BMP280_SPI, BMP280_STATUS_CONFIGURE, BMP280_STATUS_GET_CALIB, BMP280_STATUS_IDLE, BMP280_STATUS_READ_DATA_REGS, BMP280_STATUS_READ_STATUS_REG, BMP280_STATUS_REG_ADDR, BMP280_STATUS_UNINIT, foo, I2CTransDone, and SPITransDone.
Referenced by baro_bmp280_periodic().
Here is the call graph for this function:
Here is the caller graph for this function: