LCD implementation of our project.

Dependencies:   mbed mbed-rtos MLX90614

Committer:
ovidiup13
Date:
Sat May 30 14:58:44 2015 +0000
Revision:
6:49a007861c76
Parent:
5:5b1a8ad6c187
Child:
7:11675c1dce4f
integrated level meter functionality and added 3-way switch control

Who changed what in which revision?

UserRevisionLine numberNew contents of line
ovidiup13 0:1e597b0f8b3b 1 #ifndef _ITEM_H
ovidiup13 0:1e597b0f8b3b 2 #define _ITEM_H
ovidiup13 0:1e597b0f8b3b 3
ovidiup13 0:1e597b0f8b3b 4 #include "st7565LCD.h"
ovidiup13 4:024e6a9c2ebf 5 #include "rtos.h"
ovidiup13 6:49a007861c76 6
ovidiup13 6:49a007861c76 7 //screen configuration
ovidiup13 0:1e597b0f8b3b 8 #define LEFT_MARGIN 5
ovidiup13 0:1e597b0f8b3b 9 #define DEFAULT_COLOR 20
ovidiup13 0:1e597b0f8b3b 10
ovidiup13 5:5b1a8ad6c187 11 #define SCREEN_WIDTH 128
ovidiup13 5:5b1a8ad6c187 12 #define SCREEN_HEIGHT 64
ovidiup13 5:5b1a8ad6c187 13
ovidiup13 6:49a007861c76 14 //control macros
ovidiup13 6:49a007861c76 15 #define NL 121 //select - y
ovidiup13 6:49a007861c76 16 #define UP 119 //up - w
ovidiup13 6:49a007861c76 17 #define DOWN 115 //down - s
ovidiup13 6:49a007861c76 18
ovidiup13 6:49a007861c76 19 //threading macros
ovidiup13 5:5b1a8ad6c187 20 #define START_THREAD 1
ovidiup13 5:5b1a8ad6c187 21 #define PAUSE_THREAD 2
ovidiup13 5:5b1a8ad6c187 22
ovidiup13 0:1e597b0f8b3b 23 class Item {
ovidiup13 0:1e597b0f8b3b 24 public:
ovidiup13 0:1e597b0f8b3b 25 //name
ovidiup13 0:1e597b0f8b3b 26 char * title;
ovidiup13 0:1e597b0f8b3b 27 ST7565 * st7565;
ovidiup13 0:1e597b0f8b3b 28 bool isSelectable;
ovidiup13 3:688b62ff6474 29 Item *selectedScreen, *back;
ovidiup13 0:1e597b0f8b3b 30
ovidiup13 0:1e597b0f8b3b 31 //declare pure virtual functions
ovidiup13 0:1e597b0f8b3b 32 virtual void display(void) = 0;
ovidiup13 0:1e597b0f8b3b 33 virtual void update(char c) = 0;
ovidiup13 0:1e597b0f8b3b 34
ovidiup13 2:fcde41900fa5 35 //get title function
ovidiup13 2:fcde41900fa5 36 char * getTitle(void){
ovidiup13 2:fcde41900fa5 37 return title;
ovidiup13 2:fcde41900fa5 38 }
ovidiup13 2:fcde41900fa5 39
ovidiup13 3:688b62ff6474 40 Item * getSelectedScreen(){
ovidiup13 3:688b62ff6474 41 return selectedScreen;
ovidiup13 0:1e597b0f8b3b 42 }
ovidiup13 3:688b62ff6474 43
ovidiup13 3:688b62ff6474 44 void setSelectedScreen(Item *s){
ovidiup13 3:688b62ff6474 45 selectedScreen = s;
ovidiup13 0:1e597b0f8b3b 46 }
ovidiup13 0:1e597b0f8b3b 47 };
ovidiup13 0:1e597b0f8b3b 48
ovidiup13 0:1e597b0f8b3b 49 #endif