51 #ifndef MPL3115A2_I2C_ADDRESS 55 #define MPL3115A2_I2C_ADDRESS (0x60) 72 #define MPL3115A2_OS_RATIO_DEFAULT MPL3115A2_OS_RATIO_16 75 #ifndef MPL3115A2_CONVERSION_TIME 81 #define MPL3115A2_CONVERSION_TIME (514000UL) Oversample Ratio 16, conversion 66ms.
int mpl3115a2_init(mpl3115a2_t *dev, const mpl3115a2_params_t *params)
Initialize the MPL3115A2 sensor driver.
Oversample Ratio 2, conversion 10ms.
int mpl3115a2_is_ready(const mpl3115a2_t *dev)
Check for new set of measurement data.
Device descriptor for MPL3115A2 sensors.
Device configuration failed.
int mpl3115a2_read_temp(const mpl3115a2_t *dev, int16_t *temp)
Read sensor's temperature.
unsigned int i2c_t
Default i2c_t type definition.
Device MPL3115A2 not found.
Oversample Ratio 32, conversion 130ms.
int mpl3115a2_read_pressure(const mpl3115a2_t *dev, uint32_t *pres, uint8_t *status)
Read sensor's data in pressure mode.
i2c_t i2c
I2C bus the device is connected to.
uint8_t ratio
MPL3115A2 oversampling ratio.
Configuration parameters.
mpl3115a2_params_t params
device configuration parameters
I2C communication failed.
Oversample Ratio 4, conversion 18ms.
Oversample Ratio 8, conversion 34ms.
int mpl3115a2_reset(const mpl3115a2_t *dev)
Reset the MPL3115A2 sensor.
uint8_t addr
I2C bus address of the device.
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.
Oversample Ratio 1, conversion 6ms.
Oversample Ratio 128, conversion 514ms.
Oversample Ratio 64, conversion 258ms.
Low-level I2C peripheral driver interface definition.