xref: /linux/drivers/auxdisplay/hd44780_common.h (revision d3a2fb810f273b7a2c393d4de28ae91a3f76985d)
1718e05edSLars Poeschel /* SPDX-License-Identifier: GPL-2.0-or-later */
2718e05edSLars Poeschel 
32545c1c9SLars Poeschel #define DEFAULT_LCD_BWIDTH      40
42545c1c9SLars Poeschel #define DEFAULT_LCD_HWIDTH      64
52545c1c9SLars Poeschel 
6718e05edSLars Poeschel struct hd44780_common {
73fc04dd7SLars Poeschel 	int ifwidth;			/* 4-bit or 8-bit (default) */
82545c1c9SLars Poeschel 	int bwidth;			/* Default set by hd44780_alloc() */
92545c1c9SLars Poeschel 	int hwidth;			/* Default set by hd44780_alloc() */
1071ff701bSLars Poeschel 	void (*write_data)(struct hd44780_common *hdc, int data);
112c6a82f2SLars Poeschel 	void (*write_cmd)(struct hd44780_common *hdc, int cmd);
122c6a82f2SLars Poeschel 	/* write_cmd_raw4 is for 4-bit connected displays only */
132c6a82f2SLars Poeschel 	void (*write_cmd_raw4)(struct hd44780_common *hdc, int cmd);
14718e05edSLars Poeschel 	void *hd44780;
15718e05edSLars Poeschel };
16718e05edSLars Poeschel 
17b26deabbSLars Poeschel int hd44780_common_print(struct charlcd *lcd, int c);
18*d3a2fb81SLars Poeschel int hd44780_common_gotoxy(struct charlcd *lcd);
19718e05edSLars Poeschel struct hd44780_common *hd44780_common_alloc(void);
20