2 * Copyright (C) 2014, Compulab Ltd - http://compulab.co.il/
4 * SPDX-License-Identifier: GPL-2.0+
7 /* By default we scroll by a single line */
10 short curr_col, curr_row;
13 u32 lcdsizex, lcdsizey, lcdrot;
14 void (*fp_putc_xy)(struct console_t *pcons, ushort x, ushort y, char c);
15 void (*fp_console_moverow)(struct console_t *pcons,
16 u32 rowdst, u32 rowsrc);
17 void (*fp_console_setrow)(struct console_t *pcons, u32 row, int clr);
21 * console_calc_rowcol() - calculate available rows / columns wihtin a given
22 * screen-size based on used VIDEO_FONT.
24 * @pcons: Pointer to struct console_t
25 * @sizex: size X of the screen in pixel
26 * @sizey: size Y of the screen in pixel
28 void console_calc_rowcol(struct console_t *pcons, u32 sizex, u32 sizey);
30 * lcd_init_console() - Initialize lcd console parameters
32 * Setup the address of console base, and the number of rows and columns the
35 * @address: Console base address
36 * @vl_rows: Number of rows in the console
37 * @vl_cols: Number of columns in the console
38 * @vl_rot: Rotation of display in degree (0 - 90 - 180 - 270) counterlockwise
40 void lcd_init_console(void *address, int vl_cols, int vl_rows, int vl_rot);
42 * lcd_set_col() - Set the number of the current lcd console column
44 * Set the number of the console column where the cursor is.
48 void lcd_set_col(short col);
51 * lcd_set_row() - Set the number of the current lcd console row
53 * Set the number of the console row where the cursor is.
57 void lcd_set_row(short row);
60 * lcd_position_cursor() - Position the cursor on the screen
62 * Position the cursor at the given coordinates on the screen.
67 void lcd_position_cursor(unsigned col, unsigned row);
70 * lcd_get_screen_rows() - Get the total number of screen rows
72 * @return: Number of screen rows
74 int lcd_get_screen_rows(void);
77 * lcd_get_screen_columns() - Get the total number of screen columns
79 * @return: Number of screen columns
81 int lcd_get_screen_columns(void);
84 * lcd_putc() - Print to screen a single character at the location of the cursor
86 * @c: The character to print
88 void lcd_putc(const char c);
91 * lcd_puts() - Print to screen a string at the location of the cursor
93 * @s: The string to print
95 void lcd_puts(const char *s);
98 * lcd_printf() - Print to screen a formatted string at location of the cursor
100 * @fmt: The formatted string to print
101 * @...: The arguments for the formatted string
103 void lcd_printf(const char *fmt, ...);