charlcd.h (01ec46dfa633a52ccfe38d4a194460d6adb2ba00) charlcd.h (d2f2187e8f27cd884150acdce7ec96135260413b)
1/* SPDX-License-Identifier: GPL-2.0-or-later */
2/*
3 * Character LCD driver for Linux
4 *
5 * Copyright (C) 2000-2008, Willy Tarreau <w@1wt.eu>
6 * Copyright (C) 2016-2017 Glider bvba
7 */
8

--- 7 unchanged lines hidden (view full) ---

16#define LCD_FLAG_N 0x0040 /* 2-rows mode */
17#define LCD_FLAG_L 0x0080 /* Backlight enabled */
18
19enum charlcd_onoff {
20 CHARLCD_OFF = 0,
21 CHARLCD_ON,
22};
23
1/* SPDX-License-Identifier: GPL-2.0-or-later */
2/*
3 * Character LCD driver for Linux
4 *
5 * Copyright (C) 2000-2008, Willy Tarreau <w@1wt.eu>
6 * Copyright (C) 2016-2017 Glider bvba
7 */
8

--- 7 unchanged lines hidden (view full) ---

16#define LCD_FLAG_N 0x0040 /* 2-rows mode */
17#define LCD_FLAG_L 0x0080 /* Backlight enabled */
18
19enum charlcd_onoff {
20 CHARLCD_OFF = 0,
21 CHARLCD_ON,
22};
23
24enum charlcd_shift_dir {
25 CHARLCD_SHIFT_LEFT,
26 CHARLCD_SHIFT_RIGHT,
27};
28
29enum charlcd_fontsize {
30 CHARLCD_FONTSIZE_SMALL,
31 CHARLCD_FONTSIZE_LARGE,
32};
33
34enum charlcd_lines {
35 CHARLCD_LINES_1,
36 CHARLCD_LINES_2,
37};
38
24struct charlcd {
25 const struct charlcd_ops *ops;
26 const unsigned char *char_conv; /* Optional */
27
28 int height;
29 int width;
30
31 /* Contains the LCD X and Y offset */

--- 17 unchanged lines hidden (view full) ---

49 * @gotoxy: Set cursor to x, y. The x and y values to set the cursor to are
50 * previously set in addr.x and addr.y by charlcd.
51 * @home: Set cursor to 0, 0. The values in addr.x and addr.y are set to 0, 0 by
52 * charlcd prior to calling this function.
53 * @clear_display: Again clear the whole display, set the cursor to 0, 0. The
54 * values in addr.x and addr.y are set to 0, 0 by charlcd prior to calling this
55 * function.
56 * @init_display: Initialize the display.
39struct charlcd {
40 const struct charlcd_ops *ops;
41 const unsigned char *char_conv; /* Optional */
42
43 int height;
44 int width;
45
46 /* Contains the LCD X and Y offset */

--- 17 unchanged lines hidden (view full) ---

64 * @gotoxy: Set cursor to x, y. The x and y values to set the cursor to are
65 * previously set in addr.x and addr.y by charlcd.
66 * @home: Set cursor to 0, 0. The values in addr.x and addr.y are set to 0, 0 by
67 * charlcd prior to calling this function.
68 * @clear_display: Again clear the whole display, set the cursor to 0, 0. The
69 * values in addr.x and addr.y are set to 0, 0 by charlcd prior to calling this
70 * function.
71 * @init_display: Initialize the display.
72 * @shift_cursor: Shift cursor left or right one position.
73 * @shift_display: Shift whole display content left or right.
74 * @display: Turn display on or off.
75 * @cursor: Turn cursor on or off.
76 * @blink: Turn cursor blink on or off.
77 * @lines: One or two lines.
57 */
58struct charlcd_ops {
59 void (*clear_fast)(struct charlcd *lcd);
60 void (*backlight)(struct charlcd *lcd, enum charlcd_onoff on);
61 int (*print)(struct charlcd *lcd, int c);
62 int (*gotoxy)(struct charlcd *lcd);
63 int (*home)(struct charlcd *lcd);
64 int (*clear_display)(struct charlcd *lcd);
65 int (*init_display)(struct charlcd *lcd);
78 */
79struct charlcd_ops {
80 void (*clear_fast)(struct charlcd *lcd);
81 void (*backlight)(struct charlcd *lcd, enum charlcd_onoff on);
82 int (*print)(struct charlcd *lcd, int c);
83 int (*gotoxy)(struct charlcd *lcd);
84 int (*home)(struct charlcd *lcd);
85 int (*clear_display)(struct charlcd *lcd);
86 int (*init_display)(struct charlcd *lcd);
87 int (*shift_cursor)(struct charlcd *lcd, enum charlcd_shift_dir dir);
88 int (*shift_display)(struct charlcd *lcd, enum charlcd_shift_dir dir);
89 int (*display)(struct charlcd *lcd, enum charlcd_onoff on);
90 int (*cursor)(struct charlcd *lcd, enum charlcd_onoff on);
91 int (*blink)(struct charlcd *lcd, enum charlcd_onoff on);
92 int (*fontsize)(struct charlcd *lcd, enum charlcd_fontsize size);
93 int (*lines)(struct charlcd *lcd, enum charlcd_lines lines);
66};
67
68void charlcd_backlight(struct charlcd *lcd, enum charlcd_onoff on);
69struct charlcd *charlcd_alloc(void);
70void charlcd_free(struct charlcd *lcd);
71
72int charlcd_register(struct charlcd *lcd);
73int charlcd_unregister(struct charlcd *lcd);
74
75void charlcd_poke(struct charlcd *lcd);
76
77#endif /* CHARLCD_H */
94};
95
96void charlcd_backlight(struct charlcd *lcd, enum charlcd_onoff on);
97struct charlcd *charlcd_alloc(void);
98void charlcd_free(struct charlcd *lcd);
99
100int charlcd_register(struct charlcd *lcd);
101int charlcd_unregister(struct charlcd *lcd);
102
103void charlcd_poke(struct charlcd *lcd);
104
105#endif /* CHARLCD_H */