Go to the documentation of this file.
56 #define MPL3115A2_I2C_ADDRESS (0x60)
72 #define MPL3115A2_OS_RATIO_DEFAULT MPL3115A2_OS_RATIO_16
85 #ifndef MPL3115A2_CONVERSION_TIME
86 #define MPL3115A2_CONVERSION_TIME (514000UL)
@ MPL3115A2_ERROR_DEV
Device MPL3115A2 not found.
int mpl3115a2_is_ready(const mpl3115a2_t *dev)
Check for new set of measurement data.
int mpl3115a2_read_temp(const mpl3115a2_t *dev, int16_t *temp)
Read sensor's temperature.
Device descriptor for MPL3115A2 sensors.
@ MPL3115A2_OS_RATIO_1
Oversample Ratio 1, conversion 6ms.
uint8_t ratio
MPL3115A2 oversampling ratio.
@ MPL3115A2_OS_RATIO_2
Oversample Ratio 2, conversion 10ms.
unsigned int i2c_t
Default i2c_t type definition.
int mpl3115a2_init(mpl3115a2_t *dev, const mpl3115a2_params_t *params)
Initialize the MPL3115A2 sensor driver.
@ MPL3115A2_OS_RATIO_8
Oversample Ratio 8, conversion 34ms.
int mpl3115a2_read_pressure(const mpl3115a2_t *dev, uint32_t *pres, uint8_t *status)
Read sensor's data in pressure mode.
Configuration parameters.
@ MPL3115A2_OS_RATIO_4
Oversample Ratio 4, conversion 18ms.
mpl3115a2_params_t params
device configuration parameters
uint8_t addr
I2C bus address of the device.
@ MPL3115A2_OS_RATIO_128
Oversample Ratio 128, conversion 514ms.
@ MPL3115A2_OS_RATIO_16
Oversample Ratio 16, conversion 66ms.
@ MPL3115A2_OS_RATIO_32
Oversample Ratio 32, conversion 130ms.
@ MPL3115A2_ERROR_I2C
I2C communication failed.
int mpl3115a2_set_active(const mpl3115a2_t *dev)
Set active mode, this enables periodic measurements.
int mpl3115a2_set_standby(const mpl3115a2_t *dev)
Set standby mode.
Low-level I2C peripheral driver interface definition.
i2c_t i2c
I2C bus the device is connected to.
int mpl3115a2_reset(const mpl3115a2_t *dev)
Reset the MPL3115A2 sensor.
@ MPL3115A2_ERROR_CNF
Device configuration failed.
@ MPL3115A2_OS_RATIO_64
Oversample Ratio 64, conversion 258ms.