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.
Diff: MPL3115A2.cpp
- Revision:
- 7:59e9ba115d0a
- Parent:
- 6:03c24251e500
- Child:
- 8:89ed6aeb5dbb
diff -r 03c24251e500 -r 59e9ba115d0a MPL3115A2.cpp
--- a/MPL3115A2.cpp Thu Aug 22 14:52:16 2013 +0000
+++ b/MPL3115A2.cpp Sun Aug 25 21:48:05 2013 +0000
@@ -24,16 +24,16 @@
*
* :: The Altitude Trigger use the IRQ1.
*
-* Altitude Trigger -- MPL3115A2_Int1.fall --- AltitudeTrg_IRQ --- user1_fptr
+* Altitude Trigger -- MPL3115A2_Int1.fall --- AltitudeTrg_IRQ --- MPL3115A2_usr1_fptr
*
*
* :: The Data ready use the IRQ2.
*
-* Data Ready -- MPL3115A2_Int2.fall --- DataReady_IRQ --- user2_fptr
+* Data Ready -- MPL3115A2_Int2.fall --- DataReady_IRQ --- MPL3115A2_usr2_fptr
*
*/
-void (*user2_fptr)(void); // Pointers to user function called after
-void (*user1_fptr)(void); // IRQ assertion.
+void (*MPL3115A2_usr2_fptr)(void); // Pointers to user function called after
+void (*MPL3115A2_usr1_fptr)(void); // IRQ assertion.
//
InterruptIn MPL3115A2_Int1( PTD4); // INT1
@@ -43,8 +43,8 @@
MPL3115A2_mode = BAROMETRIC_MODE;
MPL3115A2_oversampling = OVERSAMPLE_RATIO_1;
//
- user1_fptr = NULL;
- user2_fptr = NULL;
+ MPL3115A2_usr1_fptr = NULL;
+ MPL3115A2_usr2_fptr = NULL;
MPL3115A2_Int1.fall( NULL);
MPL3115A2_Int2.fall( NULL);
}
@@ -102,7 +102,7 @@
data[1] |= 0x01;
writeRegs(data, 2);
- user2_fptr = fptr;
+ MPL3115A2_usr2_fptr = fptr;
MPL3115A2_Int2.fall( this, &MPL3115A2::DataReady_IRQ);
}
@@ -112,7 +112,7 @@
// Clear the IRQ flag
getStatus();
// Run the user supplied function
- user2_fptr();
+ MPL3115A2_usr2_fptr();
}
void MPL3115A2::AltitudeTrigger( void(*fptr)(void), unsigned short level)
@@ -158,7 +158,7 @@
data[1] = 0x81 | (MPL3115A2_oversampling<<3);
writeRegs(data, 2);
- user1_fptr = fptr;
+ MPL3115A2_usr1_fptr = fptr;
MPL3115A2_Int1.fall( this, &MPL3115A2::AltitudeTrg_IRQ);
}
@@ -168,7 +168,7 @@
// Clear the IRQ flag
getStatus();
// Run the user supplied function
- user1_fptr();
+ MPL3115A2_usr1_fptr();
}