Takeuchi Kouichi
/
20160301_Servo_Tester
サーボテスタ
Embed:
(wiki syntax)
Show/hide line numbers
I2cLCD.h
00001 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 enum IconType { 00011 Mark = 0x0001, 00012 Battery_1 = 0x0004, 00013 Battery_2 = 0x0002, 00014 Battery_3 = 0x0010, 00015 Battery_4 = 0x0008, 00016 NoSound = 0x0020, 00017 Lock = 0x0040, 00018 ArrowDown = 0x0080, 00019 ArrowUp = 0x0100, 00020 Input = 0x0200, 00021 Alarm = 0x0400, 00022 Tell = 0x0800, 00023 Antenna = 0x1000, 00024 }; 00025 00026 I2cLCD(PinName sda, PinName scl, PinName rp); 00027 #if DOXYGEN_ONLY 00028 int putc(int c); 00029 int printf(const char* format, ...); 00030 #endif 00031 void locate(int column, int row); 00032 void cls(); 00033 int rows(); 00034 int columns(); 00035 void seticon(IconType type); 00036 void clearicon(IconType type); 00037 void puticon(int flg); 00038 00039 protected: 00040 virtual int _putc(int value); 00041 virtual int _getc(); 00042 00043 int address(int column, int row); 00044 void character(int column, int row, int c); 00045 void writeCommand( int cmd ); 00046 void writeData( int data ); 00047 00048 DigitalOut _rs; 00049 I2C _i2c; 00050 int _column; 00051 int _row; 00052 00053 char contrast; 00054 int icon; 00055 00056 }; 00057 00058 #endif
Generated on Tue Jul 19 2022 06:10:58 by 1.7.2