button

Dependencies:   BMI160 SDFileSystem USBDevice max32630fthr sd-driver

Fork of MPSMAX by Faizan Ahmad

main.h

Committer:
FaizanAhmad
Date:
2018-05-08
Revision:
2:5767f3f6909f
Parent:
1:6b969a803e1b

File content as of revision 2:5767f3f6909f:

#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 );