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 */
8 #ifndef CONFIG_CONSOLE_SCROLL_LINES
9 #define CONFIG_CONSOLE_SCROLL_LINES 1
13 short curr_col, curr_row;
16 u32 lcdsizex, lcdsizey, lcdrot;
17 void (*fp_putc_xy)(struct console_t *pcons, ushort x, ushort y, char c);
18 void (*fp_console_moverow)(struct console_t *pcons,
19 u32 rowdst, u32 rowsrc);
20 void (*fp_console_setrow)(struct console_t *pcons, u32 row, int clr);
24 * console_calc_rowcol() - calculate available rows / columns wihtin a given
25 * screen-size based on used VIDEO_FONT.
27 * @pcons: Pointer to struct console_t
28 * @sizex: size X of the screen in pixel
29 * @sizey: size Y of the screen in pixel
31 void console_calc_rowcol(struct console_t *pcons, u32 sizex, u32 sizey);
33 * lcd_init_console() - Initialize lcd console parameters
35 * Setup the address of console base, and the number of rows and columns the
38 * @address: Console base address
39 * @vl_rows: Number of rows in the console
40 * @vl_cols: Number of columns in the console
41 * @vl_rot: Rotation of display in degree (0 - 90 - 180 - 270) counterlockwise
43 void lcd_init_console(void *address, int vl_cols, int vl_rows, int vl_rot);
45 * lcd_set_col() - Set the number of the current lcd console column
47 * Set the number of the console column where the cursor is.
51 void lcd_set_col(short col);
54 * lcd_set_row() - Set the number of the current lcd console row
56 * Set the number of the console row where the cursor is.
60 void lcd_set_row(short row);
63 * lcd_position_cursor() - Position the cursor on the screen
65 * Position the cursor at the given coordinates on the screen.
70 void lcd_position_cursor(unsigned col, unsigned row);
73 * lcd_get_screen_rows() - Get the total number of screen rows
75 * @return: Number of screen rows
77 int lcd_get_screen_rows(void);
80 * lcd_get_screen_columns() - Get the total number of screen columns
82 * @return: Number of screen columns
84 int lcd_get_screen_columns(void);
87 * lcd_putc() - Print to screen a single character at the location of the cursor
89 * @c: The character to print
91 void lcd_putc(const char c);
94 * lcd_puts() - Print to screen a string at the location of the cursor
96 * @s: The string to print
98 void lcd_puts(const char *s);
101 * lcd_printf() - Print to screen a formatted string at location of the cursor
103 * @fmt: The formatted string to print
104 * @...: The arguments for the formatted string
106 void lcd_printf(const char *fmt, ...);