Yang Zhenye 201199680

Dependencies:   mbed

Committer:
yangzhenye
Date:
Wed May 13 14:55:07 2020 +0000
Revision:
4:eb8dca1dc341
Parent:
3:30c81344beff
Child:
5:fcad75e9b9e1
advance

Who changed what in which revision?

UserRevisionLine numberNew contents of line
yangzhenye 2:baca89f466bc 1 #ifndef MENU_H
yangzhenye 2:baca89f466bc 2 #define MENU_H
yangzhenye 2:baca89f466bc 3
yangzhenye 2:baca89f466bc 4 #include "mbed.h"
yangzhenye 2:baca89f466bc 5 #include "N5110.h"
yangzhenye 2:baca89f466bc 6 #include "Gamepad.h"
yangzhenye 4:eb8dca1dc341 7 #include "RooneyEngine.h"
yangzhenye 2:baca89f466bc 8
yangzhenye 2:baca89f466bc 9 struct State {
yangzhenye 2:baca89f466bc 10 int output;
yangzhenye 2:baca89f466bc 11 int next_state[4]; }
yangzhenye 2:baca89f466bc 12
yangzhenye 2:baca89f466bc 13 class Menu {
yangzhenye 2:baca89f466bc 14 public:
yangzhenye 2:baca89f466bc 15 Menu();
yangzhenye 2:baca89f466bc 16 ~Menu();
yangzhenye 2:baca89f466bc 17 void init();
yangzhenye 2:baca89f466bc 18 void run(N5110 &lcd, Gamepad &gamepad);
yangzhenye 2:baca89f466bc 19
yangzhenye 2:baca89f466bc 20 private:
yangzhenye 2:baca89f466bc 21 void dispaly_page1();
yangzhenye 3:30c81344beff 22 void run_engine(N5110 &lcd, Gamepad &gamepad);
yangzhenye 2:baca89f466bc 23 void display_page2();
yangzhenye 2:baca89f466bc 24 void display_page3();
yangzhenye 2:baca89f466bc 25 void output();
yangzhenye 2:baca89f466bc 26 void input(bool start, bool back, bool x);
yangzhenye 2:baca89f466bc 27 int _output;
yangzhenye 2:baca89f466bc 28 int _state;
yangzhenye 2:baca89f466bc 29 int _input;
yangzhenye 2:baca89f466bc 30 };
yangzhenye 2:baca89f466bc 31 #endif
yangzhenye 2:baca89f466bc 32