Detailed Description

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

Go to the source code of this file.

Data Structures

struct  lpsxxx_params_t
 Struct holding all parameters needed for device initialization. More...
 
struct  lpsxxx_t
 Device descriptor for LPSXXX sensors. More...
 

Macros

#define LPSXXX_DEFAULT_ADDRESS   (0x5d)
 The sensors default I2C address. More...
 
#define LPSXXX_DEFAULT_RATE   (LPSXXX_RATE_25HZ)
 The sensors default output data rate (ODR)
 

Enumerations

enum  { LPSXXX_OK, LPSXXX_ERR_NODEV, LPSXXX_ERR_I2C }
 Return codes. More...
 
enum  lpsxxx_rate_t { LPSXXX_RATE_1HZ = 1 }
 Possible sampling rates for LPS331AP sensors. More...
 

Functions

int lpsxxx_init (lpsxxx_t *dev, const lpsxxx_params_t *params)
 Initialize a given LPSXXX pressure sensor. More...
 
int lpsxxx_read_temp (const lpsxxx_t *dev, int16_t *temp)
 Read a temperature value from the given sensor, returned in c°C. More...
 
int lpsxxx_read_pres (const lpsxxx_t *dev, uint16_t *pres)
 Read a pressure value from the given sensor, returned in hPa. More...
 
int lpsxxx_enable (const lpsxxx_t *dev)
 Enable the given sensor. More...
 
int lpsxxx_disable (const lpsxxx_t *dev)
 Disable the given sensor. More...