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 mbed-rtos MLX90614
Item.h
00001 #ifndef _ITEM_H 00002 #define _ITEM_H 00003 00004 #include "st7565LCD.h" 00005 #include "rtos.h" 00006 #include "gyro.h" 00007 #include "mbed.h" 00008 00009 //screen configuration 00010 #define LEFT_MARGIN 5 00011 #define DEFAULT_COLOR 20 00012 00013 #define SCREEN_WIDTH 128 00014 #define SCREEN_HEIGHT 64 00015 00016 //control macros 00017 #define NL 121 //select - y 00018 #define UP 119 //up - w 00019 #define DOWN 115 //down - s 00020 00021 //threading macros 00022 #define START_THREAD 1 00023 #define PAUSE_THREAD 2 00024 00025 class Item { 00026 public: 00027 //name 00028 char * title; 00029 ST7565 * st7565; 00030 bool isSelectable; 00031 Item *selectedScreen, *back; 00032 00033 //declare pure virtual functions 00034 virtual void display(void) = 0; 00035 virtual void update(char c) = 0; 00036 00037 //get title function 00038 char * getTitle(void){ 00039 return title; 00040 } 00041 00042 Item * getSelectedScreen(){ 00043 return selectedScreen; 00044 } 00045 00046 void setSelectedScreen(Item *s){ 00047 selectedScreen = s; 00048 } 00049 }; 00050 00051 #endif
Generated on Thu Jul 14 2022 11:25:13 by
1.7.2