LCD implementation of our project.

Dependencies:   mbed mbed-rtos MLX90614

Committer:
ovidiup13
Date:
Thu May 28 16:07:00 2015 +0000
Revision:
5:5b1a8ad6c187
Parent:
4:024e6a9c2ebf
Child:
6:49a007861c76
added levelmeter functionality and threading

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 0:1e597b0f8b3b 6 #define LEFT_MARGIN 5
ovidiup13 0:1e597b0f8b3b 7 #define DEFAULT_COLOR 20
ovidiup13 0:1e597b0f8b3b 8
ovidiup13 5:5b1a8ad6c187 9 #define SCREEN_WIDTH 128
ovidiup13 5:5b1a8ad6c187 10 #define SCREEN_HEIGHT 64
ovidiup13 5:5b1a8ad6c187 11
ovidiup13 5:5b1a8ad6c187 12 #define START_THREAD 1
ovidiup13 5:5b1a8ad6c187 13 #define PAUSE_THREAD 2
ovidiup13 5:5b1a8ad6c187 14
ovidiup13 0:1e597b0f8b3b 15 class Item {
ovidiup13 0:1e597b0f8b3b 16 public:
ovidiup13 0:1e597b0f8b3b 17 //name
ovidiup13 0:1e597b0f8b3b 18 char * title;
ovidiup13 0:1e597b0f8b3b 19 ST7565 * st7565;
ovidiup13 0:1e597b0f8b3b 20 bool isSelectable;
ovidiup13 3:688b62ff6474 21 Item *selectedScreen, *back;
ovidiup13 0:1e597b0f8b3b 22
ovidiup13 0:1e597b0f8b3b 23 //declare pure virtual functions
ovidiup13 0:1e597b0f8b3b 24 virtual void display(void) = 0;
ovidiup13 0:1e597b0f8b3b 25 virtual void update(char c) = 0;
ovidiup13 0:1e597b0f8b3b 26
ovidiup13 2:fcde41900fa5 27 //get title function
ovidiup13 2:fcde41900fa5 28 char * getTitle(void){
ovidiup13 2:fcde41900fa5 29 return title;
ovidiup13 2:fcde41900fa5 30 }
ovidiup13 2:fcde41900fa5 31
ovidiup13 3:688b62ff6474 32 Item * getSelectedScreen(){
ovidiup13 3:688b62ff6474 33 return selectedScreen;
ovidiup13 0:1e597b0f8b3b 34 }
ovidiup13 3:688b62ff6474 35
ovidiup13 3:688b62ff6474 36 void setSelectedScreen(Item *s){
ovidiup13 3:688b62ff6474 37 selectedScreen = s;
ovidiup13 0:1e597b0f8b3b 38 }
ovidiup13 0:1e597b0f8b3b 39 };
ovidiup13 0:1e597b0f8b3b 40
ovidiup13 0:1e597b0f8b3b 41 #endif