Llibrary for the WiGo MPL3115A2, I2C Precision Altimeter sensor.

Dependents:   KL25Z_Batt_Test WIGO_MPL3115A2 Multi-Sensor SPACEmk2 ... more

30/05/2013 Added and tested the data acquisition using Interrupt. Added code for Altimeter trigger Interrupt but not yet tested.

Very basic library. Under development. Need to add in order: 1. IRQ configuration. 2. FIFO mode configuration.

Revision:
8:89ed6aeb5dbb
Parent:
6:03c24251e500
Child:
9:75a5960adf5c
diff -r 59e9ba115d0a -r 89ed6aeb5dbb MPL3115A2.h
--- a/MPL3115A2.h	Sun Aug 25 21:48:05 2013 +0000
+++ b/MPL3115A2.h	Sun Sep 22 07:04:14 2013 +0000
@@ -193,6 +193,42 @@
     */    
     void Reset( void);
 
+    /**
+    * Configure the Pressure offset.
+    * Pressure user accessible offset trim value expressed as an 8-bit 2's complement number. 
+    * The user offset registers may be adjusted to enhance accuracy and optimize the system performance. 
+    * Range is from -512 to +508 Pa, 4 Pa per LSB.
+    * In RAW output mode no scaling or offsets will be applied in the digital domain
+    *
+    * @param    offset
+    * @return   none
+    */    
+    void SetPressureOffset( char offset);
+    
+    /**
+    * Configure the Temperature offset.
+    * Temperature user accessible offset trim value expressed as an 8-bit 2's complement number. 
+    * The user offset registers may be adjusted to enhance accuracy and optimize the system performance. 
+    * Range is from -8 to +7.9375°C 0.0625°C per LSB.
+    * In RAW output mode no scaling or offsets will be applied in the digital domain
+    *
+    * @param    offset
+    * @return   none
+    */    
+    void SetTemperatureOffset( char offset);
+    
+    /**
+    * Configure the Altitude offset.
+    * Altitude Data User Offset Register (OFF_H) is expressed as a 2’s complement number in meters. 
+    * The user offset register provides user adjustment to the vertical height of the Altitude output. 
+    * The range of values are from -128 to +127 meters.
+    * In RAW output mode no scaling or offsets will be applied in the digital domain
+    *
+    * @param    offset
+    * @return   none
+    */    
+    void SetAltitudeOffset( char offset);        
+
 private:
     I2C m_i2c;
     int m_addr;