秋月電子 I2C接続キャラクタLCDモジュール用にI2CLCDライブラリを修正しました。 Modified I2CLCD Lib for ACM1602NI character LCD module. http://akizukidenshi.com/catalog/g/gP-05693/
I2cLCD16_ACM1601NI/I2cLCD.h@0:9bf010140a3f, 2013-10-20 (annotated)
- Committer:
- maro
- Date:
- Sun Oct 20 03:44:57 2013 +0000
- Revision:
- 0:9bf010140a3f
Changed the waiting time of writeCommand and writeData
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
maro | 0:9bf010140a3f | 1 | //8x2 lcd |
maro | 0:9bf010140a3f | 2 | #ifndef MBED_I2CLCD_H |
maro | 0:9bf010140a3f | 3 | #define MBED_I2CLCD_H |
maro | 0:9bf010140a3f | 4 | |
maro | 0:9bf010140a3f | 5 | #include "mbed.h" |
maro | 0:9bf010140a3f | 6 | |
maro | 0:9bf010140a3f | 7 | class I2cLCD : public Stream { |
maro | 0:9bf010140a3f | 8 | public: |
maro | 0:9bf010140a3f | 9 | |
maro | 0:9bf010140a3f | 10 | I2cLCD(PinName sda, PinName scl); |
maro | 0:9bf010140a3f | 11 | #if DOXYGEN_ONLY |
maro | 0:9bf010140a3f | 12 | int putc(int c); |
maro | 0:9bf010140a3f | 13 | int printf(const char* format, ...); |
maro | 0:9bf010140a3f | 14 | #endif |
maro | 0:9bf010140a3f | 15 | void locate(int column, int row); |
maro | 0:9bf010140a3f | 16 | void cls(); |
maro | 0:9bf010140a3f | 17 | int rows(); |
maro | 0:9bf010140a3f | 18 | int columns(); |
maro | 0:9bf010140a3f | 19 | void puticon(int flg); |
maro | 0:9bf010140a3f | 20 | |
maro | 0:9bf010140a3f | 21 | protected: |
maro | 0:9bf010140a3f | 22 | virtual int _putc(int value); |
maro | 0:9bf010140a3f | 23 | virtual int _getc(); |
maro | 0:9bf010140a3f | 24 | |
maro | 0:9bf010140a3f | 25 | int address(int column, int row); |
maro | 0:9bf010140a3f | 26 | void character(int column, int row, int c); |
maro | 0:9bf010140a3f | 27 | void writeCommand( int cmd ); |
maro | 0:9bf010140a3f | 28 | void writeData( int data ); |
maro | 0:9bf010140a3f | 29 | |
maro | 0:9bf010140a3f | 30 | //DigitalOut _rs; |
maro | 0:9bf010140a3f | 31 | I2C _i2c; |
maro | 0:9bf010140a3f | 32 | int _column; |
maro | 0:9bf010140a3f | 33 | int _row; |
maro | 0:9bf010140a3f | 34 | |
maro | 0:9bf010140a3f | 35 | char contrast; |
maro | 0:9bf010140a3f | 36 | int icon; |
maro | 0:9bf010140a3f | 37 | |
maro | 0:9bf010140a3f | 38 | }; |
maro | 0:9bf010140a3f | 39 | |
maro | 0:9bf010140a3f | 40 | #endif |