Yang Zhenye 201199680

Dependencies:   mbed

Committer:
yangzhenye
Date:
Fri May 08 09:09:49 2020 +0000
Revision:
3:30c81344beff
Parent:
2:baca89f466bc
Child:
4:eb8dca1dc341
improve project

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 3:30c81344beff 7 #include "RoonyEngine.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