Ikenna Adrian Ozoemena 201157039
Dependencies: mbed
Diff: main.h
- Revision:
- 1:9835d6304284
- Child:
- 2:66a4e5d7a7cd
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.h Wed Feb 27 05:40:31 2019 +0000 @@ -0,0 +1,37 @@ +#ifndef MAIN_H +#define MAIN_H + +// include the different header files +#include "mbed.h" +#include "N5110.h" +#include "ShiftReg.h" +#include "Gamepad" +#include "FXOS8700CQ" + + +// extern tells the compiler that these objects are defined in a different file (main.cpp). +// It stops them being defined multiple times when other files include main.h. +// Here we only declare them. They are defined (with pin numbers etc.) in main.cpp +extern DigitalIn a_button; +extern DigitalIn b_button; +extern DigitalIn x_button; +extern DigitalIn y_button; +extern DigitalIn l_button; +extern DigitalIn r_button; +extern DigitalIn back_button; +extern DigitalIn start_button; + +extern N5110 lcd; +extern BusOut leds; + +extern AnalogIn pot; + +extern Tone dac; +extern ShiftReg shift; + +// function prototypes +void init(); +void print_menu(); +void welcome(); + +#endif \ No newline at end of file