B+IMU+SD
Dependencies: BMI160 RTC SDFileSystem USBDevice max32630fthr
Fork of MPSMAXbutton by
Diff: main.h
- Revision:
- 3:bd223559f79b
- Parent:
- 0:769c5a7b3939
--- a/main.h Mon May 07 21:28:03 2018 +0000 +++ b/main.h Wed May 09 11:01:18 2018 +0000 @@ -1,9 +1,54 @@ #include <string.h> #include "sc_types.h" +#include "max32630fthr.h" +#include <stdlib.h> +#include "bmi160.h" +#include "files.h" + +/*extern MAX32630FTHR pegasus; +extern Serial _serialport; +extern DigitalOut LED; +extern DigitalOut Ctrl; + +extern DigitalOut rLED; +extern DigitalOut gLED;*/ +//typedef struct { +// int x[10]; +// int t[10]; +// int pos; +//} Function; + + +// 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 + /*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 );