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 * lcd_init_console() - Initialize lcd console parameters
15 * Setup the address of console base, and the number of rows and columns the
18 * @address: Console base address
19 * @rows: Number of rows in the console
20 * @cols: Number of columns in the console
22 void lcd_init_console(void *address, int rows, int cols);
25 * lcd_set_col() - Set the number of the current lcd console column
27 * Set the number of the console column where the cursor is.
31 void lcd_set_col(short col);
34 * lcd_set_row() - Set the number of the current lcd console row
36 * Set the number of the console row where the cursor is.
40 void lcd_set_row(short row);
43 * lcd_position_cursor() - Position the cursor on the screen
45 * Position the cursor at the given coordinates on the screen.
50 void lcd_position_cursor(unsigned col, unsigned row);
53 * lcd_get_screen_rows() - Get the total number of screen rows
55 * @return: Number of screen rows
57 int lcd_get_screen_rows(void);
60 * lcd_get_screen_columns() - Get the total number of screen columns
62 * @return: Number of screen columns
64 int lcd_get_screen_columns(void);
67 * lcd_putc() - Print to screen a single character at the location of the cursor
69 * @c: The character to print
71 void lcd_putc(const char c);
74 * lcd_puts() - Print to screen a string at the location of the cursor
76 * @s: The string to print
78 void lcd_puts(const char *s);
81 * lcd_printf() - Print to screen a formatted string at location of the cursor
83 * @fmt: The formatted string to print
84 * @...: The arguments for the formatted string
86 void lcd_printf(const char *fmt, ...);