1 /* SPDX-License-Identifier: GPL-2.0-or-later */
3 * Character LCD driver for Linux
5 * Copyright (C) 2000-2008, Willy Tarreau <w@1wt.eu>
6 * Copyright (C) 2016-2017 Glider bvba
18 const struct charlcd_ops *ops;
19 const unsigned char *char_conv; /* Optional */
24 /* Contains the LCD X and Y offset */
34 * struct charlcd_ops - Functions used by charlcd. Drivers have to implement
36 * @clear_fast: Clear the whole display and set cursor to position 0, 0.
38 * @backlight: Turn backlight on or off. Optional.
39 * @print: Print one character to the display at current cursor position.
40 * The buffered cursor position is advanced by charlcd. The cursor should not
41 * wrap to the next line at the end of a line.
42 * @gotoxy: Set cursor to x, y. The x and y values to set the cursor to are
43 * previously set in addr.x and addr.y by charlcd.
46 void (*clear_fast)(struct charlcd *lcd);
47 void (*backlight)(struct charlcd *lcd, enum charlcd_onoff on);
48 int (*print)(struct charlcd *lcd, int c);
49 int (*gotoxy)(struct charlcd *lcd);
52 struct charlcd *charlcd_alloc(void);
53 void charlcd_free(struct charlcd *lcd);
55 int charlcd_register(struct charlcd *lcd);
56 int charlcd_unregister(struct charlcd *lcd);
58 void charlcd_poke(struct charlcd *lcd);
60 #endif /* CHARLCD_H */