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: Menu/Menu.h
- Revision:
- 28:be77ad6c0bda
- Parent:
- 27:c920c5ec31af
diff -r c920c5ec31af -r be77ad6c0bda Menu/Menu.h
--- a/Menu/Menu.h Sat May 04 13:26:50 2019 +0000
+++ b/Menu/Menu.h Tue May 07 08:39:38 2019 +0000
@@ -16,6 +16,38 @@
* @brief Class to control the overall state of the game
* @author Lewis Wooltorton
* @date April 2019
+
+
+@code
+
+#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() {
+ gamepad.init();
+ menu.init();
+ lcd.init();
+ lcd.normalMode();
+ lcd.setBrightness(0.5);
+ while(1) {
+
+ // clear, refresh lcd and run the menu.
+ lcd.clear();
+ menu.run(lcd, gamepad);
+ lcd.refresh();
+ wait(0.01);
+ }
+}
+
+@endcode
*/
class Menu {