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.cpp
- Revision:
- 11:8c90a97b1036
- Parent:
- 10:82ac06669316
--- a/MPL3115A2.cpp Tue Sep 24 20:22:25 2013 +0000
+++ b/MPL3115A2.cpp Fri Jul 25 11:34:09 2014 +0000
@@ -33,28 +33,14 @@
#define PDR_STATUS 0x02 // Pressure and Altitude data ready
#define TDR_STATUS 0x01 // Temperature data ready
-/** 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
-*
-*/
+
void (*MPL3115A2_usr2_fptr)(void); // Pointers to user function called after
void (*MPL3115A2_usr1_fptr)(void); // IRQ assertion.
-//
-InterruptIn MPL3115A2_Int1( PTD4); // INT1
-InterruptIn MPL3115A2_Int2( PTA12); // INT2
-MPL3115A2::MPL3115A2(PinName sda, PinName scl, int addr) : m_i2c(sda, scl), m_addr(addr) {
+MPL3115A2::MPL3115A2(PinName sda, PinName scl, int addr, PinName int1, PinName int2) : m_i2c(sda, scl), m_addr(addr), MPL3115A2_Int1(int1), MPL3115A2_Int2(int2) {
unsigned char data[6];
-
+
MPL3115A2_mode = BAROMETRIC_MODE;
MPL3115A2_oversampling = OVERSAMPLE_RATIO_1;
//
