linux/drivers/auxdisplay/charlcd.h

/* SPDX-License-Identifier: GPL-2.0-or-later */
/*
 * Character LCD driver for Linux
 *
 * Copyright (C) 2000-2008, Willy Tarreau <[email protected]>
 * Copyright (C) 2016-2017 Glider bvba
 */

#ifndef _CHARLCD_H
#define _CHARLCD_H

#define LCD_FLAG_B
#define LCD_FLAG_C
#define LCD_FLAG_D
#define LCD_FLAG_F
#define LCD_FLAG_N
#define LCD_FLAG_L

enum charlcd_onoff {};

enum charlcd_shift_dir {};

enum charlcd_fontsize {};

enum charlcd_lines {};

struct charlcd_ops;

struct charlcd {};

/**
 * struct charlcd_ops - Functions used by charlcd. Drivers have to implement
 * these.
 * @backlight: Turn backlight on or off. Optional.
 * @print: Print one character to the display at current cursor position.
 * The buffered cursor position is advanced by charlcd. The cursor should not
 * wrap to the next line at the end of a line.
 * @gotoxy: Set cursor to x, y. The x and y values to set the cursor to are
 * previously set in addr.x and addr.y by charlcd.
 * @home: Set cursor to 0, 0. The values in addr.x and addr.y are set to 0, 0 by
 * charlcd prior to calling this function.
 * @clear_display: Clear the whole display and set the cursor to 0, 0. The
 * values in addr.x and addr.y are set to 0, 0 by charlcd after to calling this
 * function.
 * @init_display: Initialize the display.
 * @shift_cursor: Shift cursor left or right one position.
 * @shift_display: Shift whole display content left or right.
 * @display: Turn display on or off.
 * @cursor: Turn cursor on or off.
 * @blink: Turn cursor blink on or off.
 * @lines: One or two lines.
 * @redefine_char: Redefine the actual pixel matrix of character.
 */
struct charlcd_ops {};

void charlcd_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 */