]>
Commit | Line | Data |
---|---|---|
39f8ea46 GU |
1 | /* |
2 | * Character LCD driver for Linux | |
3 | * | |
4 | * Copyright (C) 2000-2008, Willy Tarreau <w@1wt.eu> | |
5 | * Copyright (C) 2016-2017 Glider bvba | |
6 | * | |
7 | * This program is free software; you can redistribute it and/or | |
8 | * modify it under the terms of the GNU General Public License | |
9 | * as published by the Free Software Foundation; either version | |
10 | * 2 of the License, or (at your option) any later version. | |
11 | */ | |
12 | ||
13 | struct charlcd { | |
14 | const struct charlcd_ops *ops; | |
15 | const unsigned char *char_conv; /* Optional */ | |
16 | ||
ac201479 | 17 | int ifwidth; /* 4-bit or 8-bit (default) */ |
39f8ea46 GU |
18 | int height; |
19 | int width; | |
20 | int bwidth; /* Default set by charlcd_alloc() */ | |
21 | int hwidth; /* Default set by charlcd_alloc() */ | |
22 | ||
23 | void *drvdata; /* Set by charlcd_alloc() */ | |
24 | }; | |
25 | ||
26 | struct charlcd_ops { | |
27 | /* Required */ | |
28 | void (*write_cmd)(struct charlcd *lcd, int cmd); | |
29 | void (*write_data)(struct charlcd *lcd, int data); | |
30 | ||
31 | /* Optional */ | |
ac201479 | 32 | void (*write_cmd_raw4)(struct charlcd *lcd, int cmd); /* 4-bit only */ |
39f8ea46 GU |
33 | void (*clear_fast)(struct charlcd *lcd); |
34 | void (*backlight)(struct charlcd *lcd, int on); | |
35 | }; | |
36 | ||
37 | struct charlcd *charlcd_alloc(unsigned int drvdata_size); | |
38 | ||
39 | int charlcd_register(struct charlcd *lcd); | |
40 | int charlcd_unregister(struct charlcd *lcd); | |
41 | ||
42 | void charlcd_poke(struct charlcd *lcd); |