36 #define LPS331AP_DEFAULT_ADDRESS 0x5c
Device descriptor for LPS331AP sensors.
int lps331ap_init(lps331ap_t *dev, i2c_t i2c, uint8_t address, lps331ap_rate_t rate)
Initialize a given LPS331AP pressure sensor.
unsigned int i2c_t
Default i2c_t type definition.
tell sensor to sample with this rate
I2C bus the sensor is connected to.
int lps331ap_read_temp(const lps331ap_t *dev)
Read a temperature value from the given sensor, returned in m°C.
I2C device the sensor is connected to.
I2C bus address of the sensor.
int lps331ap_read_pres(const lps331ap_t *dev)
Read a pressure value from the given sensor, returned in mbar.
int lps331ap_enable(const lps331ap_t *dev)
Enable the given sensor.
Possible sampling rates for LPS331AP sensors.
the devices address on the bus
int lps331ap_disable(const lps331ap_t *dev)
Disable the given sensor.
Struct holding all parameters needed for device initialization.
Low-level I2C peripheral driver interface definition.