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: mbed wave_player 4DGL-uLCD-SE MMA8452
globals.h
00001 // ============================================ 00002 // The header file for general project settings 00003 // Spring 2018 Gatech ECE2035 00004 //============================================= 00005 #ifndef GLOBAL_H 00006 #define GLOBAL_H 00007 #define NUMBUCKETS 4 00008 #define WIDTH 75 00009 #define HEIGHT 75 00010 // Include all the hardware libraries 00011 #include "mbed.h" 00012 #include "wave_player.h" 00013 #include "MMA8452.h" 00014 #include "uLCD_4DGL.h" 00015 #include "SDFileSystem.h" 00016 00017 // Declare the hardware interface objects 00018 extern uLCD_4DGL uLCD; // LCD Screen 00019 //extern SDFileSystem sd; // SD Card 00020 extern Serial pc; // USB Console output 00021 extern MMA8452 acc; // Accelerometer 00022 extern DigitalIn button1; // Pushbuttons 00023 extern DigitalIn button2; 00024 extern DigitalIn button3; 00025 extern AnalogOut DACout; // Speaker 00026 extern PwmOut speaker; 00027 extern wave_player waver; 00028 00029 // === [define the macro of error heandle function] === 00030 // when the condition (c) is not true, assert the program and show error code 00031 #define ASSERT_P(c,e) do { \ 00032 if(!(c)){ \ 00033 pc.printf("\nERROR:%d\n",e); \ 00034 while(1); \ 00035 } \ 00036 } while (0) 00037 00038 // === [error code] === 00039 #define ERROR_NONE 0 // All good in the hood 00040 #define ERROR_MEH -1 // This is how errors are done 00041 00042 #endif //GLOBAL_H
Generated on Thu Jul 14 2022 01:43:17 by
1.7.2