2011-04-17 16:59:51 +02:00
|
|
|
#ifndef _LCD_H_
|
|
|
|
#define _LCD_H_
|
|
|
|
|
2012-02-14 20:29:05 +01:00
|
|
|
#define LCD_EVENT_INIT 0x00 /* lcd initialized */
|
|
|
|
#define LCD_EVENT_UPDATE 0x01 /* update data */
|
|
|
|
#define LCD_EVENT_BUTTON1 0x02 /* button1 pressed */
|
|
|
|
#define LCD_EVENT_BUTTON2 0x03 /* button2 pressed */
|
|
|
|
#define LCD_EVENT_BACKLIGHT 0x04 /* backlight timeout */
|
2011-04-17 16:59:51 +02:00
|
|
|
|
|
|
|
struct lcddev; /* private data */
|
|
|
|
|
2011-04-17 17:37:38 +02:00
|
|
|
struct lcddev * lcd_init(const char *device,
|
2011-04-22 14:55:36 +02:00
|
|
|
int (*event_callback)(struct lcddev *dev, int event, void *privdata),
|
|
|
|
void *event_privdata);
|
2011-04-17 17:37:38 +02:00
|
|
|
|
|
|
|
void lcd_close(struct lcddev *dev);
|
2011-04-18 21:59:49 +02:00
|
|
|
void lcd_reset(struct lcddev *dev);
|
|
|
|
|
2011-04-22 14:55:36 +02:00
|
|
|
#define LCD_BACKLIGHT_OFF (0)
|
|
|
|
#define LCD_BACKLIGHT_ON (-1)
|
|
|
|
|
2011-04-18 21:59:49 +02:00
|
|
|
int lcd_trigger_backlight(struct lcddev *dev, int timeout);
|
|
|
|
int lcd_setlines(struct lcddev *dev, int scrollspeed, const char *line1, const char *line2);
|
2011-04-17 16:59:51 +02:00
|
|
|
|
|
|
|
#endif /* _LCD_H_ */
|