Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: sensor AerCloud_MutliTech_Socket_Modem_Example Freescale_Multi-Sensor_Shield 2lemetry_Sensor_Example ... more
Fork of MPL3115A2 by
Diff: MPL3115A2.h
- Revision:
- 11:8c90a97b1036
- Parent:
- 10:82ac06669316
--- a/MPL3115A2.h Tue Sep 24 20:22:25 2013 +0000
+++ b/MPL3115A2.h Fri Jul 25 11:34:09 2014 +0000
@@ -56,13 +56,21 @@
{
public:
/**
- * MPL3115A2 constructor
- *
- * @param sda SDA pin
- * @param sdl SCL pin
- * @param addr addr of the I2C peripheral
- */
- MPL3115A2(PinName sda, PinName scl, int addr);
+ * MPL3115A2 constructor
+ *
+ * @param sda SDA pin
+ * @param sdl SCL pin
+ * @param addr addr of the I2C peripheral
+ * @param int1 InterruptIn
+ * @param int2 InterruptIn
+ *
+ * Interrupt schema:
+ *
+ * * The Altitude Trigger use the IRQ1 - Altitude Trigger -> MPL3115A2_Int1.fall -> AltitudeTrg_IRQ -> MPL3115A2_usr1_fptr
+ *
+ * * The Data ready use the IRQ2 - Data Ready -> MPL3115A2_Int2.fall -> DataReady_IRQ -> MPL3115A2_usr2_fptr
+ */
+ MPL3115A2(PinName sda, PinName scl, int addr, PinName int1, PinName int2);
/**
* Get the value of the WHO_AM_I register
@@ -256,6 +264,9 @@
private:
I2C m_i2c;
int m_addr;
+ InterruptIn MPL3115A2_Int1;
+ InterruptIn MPL3115A2_Int2;
+
unsigned char MPL3115A2_mode;
unsigned char MPL3115A2_oversampling;
void DataReady_IRQ( void);
