Buffer working with LCD, Serial and SD Card

Dependencies:   BMP280

Fork of Thread_Communication by BDG

Committer:
dnonoo
Date:
Fri Dec 29 17:50:30 2017 +0000
Revision:
8:ab6322afa341
Parent:
0:cb3a5c15b01e
Buffer(Mutex) with LCD (Mail Queue), Serial and SD Card (Mutex Locks)

Who changed what in which revision?

UserRevisionLine numberNew 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