1 /* SPDX-License-Identifier: GPL-2.0+ */
3 * Copyright (C) 2014, Compulab Ltd - http://compulab.co.il/
6 /* By default we scroll by a single line */
9 short curr_col, curr_row;
12 u32 lcdsizex, lcdsizey, lcdrot;
13 void (*fp_putc_xy)(struct console_t *pcons, ushort x, ushort y, char c);
14 void (*fp_console_moverow)(struct console_t *pcons,
15 u32 rowdst, u32 rowsrc);
16 void (*fp_console_setrow)(struct console_t *pcons, u32 row, int clr);
20 * console_calc_rowcol() - calculate available rows / columns wihtin a given
21 * screen-size based on used VIDEO_FONT.
23 * @pcons: Pointer to struct console_t
24 * @sizex: size X of the screen in pixel
25 * @sizey: size Y of the screen in pixel
27 void console_calc_rowcol(struct console_t *pcons, u32 sizex, u32 sizey);
29 * lcd_init_console() - Initialize lcd console parameters
31 * Setup the address of console base, and the number of rows and columns the
34 * @address: Console base address
35 * @vl_rows: Number of rows in the console
36 * @vl_cols: Number of columns in the console
37 * @vl_rot: Rotation of display in degree (0 - 90 - 180 - 270) counterlockwise
39 void lcd_init_console(void *address, int vl_cols, int vl_rows, int vl_rot);
41 * lcd_set_col() - Set the number of the current lcd console column
43 * Set the number of the console column where the cursor is.
47 void lcd_set_col(short col);
50 * lcd_set_row() - Set the number of the current lcd console row
52 * Set the number of the console row where the cursor is.
56 void lcd_set_row(short row);
59 * lcd_position_cursor() - Position the cursor on the screen
61 * Position the cursor at the given coordinates on the screen.
66 void lcd_position_cursor(unsigned col, unsigned row);
69 * lcd_get_screen_rows() - Get the total number of screen rows
71 * @return: Number of screen rows
73 int lcd_get_screen_rows(void);
76 * lcd_get_screen_columns() - Get the total number of screen columns
78 * @return: Number of screen columns
80 int lcd_get_screen_columns(void);
83 * lcd_putc() - Print to screen a single character at the location of the cursor
85 * @c: The character to print
87 void lcd_putc(const char c);
90 * lcd_puts() - Print to screen a string at the location of the cursor
92 * @s: The string to print
94 void lcd_puts(const char *s);
97 * lcd_printf() - Print to screen a formatted string at location of the cursor
99 * @fmt: The formatted string to print
100 * @...: The arguments for the formatted string
102 void lcd_printf(const char *fmt, ...);