2019-05-27 14:55:01 +08:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0-or-later */
|
2017-03-10 22:15:17 +08:00
|
|
|
/*
|
|
|
|
* Character LCD driver for Linux
|
|
|
|
*
|
|
|
|
* Copyright (C) 2000-2008, Willy Tarreau <w@1wt.eu>
|
|
|
|
* Copyright (C) 2016-2017 Glider bvba
|
|
|
|
*/
|
|
|
|
|
2019-08-06 15:14:45 +08:00
|
|
|
#ifndef _CHARLCD_H
|
|
|
|
#define _CHARLCD_H
|
|
|
|
|
2020-11-03 17:58:04 +08:00
|
|
|
enum charlcd_onoff {
|
|
|
|
CHARLCD_OFF = 0,
|
|
|
|
CHARLCD_ON,
|
|
|
|
};
|
|
|
|
|
2017-03-10 22:15:17 +08:00
|
|
|
struct charlcd {
|
|
|
|
const struct charlcd_ops *ops;
|
|
|
|
const unsigned char *char_conv; /* Optional */
|
|
|
|
|
|
|
|
int height;
|
|
|
|
int width;
|
|
|
|
|
2020-11-03 17:58:10 +08:00
|
|
|
/* Contains the LCD X and Y offset */
|
|
|
|
struct {
|
|
|
|
unsigned long x;
|
|
|
|
unsigned long y;
|
|
|
|
} addr;
|
|
|
|
|
2020-11-03 17:58:06 +08:00
|
|
|
void *drvdata;
|
2017-03-10 22:15:17 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
struct charlcd_ops {
|
|
|
|
void (*clear_fast)(struct charlcd *lcd);
|
2020-11-03 17:58:04 +08:00
|
|
|
void (*backlight)(struct charlcd *lcd, enum charlcd_onoff on);
|
2017-03-10 22:15:17 +08:00
|
|
|
};
|
|
|
|
|
2020-11-03 17:58:06 +08:00
|
|
|
struct charlcd *charlcd_alloc(void);
|
2019-03-12 22:44:30 +08:00
|
|
|
void charlcd_free(struct charlcd *lcd);
|
2017-03-10 22:15:17 +08:00
|
|
|
|
|
|
|
int charlcd_register(struct charlcd *lcd);
|
|
|
|
int charlcd_unregister(struct charlcd *lcd);
|
|
|
|
|
|
|
|
void charlcd_poke(struct charlcd *lcd);
|
2019-08-06 15:14:45 +08:00
|
|
|
|
|
|
|
#endif /* CHARLCD_H */
|