77 #if defined(MODULE_ABP2_SPI)
80 #elif defined(MODULE_ABP2_I2C)
83 #error "ABP2 driver >> Please add a valid module: either abp2_spi or abp2_i2c"
90 #if defined(MODULE_ABP2_I2C)
97 #define ABP2_ADDR_DEFAULT (0x28)
118 #define ABP2_STATUS_BUSY 0x20
119 #define ABP2_STATUS_MEMERR 0x04
120 #define ABP2_STATUS_MATHSAT 0x01
122 #define ABP2_STATUS_MASK (ABP2_STATUS_BUSY | ABP2_STATUS_MEMERR | ABP2_STATUS_MATHSAT)
133 #if defined(MODULE_ABP2_SPI)
Low-level GPIO peripheral driver interface definitions.
int abp2_measure(const abp2_t *dev)
Let the sensor make one measurement.
int abp2_init(abp2_t *dev, const abp2_params_t *params)
Initialize the ABP2 sensor.
int abp2_read(const abp2_t *dev, int32_t *press, int32_t *temp)
Measure pressure and temperature (blocking version).
int abp2_read_raw(const abp2_t *dev, abp2_raw_t *raw_values)
Read pressure and temperature raw values.
struct abp2_raw abp2_raw_t
Raw values read from a ABP2 sensor.
uint8_t abp2_getstatus(const abp2_t *dev)
Read the status byte of the sensor.
int abp2_measure_read(const abp2_t *dev, abp2_raw_t *raw_values)
Start measurement and read previous pressure and temperature raw values.
int32_t abp2_pressure(const abp2_t *dev, const abp2_raw_t *raw_values)
Convert ADC counts to pressure.
struct abp2_params abp2_params_t
Parameters for ABP2 sensors.
int abp2_read_nb(const abp2_t *dev, int32_t *press, int32_t *temp)
Measure pressure and temperature (non-blocking version).
struct abp2 abp2_t
Device descriptor for ABP2 sensors.
int32_t abp2_temperature(const abp2_t *dev, const abp2_raw_t *raw_values)
Convert ADC counts to temperature .
uint_fast8_t i2c_t
Default i2c_t type definition.
gpio_t spi_cs_t
Chip select pin type overlaps with gpio_t so it can be casted to this.
Low-level I2C peripheral driver interface definition.
Low-level SPI peripheral driver interface definition.
Parameters for ABP2 sensors.
i2c_t i2c
I2C bus the device is connected to.
int32_t rangeMax
Maximum pressure range (thousandths of sensor unit).
int32_t rangeMin
Minimum pressure range (thousandths of sensor unit).
Raw values read from a ABP2 sensor.
uint32_t cntTemp
24-bit digital temperature reading (counts).
uint32_t cntPress
24-bit digital pressure reading (counts).
Device descriptor for ABP2 sensors.
const abp2_params_t * params
Sensor parameters.
Functionality for reading [S]ensor [A]ctuator [U]ber [L]ayer sensors as SenML.