Max Houghton
/
MazeGame_el15mh
el15mh 200929957
main.cpp@3:02653cb1c8f8, 2017-04-02 (annotated)
- Committer:
- el15mh
- Date:
- Sun Apr 02 13:13:40 2017 +0000
- Revision:
- 3:02653cb1c8f8
- Parent:
- 2:a488caea1601
- Child:
- 4:66ab008f7b06
menu test using menu class;
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
el15mh | 0:d7701c5c20e6 | 1 | #include "mbed.h" |
el15mh | 0:d7701c5c20e6 | 2 | #include "N5110.h" |
el15mh | 0:d7701c5c20e6 | 3 | #include "Gamepad.h" |
el15mh | 3:02653cb1c8f8 | 4 | #include "Menu.h" |
el15mh | 0:d7701c5c20e6 | 5 | |
el15mh | 0:d7701c5c20e6 | 6 | // CREATE OBJECTS // |
el15mh | 0:d7701c5c20e6 | 7 | N5110 lcd(PTC9,PTC0,PTC7,PTD2,PTD1,PTC11); |
el15mh | 0:d7701c5c20e6 | 8 | Gamepad pad; |
el15mh | 3:02653cb1c8f8 | 9 | Menu menu; |
el15mh | 0:d7701c5c20e6 | 10 | |
el15mh | 0:d7701c5c20e6 | 11 | // FUNCTION PROTOTYPES // |
el15mh | 0:d7701c5c20e6 | 12 | void init(); |
el15mh | 2:a488caea1601 | 13 | |
el15mh | 0:d7701c5c20e6 | 14 | |
el15mh | 0:d7701c5c20e6 | 15 | int main() |
el15mh | 0:d7701c5c20e6 | 16 | { |
el15mh | 0:d7701c5c20e6 | 17 | init(); // initialise devices |
el15mh | 0:d7701c5c20e6 | 18 | |
el15mh | 2:a488caea1601 | 19 | printf("Devices initialised \n"); |
el15mh | 2:a488caea1601 | 20 | |
el15mh | 2:a488caea1601 | 21 | while(1) { |
el15mh | 0:d7701c5c20e6 | 22 | |
el15mh | 3:02653cb1c8f8 | 23 | menu.main(); |
el15mh | 1:8ce2586b5965 | 24 | |
el15mh | 0:d7701c5c20e6 | 25 | } |
el15mh | 0:d7701c5c20e6 | 26 | } |
el15mh | 0:d7701c5c20e6 | 27 | |
el15mh | 2:a488caea1601 | 28 | |
el15mh | 1:8ce2586b5965 | 29 | void init() |
el15mh | 0:d7701c5c20e6 | 30 | { |
el15mh | 1:8ce2586b5965 | 31 | lcd.init(); |
el15mh | 1:8ce2586b5965 | 32 | pad.init(); |
el15mh | 0:d7701c5c20e6 | 33 | } |
el15mh | 2:a488caea1601 | 34 |