Go to the documentation of this file.
52 #ifndef CONFIG_LPSXXX_DEFAULT_ADDRESS
53 #define CONFIG_LPSXXX_DEFAULT_ADDRESS (0x5d)
73 LPSXXX_RATE_12HZ5 = 6,
77 LPSXXX_RATE_12HZ5 = 3,
90 #if MODULE_LPS331AP || MODULE_LPS25HB
91 #define LPSXXX_DEFAULT_RATE (LPSXXX_RATE_7HZ)
93 #define LPSXXX_DEFAULT_RATE (LPSXXX_RATE_25HZ)
@ LPSXXX_ERR_I2C
An error occurred on the I2C bus.
@ LPSXXX_OK
Everything was fine.
@ LPSXXX_ERR_NODEV
No valid device found.
lpsxxx_params_t params
device initialization parameters
int lpsxxx_read_pres(const lpsxxx_t *dev, uint16_t *pres)
Read a pressure value from the given sensor, returned in hPa.
uint8_t addr
the devices address on the bus
unsigned int i2c_t
Default i2c_t type definition.
i2c_t i2c
I2C bus the sensor is connected to.
lpsxxx_rate_t rate
tell sensor to sample with this rate
int lpsxxx_disable(const lpsxxx_t *dev)
Disable the given sensor.
@ LPSXXX_RATE_1HZ
sample with 1Hz
int lpsxxx_init(lpsxxx_t *dev, const lpsxxx_params_t *params)
Initialize a given LPSXXX pressure sensor.
lpsxxx_rate_t
Possible sampling rates for LPS331AP sensors.
Struct holding all parameters needed for device initialization.
int lpsxxx_read_temp(const lpsxxx_t *dev, int16_t *temp)
Read a temperature value from the given sensor, returned in c°C.
Device descriptor for LPSXXX sensors.
int lpsxxx_enable(const lpsxxx_t *dev)
Enable the given sensor.
Low-level I2C peripheral driver interface definition.