LCD implementation of our project.

Dependencies:   mbed mbed-rtos MLX90614

Committer:
ovidiup13
Date:
Wed Jun 03 12:22:46 2015 +0000
Revision:
7:11675c1dce4f
Parent:
6:49a007861c76
Child:
8:81ed1135ba02
updated header, cleaned up menu, fixed controls for device

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