takahiro maeda / Mbed 2 deprecated i2c_lcd_ACM1602NI

Dependencies:   mbed

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers I2cLCD.h Source File

I2cLCD.h

00001 //8x2 lcd
00002 #ifndef MBED_I2CLCD_H
00003 #define MBED_I2CLCD_H
00004 
00005 #include "mbed.h"
00006 
00007 class I2cLCD : public Stream {
00008 public:
00009 
00010     I2cLCD(PinName sda, PinName scl);
00011 #if DOXYGEN_ONLY
00012     int putc(int c);
00013     int printf(const char* format, ...);
00014 #endif
00015     void locate(int column, int row);
00016     void cls();
00017     int rows();
00018     int columns();
00019     void puticon(int flg);
00020     
00021 protected:
00022     virtual int _putc(int value);
00023     virtual int _getc();
00024 
00025     int address(int column, int row);
00026     void character(int column, int row, int c);
00027     void writeCommand( int cmd );
00028     void writeData( int data );
00029     
00030     //DigitalOut _rs;
00031     I2C    _i2c;
00032     int _column;
00033     int _row;
00034     
00035     char contrast;
00036     int icon;
00037     
00038 };
00039 
00040 #endif