B+IMU+SD

Dependencies:   BMI160 RTC SDFileSystem USBDevice max32630fthr

Fork of MPSMAXbutton by Faizan Ahmad

Revision:
1:6b969a803e1b
Parent:
0:769c5a7b3939
diff -r 769c5a7b3939 -r 6b969a803e1b main.h
--- a/main.h	Mon May 07 21:28:03 2018 +0000
+++ b/main.h	Tue May 08 13:45:29 2018 +0000
@@ -1,9 +1,65 @@
 #include <string.h>
 #include "sc_types.h"
+#include    "max32630fthr.h"
+#include "bmi160.h"
+#include    <stdlib.h>
+
+typedef struct{
+    int x[10];
+    int t[10];
+    int pos;
+}Function;
+
+
+
+//extern objects  here
+extern MAX32630FTHR pegasus;
+extern RawSerial pc;
+extern DigitalOut rLED;
+extern DigitalOut gLED;
+extern DigitalIn buttonIn;
+extern InterruptIn buttonInt;
+
+// extern Maxim maxim;
+
+extern I2C i2cBus;
+extern BMI160_I2C imu;
+
+//extern variables here
+extern int functionFileNumber;
+extern Function ffunc;
+extern int functionActive;
+extern int functionPosition;
+extern time_t timealarm;
+
+
+#if (MBED_MAJOR_VERSION == 2)
+    #include    "SDFileSystem.h"
+#elif (MBED_MAJOR_VERSION == 5)
+    #include    "SDBlockDevice.h"
+    #include    "FATFileSystem.h"
+#endif
+
+#if (MBED_MAJOR_VERSION == 2)
+    extern SDFileSystem    sd;  // do,di,clk,cs
+#elif (MBED_MAJOR_VERSION == 5)
+    //SDBlockDevice   sd(D11, D12, D13, D10, 8000000);
+    extern SDBlockDevice   sd;    // For MAX32630FTHR 
+    extern FATFileSystem   fs;
+#endif
+
+void PressedMenu();
+void PressedBack();
+void PressedUp();
+void PressedDown();
+void PressedReset();
+void MPSButtons();
+
+
 
 /*Global variable*/
 extern bool is_smactive;
 
 /*function declaration*/
 
-extern void PrintStatus_Serial(int val );
\ No newline at end of file
+extern void PrintStatus_Serial(int val );