BeRTOS
|
00001 00044 #ifndef DRV_LCD_HD44_H 00045 #define DRV_LCD_HD44_H 00046 00047 #include "cfg/cfg_lcd_hd44.h" 00048 #include <cfg/compiler.h> /* For stdint types */ 00049 00057 #define LCD_HD44_ROWS_2 2 00058 #define LCD_HD44_ROWS_4 4 00059 00067 #define LCD_HD44_COLS_16 16 00068 #define LCD_HD44_COLS_20 20 00069 00074 #define LCD_CMD_DISPLAY_INI 0x30 00075 00076 #if CONFIG_LCD_4BIT 00077 #define LCD_CMD_SETFUNC 0x28 00078 #else 00079 #define LCD_CMD_SETFUNC 0x38 00080 #endif 00081 00082 #define LCD_CMD_SET8BIT 0x30 00083 #define LCD_CMD_DISPLAY_ON 0x0F 00084 #define LCD_CMD_DISPLAY_OFF 0x08 00085 #define LCD_CMD_CLEAR 0x01 00086 #define LCD_CMD_CURSOR_BLOCK 0x0D 00087 #define LCD_CMD_CURSOR_LINE 0x0F 00088 #define LCD_CMD_CURSOR_OFF 0x0C 00089 #define LCD_CMD_DISPLAYMODE 0x06 00090 #define LCD_CMD_SET_CGRAMADDR 0x40 00091 #define LCD_CMD_RESET_DDRAM 0x80 00092 #define LCD_CMD_SET_DDRAMADDR 0x80 00093 #define LCD_CMD_DISPLAY_SHIFT 0x18 00094 #define LCD_CMD_MOVESHIFT_LEFT 0x00 00095 #define LCD_CMD_MOVESHIFT_RIGHT 0x04 00096 /*\}*/ 00097 00099 typedef uint8_t lcdpos_t; 00100 00101 void lcd_waitBusy(void); 00102 void lcd_moveTo(uint8_t addr); 00103 void lcd_setReg(uint8_t val); 00104 void lcd_putc(uint8_t a, uint8_t c); 00105 void lcd_remapChar(const char *glyph, char code); 00106 void lcd_hw_init(void); 00107 void lcd_hw_test(void); 00108 00109 #endif /* DRV_LCD_HD44_H */