B+IMU+SD

Dependencies:   BMI160 RTC SDFileSystem USBDevice max32630fthr sd-driver

Fork of MPSMAXbutton by Faizan Ahmad

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers main.h Source File

main.h

00001 #include <string.h>
00002 #include "sc_types.h"
00003 #include    "max32630fthr.h"
00004 #include    <stdlib.h>
00005 #include "bmi160.h"
00006 #include "files.h"
00007 
00008 /*extern MAX32630FTHR pegasus;
00009 extern Serial _serialport;
00010 extern DigitalOut LED;
00011 extern DigitalOut Ctrl;
00012 
00013 extern DigitalOut rLED;
00014 extern DigitalOut gLED;*/
00015 //typedef struct {
00016 //    int x[10];
00017 //    int t[10];
00018 //    int pos;
00019 //} Function;
00020 
00021 
00022 // extern Maxim maxim;
00023 extern I2C i2cBus;
00024 extern BMI160_I2C imu;
00025 
00026 //extern variables here
00027 extern int functionFileNumber;
00028 extern Function ffunc;
00029 extern int functionActive;
00030 extern int functionPosition;
00031 extern time_t timealarm;
00032 
00033 #if (MBED_MAJOR_VERSION == 2)
00034 #include    "SDFileSystem.h"
00035 #elif (MBED_MAJOR_VERSION == 5)
00036 #include    "SDBlockDevice.h"
00037 #include    "FATFileSystem.h"
00038 #endif
00039 
00040 #if (MBED_MAJOR_VERSION == 2)
00041 extern SDFileSystem    sd;  // do,di,clk,cs
00042 #elif (MBED_MAJOR_VERSION == 5)
00043 //SDBlockDevice   sd(D11, D12, D13, D10, 8000000);
00044 extern SDBlockDevice   sd;    // For MAX32630FTHR
00045 extern FATFileSystem   fs;
00046 #endif
00047 
00048 
00049 /*Global variable*/
00050 extern bool is_smactive;
00051 
00052 /*function declaration*/
00053 
00054 extern void PrintStatus_Serial(int val );