Urm didnt i write this already? Mostly same as georges code, except: buffer and sensor reads in seperate threads (Not Main) some other bits
Dependencies: BMP280
Fork of Sample_LCD_Serial_Buffer by
LCD.h@0:cb3a5c15b01e, 2017-12-12 (annotated)
- Committer:
- benparkes
- Date:
- Tue Dec 12 17:05:59 2017 +0000
- Revision:
- 0:cb3a5c15b01e
Working No Mail que
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
benparkes | 0:cb3a5c15b01e | 1 | #ifndef MBED_LCD_H |
benparkes | 0:cb3a5c15b01e | 2 | #define MBED_LCD_H |
benparkes | 0:cb3a5c15b01e | 3 | |
benparkes | 0:cb3a5c15b01e | 4 | |
benparkes | 0:cb3a5c15b01e | 5 | #define CMD 0 |
benparkes | 0:cb3a5c15b01e | 6 | #define TXT 1 |
benparkes | 0:cb3a5c15b01e | 7 | #define CLEAR 1 |
benparkes | 0:cb3a5c15b01e | 8 | #define HOME 2 |
benparkes | 0:cb3a5c15b01e | 9 | #define READ 1 |
benparkes | 0:cb3a5c15b01e | 10 | #define WRITE 0 |
benparkes | 0:cb3a5c15b01e | 11 | #define LEFT 0 |
benparkes | 0:cb3a5c15b01e | 12 | #define RIGHT 1 |
benparkes | 0:cb3a5c15b01e | 13 | |
benparkes | 0:cb3a5c15b01e | 14 | #define LINE1 0x80 // Start address of first line |
benparkes | 0:cb3a5c15b01e | 15 | #define LINE2 0xC0 // Start address of second line |
benparkes | 0:cb3a5c15b01e | 16 | |
benparkes | 0:cb3a5c15b01e | 17 | #define LCD_CLR (LCD_DATA(CLEAR,CMD)) |
benparkes | 0:cb3a5c15b01e | 18 | #define LCD_HOME (LCD_DATA(HOME,CMD)) |
benparkes | 0:cb3a5c15b01e | 19 | |
benparkes | 0:cb3a5c15b01e | 20 | class LCD{ |
benparkes | 0:cb3a5c15b01e | 21 | public: |
benparkes | 0:cb3a5c15b01e | 22 | LCD(PinName RS, PinName E, PinName d4, PinName d5, PinName d6, PinName d7); |
benparkes | 0:cb3a5c15b01e | 23 | void Clear(void); |
benparkes | 0:cb3a5c15b01e | 24 | void Write(char text[16]); |
benparkes | 0:cb3a5c15b01e | 25 | void RowSelect(int row); |
benparkes | 0:cb3a5c15b01e | 26 | |
benparkes | 0:cb3a5c15b01e | 27 | protected: |
benparkes | 0:cb3a5c15b01e | 28 | void Busy(void); |
benparkes | 0:cb3a5c15b01e | 29 | void DATA(char data,char type); |
benparkes | 0:cb3a5c15b01e | 30 | DigitalOut _RS, _E; |
benparkes | 0:cb3a5c15b01e | 31 | BusOut _DBUS; |
benparkes | 0:cb3a5c15b01e | 32 | }; |
benparkes | 0:cb3a5c15b01e | 33 | #endif |