Dependencies:   mbed

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers TextLCD.h Source File

TextLCD.h

00001 /* draft mbed TextLCD 
00002  * (c) 2007/8, sford
00003  */
00004  
00005 #ifndef MBED_TEXTLCD_H
00006 #define MBED_TEXTLCD_H
00007 
00008 #include "Stream.h"
00009 #include "DigitalOut.h"
00010 #include "BusOut.h"
00011 #include "mbed.h"
00012 
00013 namespace mbed {
00014 
00015 class TextLCD : public Stream {
00016 
00017 public:
00018 
00019     TextLCD(PinName rs, PinName rw, PinName e, PinName d0, PinName d1,  
00020     PinName d2, PinName d3);
00021 
00022     void rows(int rows);
00023     void columns(int columns);
00024             
00025     virtual void locate(int row, int column);
00026     virtual void cls();    
00027     virtual void reset();
00028         
00029 protected:
00030 
00031     void clock();
00032     void writeData(int data);
00033     void writeCommand(int command);
00034     void writeByte(int value);
00035     void writeNibble(int value);
00036     virtual int _putc(int c);        
00037     virtual int _getc();
00038     virtual void newline();                
00039             
00040     int _rows;
00041     int _columns;
00042     int _row;
00043     int _column;    
00044     DigitalOut _rw, _rs, _e;
00045     BusOut _d;
00046 
00047 };
00048 
00049 }
00050 
00051 #endif