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
Diff: main.cpp
- Revision:
- 12:ebaefda53dd0
- Parent:
- 9:fff2009f826e
- Child:
- 21:20478f086bc2
--- a/main.cpp Thu Mar 28 21:27:05 2019 +0000 +++ b/main.cpp Mon Apr 01 18:06:55 2019 +0000 @@ -1,42 +1,47 @@ -/* -ELEC2645 Embedded Systems Project -School of Electronic & Electrical Engineering University of Leeds -Name: Lewis Wooltorton -Username: el17lw -Student ID Number: 201122085 Date: March 2019 -*/ - -#include "N5110.h" -#include "Gamepad.h" -#include "Menu.h" -#include "mbed.h" - -N5110 lcd(PTC9,PTC0,PTC7,PTD2,PTD1,PTC11); -Gamepad gamepad; -Menu menu; - -void init_game(); -void run_game(); - -int main() { - init_game(); - while(1) { - lcd.clear(); - run_game(); - lcd.refresh(); - wait(0.01); - } -} - -void init_game() { - gamepad.init(); - menu.init(); - lcd.init(); - lcd.setContrast(0.5); - lcd.normalMode(); - lcd.setBrightness(0.5); -} - -void run_game() { - menu.run_game_engine(lcd, gamepad); -} \ No newline at end of file +/* +ELEC2645 Embedded Systems Project +School of Electronic & Electrical Engineering University of Leeds +Name: Lewis Wooltorton +Username: el17lw +Student ID Number: 201122085 Date: March 2019 +*/ + +#include "N5110.h" +#include "Gamepad.h" +#include "EngineController.h" +#include "mbed.h" +#include "Menu.h" + +N5110 lcd(PTC9,PTC0,PTC7,PTD2,PTD1,PTC11); +Gamepad gamepad; +Menu menu; +//EngineController controller; + +void init_game(); +void run_game(); + +int main() { + init_game(); + while(1) { + lcd.clear(); + menu.run(lcd, gamepad); + //run_game(); + lcd.refresh(); + wait(0.01); + } +} + +void init_game() { + gamepad.init(); + menu.init(); + //controller.init(); + lcd.init(); + lcd.setContrast(0.5); + lcd.normalMode(); + lcd.setBrightness(0.5); +} + +void run_game() { + //controller.run_game_engine(lcd, gamepad); + // menu.run(lcd, gamepad); +}