ELEC2645 (2018/19) / Mbed 2 deprecated el17lw

Dependencies:   mbed

main.cpp

Committer:
lewisgw
Date:
2019-04-20
Revision:
21:20478f086bc2
Parent:
12:ebaefda53dd0
Child:
26:4253656c0755

File content as of revision 21:20478f086bc2:

/*
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 "mbed.h"
#include "Menu.h"

N5110 lcd(PTC9,PTC0,PTC7,PTD2,PTD1,PTC11);
Gamepad gamepad;
Menu menu;

void init_game();

int main() {
  init_game();
  while(1) { 
    lcd.clear();  
    menu.run(lcd, gamepad);   
    lcd.refresh();
    wait(0.01); 
  }     
}  
 
void init_game() {
  gamepad.init();
  menu.init(); 
  lcd.init(); 
  lcd.setContrast(0.5); 
  lcd.normalMode();      
  lcd.setBrightness(0.5); 
}