Library which creates a serial test console, it supports pages and menu items. The items are added and the pages are added as necessary when the user sets it up. This is a great too for creating an easy to maintain menu system, whether for a test sytem, or anything else.
Dependencies: Terminal
testconsole.h
- Committer:
- glansberry
- Date:
- 2015-07-24
- Revision:
- 9:b1fdd7ea6f72
- Parent:
- 6:e992366d0684
File content as of revision 9:b1fdd7ea6f72:
#ifndef __TESTCONSOLE_H #define __TESTCONSOLE_H #include "Terminal.h" #include "page.h" #include "menuitem.h" #define MAX_PAGES 9 #define TERMINAL_WIDTH 80 class TestConsole { private: Page* active_page; public: TestConsole(const char * Name_p, PinName tx, PinName rx, int baud_rate); Terminal term; const char * name; //reference to the name of the Program int num_pages; int current_page, previous_page; Page * page[MAX_PAGES]; Page * add_page(const char * name_p); int process_cmd(char cmd); int tick(); int page_change(int page); }; #endif //fence