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.
Menu.h
00001 /************************************************************************** 00002 * @file Menu.h 00003 * @brief Base class for wrapping the interface with LCD Menu display 00004 * @version: V1.0 00005 * @date: 9/17/2019 00006 00007 * 00008 * @note 00009 * Copyright (C) 2019 E3 Design. All rights reserved. 00010 * 00011 * @par 00012 * E3 Designers LLC is supplying this software for use with Cortex-M3 LPC1768 00013 * processor based microcontroller for the ESCM 2000 Monitor and Display. 00014 * * 00015 * @par 00016 * THIS SOFTWARE IS PROVIDED "AS IS". NO WARRANTIES, WHETHER EXPRESS, IMPLIED 00017 * OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF 00018 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE APPLY TO THIS SOFTWARE. 00019 * ARM SHALL NOT, IN ANY CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR 00020 * CONSEQUENTIAL DAMAGES, FOR ANY REASON WHATSOEVER. 00021 * 00022 ******************************************************************************/ 00023 #ifndef MENU_H 00024 #define MENU_H 00025 00026 #include "mbed.h" 00027 #include "LCD.h" 00028 00029 #include <vector> 00030 #include <string> 00031 00032 00033 class Menu { 00034 private: 00035 00036 Mutex display_mutex; 00037 00038 public: 00039 static Menu * currentMenu; 00040 static Menu * getCurrentMenu () ; 00041 static Menu * setCurrentMenu (Menu * value) ; 00042 00043 LCD * lcd; 00044 00045 00046 int update_needed; 00047 00048 int selectedMenu; // what selection the cursor points to 00049 00050 int cursorLine; // what line of the lcd the cursor is one 00051 int cursorIndex; // what line of the lcd the cursor is one 00052 00053 Menu * parent; 00054 00055 vector<Menu*> children; 00056 00057 char* menuID; 00058 00059 Menu(char *id); 00060 00061 void add( Menu *submenu); 00062 00063 virtual void init(); 00064 virtual void select(); 00065 virtual void back(); 00066 00067 virtual char* getText() { return "Main"; } 00068 00069 virtual void DrawDisplay(LCD * lcd); 00070 virtual void display(LCD * lcd); 00071 void displayCurrentTime (LCD * lcd); 00072 void displayVersion (LCD * lcd); 00073 00074 void moveUp(); 00075 void moveDown(); 00076 00077 virtual void pressClear(); 00078 virtual void pressMode(); 00079 virtual void pressSet(); 00080 virtual void pressDown(); 00081 virtual void pressUp(); 00082 00083 virtual void lock() { display_mutex.lock();} 00084 virtual void unlock() { display_mutex.unlock();} 00085 00086 }; 00087 #endif
Generated on Sun Jul 17 2022 01:55:32 by
 1.7.2
 1.7.2