Device driver for the LPSXXX pressure sensor family (LPS331AP/LPS25HB/LPS22HB)  
More...
Device driver for the LPSXXX pressure sensor family (LPS331AP/LPS25HB/LPS22HB) 
This driver provides [S]ensor [A]ctuator [U]ber [L]ayer capabilities.
- Note
 - This driver uses the sensors I2C interface 
 
◆ anonymous enum
Return codes. 
| Enumerator | 
|---|
| LPSXXX_OK  | Everything was fine.  
 | 
| LPSXXX_ERR_NODEV  | No valid device found.  
 | 
| LPSXXX_ERR_I2C  | An error occurred on the I2C bus.  
 | 
Definition at line 59 of file lpsxxx.h.
 
 
◆ lpsxxx_rate_t
Possible sampling rates for LPS331AP sensors. 
| Enumerator | 
|---|
| LPSXXX_RATE_1HZ  | sample with 1Hz  
 | 
Definition at line 68 of file lpsxxx.h.
 
 
◆ lpsxxx_disable()
      
        
          | int lpsxxx_disable  | 
          ( | 
          const lpsxxx_t *  | 
          dev | ) | 
           | 
        
      
 
Disable the given sensor. 
- Parameters
 - 
  
    | [in] | dev | device descriptor of sensor to disable | 
  
   
- Returns
 - LPSXXX_OK on success 
 
- 
-LPSXXX_ERR_I2C on I2C error 
 
 
 
◆ lpsxxx_enable()
      
        
          | int lpsxxx_enable  | 
          ( | 
          const lpsxxx_t *  | 
          dev | ) | 
           | 
        
      
 
Enable the given sensor. 
- Parameters
 - 
  
    | [in] | dev | device descriptor of sensor to enable | 
  
   
- Returns
 - LPSXXX_OK on success 
 
- 
-LPSXXX_ERR_I2C on I2C error 
 
 
 
◆ lpsxxx_init()
Initialize a given LPSXXX pressure sensor. 
- Parameters
 - 
  
    | [out] | dev | device descriptor of the sensor  | 
    | [in] | params | initialization parameters | 
  
   
- Returns
 - LPSXXX_OK on success 
 
- 
-LPSXXX_ERR_NODEV if no valid device found 
 
- 
-LPSXXX_ERR_I2C on I2C error 
 
 
 
◆ lpsxxx_read_pres()
      
        
          | int lpsxxx_read_pres  | 
          ( | 
          const lpsxxx_t *  | 
          dev,  | 
        
        
           | 
           | 
          uint16_t *  | 
          pres  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
Read a pressure value from the given sensor, returned in hPa. 
- Parameters
 - 
  
    | [in] | dev | device descriptor of sensor to read from  | 
    | [out] | pres | pressure value in hPa | 
  
   
- Returns
 - LPSXXX_OK on success 
 
- 
-LPSXXX_ERR_I2C on I2C error 
 
 
 
◆ lpsxxx_read_temp()
      
        
          | int lpsxxx_read_temp  | 
          ( | 
          const lpsxxx_t *  | 
          dev,  | 
        
        
           | 
           | 
          int16_t *  | 
          temp  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
Read a temperature value from the given sensor, returned in c°C. 
- Parameters
 - 
  
    | [in] | dev | device descriptor of sensor to read from  | 
    | [out] | temp | temperature value in c°C | 
  
   
- Returns
 - LPSXXX_OK on success 
 
- 
-LPSXXX_ERR_I2C on I2C error