The friendly Operating System for the Internet of Things

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

Detailed Description

This driver uses the sensors I2C interface
Hauke Petersen

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...


#define LPS331AP_DEFAULT_ADDRESS   0x5c
 The sensors default I2C address.


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...


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 (lps331ap_t *dev)
 Read a temperature value from the given sensor, returned in m°C. More...
int lps331ap_read_pres (lps331ap_t *dev)
 Read a pressure value from the given sensor, returned in mbar. More...
int lps331ap_enable (lps331ap_t *dev)
 Enable the given sensor. More...
int lps331ap_disable (lps331ap_t *dev)
 Disable the given sensor. More...