Llibrary for the WiGo MPL3115A2, I2C Precision Altimeter sensor. This is a temp fork

Dependents:   sensor AerCloud_MutliTech_Socket_Modem_Example Freescale_Multi-Sensor_Shield 2lemetry_Sensor_Example ... more

Fork of MPL3115A2 by clemente di caprio

Revision:
9:75a5960adf5c
Parent:
8:89ed6aeb5dbb
Child:
10:82ac06669316
--- a/MPL3115A2.h	Sun Sep 22 07:04:14 2013 +0000
+++ b/MPL3115A2.h	Sun Sep 22 11:17:28 2013 +0000
@@ -146,6 +146,22 @@
     unsigned int  getAllData( float *f);
 
     /**
+    * Get the altimeter or pressure and temperature captured maximum value
+    *
+    * @param array of float f[2]
+    * @returns 0 no data available, 1 for data available
+    */
+    void getAllMaximumData( float *f);
+
+    /**
+    * Get the altimeter or pressure and temperature captured minimum value
+    *
+    * @param array of float f[2]
+    * @returns 0 no data available, 1 for data available
+    */
+    void getAllMinimumData( float *f);
+
+    /**
     * Get the altimeter or pressure, and temperature values in raw mode
     *
     * @param array of unsigned char[5]
@@ -245,6 +261,33 @@
     */
     void Standby( void);
     
+    /** Get the altimiter value from the sensor.
+    *
+    * @param    reg the register from which read the data. 
+    *           Can be: REG_ALTIMETER_MSB for altimeter value
+    *                   REG_ALTI_MIN_MSB for the minimum value captured
+    *                   REG_ALTI_MAX_MSB for the maximum value captured
+    */
+    float getAltimeter( unsigned char reg);    
+
+    /** Get the pressure value from the sensor.
+    *
+    * @param    reg the register from which read the data. 
+    *           Can be: REG_PRESSURE_MSB for altimeter value
+    *                   REG_PRES_MIN_MSB for the minimum value captured
+    *                   REG_PRES_MAX_MSB for the maximum value captured
+    */    
+    float getPressure( unsigned char reg);
+
+    /** Get the altimiter value from the sensor.
+    *
+    * @param    reg the register from which read the data. 
+    *           Can be: REG_TEMP_MSB for altimeter value
+    *                   REG_TEMP_MIN_MSB for the minimum value captured
+    *                   REG_TEMP_MAX_MSB for the maximum value captured
+    */
+    float getTemperature( unsigned char reg);
+    
     void readRegs(int addr, uint8_t * data, int len);
     void writeRegs(uint8_t * data, int len);