![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
Diff: TextLCD.h
- Revision:
- 0:8e3468376286
diff -r 000000000000 -r 8e3468376286 TextLCD.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/TextLCD.h Sat May 07 12:37:10 2011 +0000 @@ -0,0 +1,51 @@ +/* draft mbed TextLCD + * (c) 2007/8, sford + */ + +#ifndef MBED_TEXTLCD_H +#define MBED_TEXTLCD_H + +#include "Stream.h" +#include "DigitalOut.h" +#include "BusOut.h" +#include "mbed.h" + +namespace mbed { + +class TextLCD : public Stream { + +public: + + TextLCD(PinName rs, PinName rw, PinName e, PinName d0, PinName d1, + PinName d2, PinName d3); + + void rows(int rows); + void columns(int columns); + + virtual void locate(int row, int column); + virtual void cls(); + virtual void reset(); + +protected: + + void clock(); + void writeData(int data); + void writeCommand(int command); + void writeByte(int value); + void writeNibble(int value); + virtual int _putc(int c); + virtual int _getc(); + virtual void newline(); + + int _rows; + int _columns; + int _row; + int _column; + DigitalOut _rw, _rs, _e; + BusOut _d; + +}; + +} + +#endif