Device driver interface for the LPS331AP pressure sensor. More...

Detailed Description

Note
This driver uses the sensors I2C interface
Author
Hauke Petersen hauke.nosp@m..pet.nosp@m.ersen.nosp@m.@fu-.nosp@m.berli.nosp@m.n.de

Definition in file lps331ap.h.

#include <stdint.h>
#include "periph/i2c.h"
+ Include dependency graph for lps331ap.h:

Go to the source code of this file.

Data Structures

struct  lps331ap_t
 Device descriptor for LPS331AP sensors. More...
 
struct  lps331ap_params_t
 Struct holding all parameters needed for device initialization. More...
 

Macros

#define LPS331AP_DEFAULT_ADDRESS   0x5c
 The sensors default I2C address.
 

Enumerations

enum  lps331ap_rate_t { LPS331AP_RATE_1HZ = 1, LPS331AP_RATE_7HZ = 5, LPS331AP_RATE_12HZ5 = 6, LPS331AP_RATE_25HZ = 7 }
 Possible sampling rates for LPS331AP sensors. More...
 

Functions

int lps331ap_init (lps331ap_t *dev, i2c_t i2c, uint8_t address, lps331ap_rate_t rate)
 Initialize a given LPS331AP pressure sensor. More...
 
int lps331ap_read_temp (const lps331ap_t *dev)
 Read a temperature value from the given sensor, returned in m°C. More...
 
int lps331ap_read_pres (const lps331ap_t *dev)
 Read a pressure value from the given sensor, returned in mbar. More...
 
int lps331ap_enable (const lps331ap_t *dev)
 Enable the given sensor. More...
 
int lps331ap_disable (const lps331ap_t *dev)
 Disable the given sensor. More...