4 * Copyright 2005 Develer S.r.l. (http://www.develer.com/)
5 * This file is part of DevLib - See README.devlib for information.
8 * \brief Hitachi HD44780 and clones LCD module (interface)
11 * \author Bernardo Innocenti <bernie@develer.com>
12 * \author Stefano Fedrigo <aleph@develer.com>
17 *#* Revision 1.3 2006/09/20 19:55:01 marco
18 *#* Added CONFIG_LCD_4BIT.
20 *#* Revision 1.2 2006/07/19 12:56:25 bernie
21 *#* Convert to new Doxygen style.
23 *#* Revision 1.1 2005/11/04 18:00:42 bernie
24 *#* Import into DevLib.
26 *#* Revision 1.2 2005/06/14 14:43:43 bernie
27 *#* Add DevLib headers.
29 *#* Revision 1.1 2005/05/24 09:17:58 batt
30 *#* Move drivers to top-level.
32 *#* Revision 1.3 2005/04/22 13:14:58 batt
33 *#* Better lcd rows and cols definition.
35 *#* Revision 1.2 2005/04/17 22:41:39 bernie
36 *#* lcd_test(): Rename to lcd_hw_test() and conditionalize on CONFIG_TEST.
38 *#* Revision 1.1 2005/04/16 19:48:35 aleph
42 #ifndef DRV_LCD_HD44_H
43 #define DRV_LCD_HD44_H
45 #include <appconfig.h>
46 #include <cfg/compiler.h> /* For stdint types */
49 * \name Display dimensions (in chars)
57 * \name Hitachi HD44 commands.
60 #define LCD_CMD_DISPLAY_INI 0x30
63 #define LCD_CMD_SETFUNC 0x28 /**< 4 bits, 2 lines, 5x7 dots */
65 #define LCD_CMD_SETFUNC 0x38 /**< 8 bits, 2 lines, 5x7 dots */
68 #define LCD_CMD_DISPLAY_ON 0x0F /**< Switch on display */
69 #define LCD_CMD_DISPLAY_OFF 0x08 /**< Switch off display */
70 #define LCD_CMD_CLEAR 0x01 /**< Clear display */
71 #define LCD_CMD_CURSOR_BLOCK 0x0D /**< Show cursor (block) */
72 #define LCD_CMD_CURSOR_LINE 0x0F /**< Show cursor (line) */
73 #define LCD_CMD_CURSOR_OFF 0x0C /**< Hide cursor */
74 #define LCD_CMD_DISPLAYMODE 0x06
75 #define LCD_CMD_SET_CGRAMADDR 0x40
76 #define LCD_CMD_RESET_DDRAM 0x80
77 #define LCD_CMD_SET_DDRAMADDR 0x80
78 #define LCD_CMD_DISPLAY_SHIFT 0x18
79 #define LCD_CMD_MOVESHIFT_LEFT 0x00
80 #define LCD_CMD_MOVESHIFT_RIGHT 0x04
83 /** Type for combined LCD cursor position (x,y). */
84 typedef uint8_t lcdpos_t;
86 void lcd_waitBusy(void);
87 void lcd_moveTo(uint8_t addr);
88 void lcd_setReg(uint8_t val);
89 void lcd_putc(uint8_t a, uint8_t c);
90 void lcd_remapChar(const char *glyph, char code);
91 void lcd_hw_init(void);
92 void lcd_hw_test(void);
94 #endif /* DRV_LCD_HD44_H */