charlcd.h (66ce7d5c1e124b497f45aead50df1dc3c2873382) charlcd.h (2545c1c948a6a765f1a0e820c7598138b36f67ef)
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
17struct charlcd {
18 const struct charlcd_ops *ops;
19 const unsigned char *char_conv; /* Optional */
20
21 int ifwidth; /* 4-bit or 8-bit (default) */
22 int height;
23 int width;
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
17struct charlcd {
18 const struct charlcd_ops *ops;
19 const unsigned char *char_conv; /* Optional */
20
21 int ifwidth; /* 4-bit or 8-bit (default) */
22 int height;
23 int width;
24 int bwidth; /* Default set by charlcd_alloc() */
25 int hwidth; /* Default set by charlcd_alloc() */
26
24
27 void *drvdata; /* Set by charlcd_alloc() */
25 void *drvdata;
28};
29
30struct charlcd_ops {
31 /* Required */
32 void (*write_cmd)(struct charlcd *lcd, int cmd);
33 void (*write_data)(struct charlcd *lcd, int data);
34
35 /* Optional */
36 void (*write_cmd_raw4)(struct charlcd *lcd, int cmd); /* 4-bit only */
37 void (*clear_fast)(struct charlcd *lcd);
38 void (*backlight)(struct charlcd *lcd, enum charlcd_onoff on);
39};
40
26};
27
28struct charlcd_ops {
29 /* Required */
30 void (*write_cmd)(struct charlcd *lcd, int cmd);
31 void (*write_data)(struct charlcd *lcd, int data);
32
33 /* Optional */
34 void (*write_cmd_raw4)(struct charlcd *lcd, int cmd); /* 4-bit only */
35 void (*clear_fast)(struct charlcd *lcd);
36 void (*backlight)(struct charlcd *lcd, enum charlcd_onoff on);
37};
38
41struct charlcd *charlcd_alloc(unsigned int drvdata_size);
39struct charlcd *charlcd_alloc(void);
42void charlcd_free(struct charlcd *lcd);
43
44int charlcd_register(struct charlcd *lcd);
45int charlcd_unregister(struct charlcd *lcd);
46
47void charlcd_poke(struct charlcd *lcd);
48
49#endif /* CHARLCD_H */
40void charlcd_free(struct charlcd *lcd);
41
42int charlcd_register(struct charlcd *lcd);
43int charlcd_unregister(struct charlcd *lcd);
44
45void charlcd_poke(struct charlcd *lcd);
46
47#endif /* CHARLCD_H */