summaryrefslogblamecommitdiff
path: root/drivers/auxdisplay/charlcd.h
blob: ad6fd273352357a2f64b5edb8662d9805dbaa493 (plain) (tree)
1
2
3
4
5
6
7
8
                                               




                                                    

   


                  




                        





                                                      
 
                      


                    
                                                
                                                                      

  
                                    
                                       




                                            

                      
/* SPDX-License-Identifier: GPL-2.0-or-later */
/*
 * Character LCD driver for Linux
 *
 * Copyright (C) 2000-2008, Willy Tarreau <w@1wt.eu>
 * Copyright (C) 2016-2017 Glider bvba
 */

#ifndef _CHARLCD_H
#define _CHARLCD_H

enum charlcd_onoff {
	CHARLCD_OFF = 0,
	CHARLCD_ON,
};

struct charlcd {
	const struct charlcd_ops *ops;
	const unsigned char *char_conv;	/* Optional */

	int height;
	int width;

	void *drvdata;
};

struct charlcd_ops {
	void (*clear_fast)(struct charlcd *lcd);
	void (*backlight)(struct charlcd *lcd, enum charlcd_onoff on);
};

struct charlcd *charlcd_alloc(void);
void charlcd_free(struct charlcd *lcd);

int charlcd_register(struct charlcd *lcd);
int charlcd_unregister(struct charlcd *lcd);

void charlcd_poke(struct charlcd *lcd);

#endif /* CHARLCD_H */