Loading...
Searching...
No Matches

Interface definition for the MPL3115A2 sensor driver. More...

Detailed Description

Interface definition for the MPL3115A2 sensor driver.

Author
Johann Fischer j.fis.nosp@m.cher.nosp@m.@phyt.nosp@m.ec.d.nosp@m.e
Sebastian Meiling s@mln.nosp@m.g.ne.nosp@m.t

Definition in file mpl3115a2.h.

#include <stdint.h>
#include <stdbool.h>
#include "periph/i2c.h"
+ Include dependency graph for mpl3115a2.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  mpl3115a2_params_t
 Configuration parameters. More...
 
struct  mpl3115a2_t
 Device descriptor for MPL3115A2 sensors. More...
 

Macros

#define MPL3115A2_I2C_ADDRESS   (0x60)
 MPL3115A2 Default Address.
 
#define MPL3115A2_CONVERSION_TIME   (514000UL)
 Maximum Conversion Time in microseconds [us].
 

Enumerations

enum  { MPL3115A2_OK , MPL3115A2_ERROR_I2C , MPL3115A2_ERROR_DEV , MPL3115A2_ERROR_CNF }
 Named return values. More...
 

Functions

int mpl3115a2_init (mpl3115a2_t *dev, const mpl3115a2_params_t *params)
 Initialize the MPL3115A2 sensor driver.
 
int mpl3115a2_reset (const mpl3115a2_t *dev)
 Reset the MPL3115A2 sensor.
 
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.
 
int mpl3115a2_is_ready (const mpl3115a2_t *dev)
 Check for new set of measurement data.
 
int mpl3115a2_read_pressure (const mpl3115a2_t *dev, uint32_t *pres, uint8_t *status)
 Read sensor's data in pressure mode.
 
int mpl3115a2_read_temp (const mpl3115a2_t *dev, int16_t *temp)
 Read sensor's temperature.
 

Oversample Ratio configuration

#define MPL3115A2_OS_RATIO_DEFAULT   MPL3115A2_OS_RATIO_16
 Default Ratio.
 
enum  {
  MPL3115A2_OS_RATIO_1 = 0 , MPL3115A2_OS_RATIO_2 , MPL3115A2_OS_RATIO_4 , MPL3115A2_OS_RATIO_8 ,
  MPL3115A2_OS_RATIO_16 , MPL3115A2_OS_RATIO_32 , MPL3115A2_OS_RATIO_64 , MPL3115A2_OS_RATIO_128
}