diff options
Diffstat (limited to 'include/misc')
| -rw-r--r-- | include/misc/charlcd.h | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/include/misc/charlcd.h b/include/misc/charlcd.h new file mode 100644 index 000000000000..c40047b673c9 --- /dev/null +++ b/include/misc/charlcd.h | |||
| @@ -0,0 +1,40 @@ | |||
| 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 | |||
| 17 | int height; | ||
| 18 | int width; | ||
| 19 | int bwidth; /* Default set by charlcd_alloc() */ | ||
| 20 | int hwidth; /* Default set by charlcd_alloc() */ | ||
| 21 | |||
| 22 | void *drvdata; /* Set by charlcd_alloc() */ | ||
| 23 | }; | ||
| 24 | |||
| 25 | struct charlcd_ops { | ||
| 26 | /* Required */ | ||
| 27 | void (*write_cmd)(struct charlcd *lcd, int cmd); | ||
| 28 | void (*write_data)(struct charlcd *lcd, int data); | ||
| 29 | |||
| 30 | /* Optional */ | ||
| 31 | void (*clear_fast)(struct charlcd *lcd); | ||
| 32 | void (*backlight)(struct charlcd *lcd, int on); | ||
| 33 | }; | ||
| 34 | |||
| 35 | struct charlcd *charlcd_alloc(unsigned int drvdata_size); | ||
| 36 | |||
| 37 | int charlcd_register(struct charlcd *lcd); | ||
| 38 | int charlcd_unregister(struct charlcd *lcd); | ||
| 39 | |||
| 40 | void charlcd_poke(struct charlcd *lcd); | ||
