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.
Dependencies: C12832 MMA7660 mbed
Diff: accel.cpp
- Revision:
- 4:d61f6d186db0
- Parent:
- 1:2967eac08981
- Child:
- 5:614e3ac042df
diff -r 9eed3fe0238b -r d61f6d186db0 accel.cpp
--- a/accel.cpp Wed Feb 21 09:25:48 2018 +0000
+++ b/accel.cpp Wed Mar 07 10:57:16 2018 +0000
@@ -6,18 +6,18 @@
DigitalOut Zaxis_n(LED3);
MMA7660 MMA(p28, p27);
-void _Initialize(void) {
+static void _Initialize(void) {
Zaxis_p = 0;
Zaxis_n = 0;
}
-void _Process(void) {
+static void _Process(void) {
Zaxis_p = MMA.z();
Zaxis_n = -MMA.z();
}
-void _Finalize(void) {
+static void _Finalize(void) {
_Initialize();
}
-COMMAND_DEFINE Command_accel = {"accel", 0x02, _Initialize, _Finalize, _lProcess};
+COMMAND_DEFINE Command_accel = {"accel", 0x02, _Initialize, _Finalize, _Process};