32 #define LCD_CLEARDISPLAY 0x01
33 #define LCD_RETURNHOME 0x02
34 #define LCD_ENTRYMODESET 0x04
35 #define LCD_DISPLAYCONTROL 0x08
36 #define LCD_CURSORSHIFT 0x10
37 #define LCD_FUNCTIONSET 0x20
41 #define LCD_BACKLIGHT 0x08
42 #define LCD_NOBACKLIGHT 0x00
45 #define LCD_ENTRYRIGHT 0x00
46 #define LCD_ENTRYLEFT 0x02
47 #define LCD_ENTRYSHIFTINCREMENT 0x01
48 #define LCD_ENTRYSHIFTDECREMENT 0x00
51 #define LCD_DISPLAYON 0x04
52 #define LCD_DISPLAYOFF 0x00
53 #define LCD_CURSORON 0x02
54 #define LCD_CURSOROFF 0x00
55 #define LCD_BLINKON 0x01
56 #define LCD_BLINKOFF 0x00
59 #define LCD_DISPLAYMOVE 0x08
60 #define LCD_MOVERIGHT 0x04
61 #define LCD_MOVELEFT 0x00
64 #define LCD_8BITMODE 0x10
65 #define LCD_4BITMODE 0x00
66 #define LCD_2LINE 0x08
67 #define LCD_1LINE 0x00
68 #define LCD_5x10DOTS 0x04
69 #define LCD_5x8DOTS 0x00
72 #define LCD_SETCGRAMADDR 0x40
74 #define LCD_EN 0x04 // Enable bit
75 #define LCD_RW 0x02 // Read/Write bit
76 #define LCD_RS 0x01 // Register select bit
85 I2CLcd (
int bus,
int lcdAddress);
86 mraa_result_t write (
int x,
int y, std::string msg);
88 virtual mraa_result_t write (std::string msg) = 0;
89 virtual mraa_result_t setCursor (
int row,
int column) = 0;
90 virtual mraa_result_t clear () = 0;
91 virtual mraa_result_t home () = 0;
92 virtual mraa_result_t createChar(uint8_t charSlot, uint8_t charData[]);
93 virtual mraa_result_t i2Cmd (mraa_i2c_context ctx, uint8_t value);
94 virtual mraa_result_t i2cReg (mraa_i2c_context ctx,
int deviceAdress,
int addr, uint8_t data);
95 virtual mraa_result_t i2cData (mraa_i2c_context ctx, uint8_t value);
97 mraa_result_t close();
104 int m_lcd_control_address;
106 mraa_i2c_context m_i2c_lcd_control;