Lars Poeschel | 718e05e | 2020-11-03 10:58:05 +0100 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0-or-later */ |
| 2 | |
Lars Poeschel | 2545c1c | 2020-11-03 10:58:06 +0100 | [diff] [blame] | 3 | #define DEFAULT_LCD_BWIDTH 40 |
| 4 | #define DEFAULT_LCD_HWIDTH 64 |
| 5 | |
Lars Poeschel | 718e05e | 2020-11-03 10:58:05 +0100 | [diff] [blame] | 6 | struct hd44780_common { |
Lars Poeschel | 3fc04dd | 2020-11-03 10:58:07 +0100 | [diff] [blame] | 7 | int ifwidth; /* 4-bit or 8-bit (default) */ |
Lars Poeschel | 2545c1c | 2020-11-03 10:58:06 +0100 | [diff] [blame] | 8 | int bwidth; /* Default set by hd44780_alloc() */ |
| 9 | int hwidth; /* Default set by hd44780_alloc() */ |
Lars Poeschel | 71ff701 | 2020-11-03 10:58:08 +0100 | [diff] [blame] | 10 | void (*write_data)(struct hd44780_common *hdc, int data); |
Lars Poeschel | 2c6a82f | 2020-11-03 10:58:09 +0100 | [diff] [blame] | 11 | void (*write_cmd)(struct hd44780_common *hdc, int cmd); |
| 12 | /* write_cmd_raw4 is for 4-bit connected displays only */ |
| 13 | void (*write_cmd_raw4)(struct hd44780_common *hdc, int cmd); |
Lars Poeschel | 718e05e | 2020-11-03 10:58:05 +0100 | [diff] [blame] | 14 | void *hd44780; |
| 15 | }; |
| 16 | |
Lars Poeschel | b26deab | 2020-11-03 10:58:11 +0100 | [diff] [blame^] | 17 | int hd44780_common_print(struct charlcd *lcd, int c); |
Lars Poeschel | 718e05e | 2020-11-03 10:58:05 +0100 | [diff] [blame] | 18 | struct hd44780_common *hd44780_common_alloc(void); |