LCD implementation of our project.
Dependencies: mbed mbed-rtos MLX90614
Item.h@4:024e6a9c2ebf, 2015-05-25 (annotated)
- Committer:
- ovidiup13
- Date:
- Mon May 25 14:46:39 2015 +0000
- Revision:
- 4:024e6a9c2ebf
- Parent:
- 3:688b62ff6474
- Child:
- 5:5b1a8ad6c187
updated compass with threading
Who changed what in which revision?
User | Revision | Line number | New 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 | 0:1e597b0f8b3b | 9 | class Item { |
ovidiup13 | 0:1e597b0f8b3b | 10 | public: |
ovidiup13 | 0:1e597b0f8b3b | 11 | //name |
ovidiup13 | 0:1e597b0f8b3b | 12 | char * title; |
ovidiup13 | 0:1e597b0f8b3b | 13 | ST7565 * st7565; |
ovidiup13 | 0:1e597b0f8b3b | 14 | bool isSelectable; |
ovidiup13 | 3:688b62ff6474 | 15 | Item *selectedScreen, *back; |
ovidiup13 | 0:1e597b0f8b3b | 16 | |
ovidiup13 | 0:1e597b0f8b3b | 17 | //declare pure virtual functions |
ovidiup13 | 0:1e597b0f8b3b | 18 | virtual void display(void) = 0; |
ovidiup13 | 0:1e597b0f8b3b | 19 | virtual void update(char c) = 0; |
ovidiup13 | 0:1e597b0f8b3b | 20 | |
ovidiup13 | 2:fcde41900fa5 | 21 | //get title function |
ovidiup13 | 2:fcde41900fa5 | 22 | char * getTitle(void){ |
ovidiup13 | 2:fcde41900fa5 | 23 | return title; |
ovidiup13 | 2:fcde41900fa5 | 24 | } |
ovidiup13 | 2:fcde41900fa5 | 25 | |
ovidiup13 | 3:688b62ff6474 | 26 | Item * getSelectedScreen(){ |
ovidiup13 | 3:688b62ff6474 | 27 | return selectedScreen; |
ovidiup13 | 0:1e597b0f8b3b | 28 | } |
ovidiup13 | 3:688b62ff6474 | 29 | |
ovidiup13 | 3:688b62ff6474 | 30 | void setSelectedScreen(Item *s){ |
ovidiup13 | 3:688b62ff6474 | 31 | selectedScreen = s; |
ovidiup13 | 0:1e597b0f8b3b | 32 | } |
ovidiup13 | 0:1e597b0f8b3b | 33 | }; |
ovidiup13 | 0:1e597b0f8b3b | 34 | |
ovidiup13 | 0:1e597b0f8b3b | 35 | #endif |