1 /* 2 * Copyright (C) 2014, Compulab Ltd - http://compulab.co.il/ 3 * 4 * SPDX-License-Identifier: GPL-2.0+ 5 */ 6 7 /* By default we scroll by a single line */ 8 #ifndef CONFIG_CONSOLE_SCROLL_LINES 9 #define CONFIG_CONSOLE_SCROLL_LINES 1 10 #endif 11 12 /** 13 * lcd_init_console() - Initialize lcd console parameters 14 * 15 * Setup the address of console base, and the number of rows and columns the 16 * console has. 17 * 18 * @address: Console base address 19 * @rows: Number of rows in the console 20 * @cols: Number of columns in the console 21 */ 22 void lcd_init_console(void *address, int rows, int cols); 23 24 /** 25 * lcd_set_col() - Set the number of the current lcd console column 26 * 27 * Set the number of the console column where the cursor is. 28 * 29 * @col: Column number 30 */ 31 void lcd_set_col(short col); 32 33 /** 34 * lcd_set_row() - Set the number of the current lcd console row 35 * 36 * Set the number of the console row where the cursor is. 37 * 38 * @row: Row number 39 */ 40 void lcd_set_row(short row); 41 42 /** 43 * lcd_position_cursor() - Position the cursor on the screen 44 * 45 * Position the cursor at the given coordinates on the screen. 46 * 47 * @col: Column number 48 * @row: Row number 49 */ 50 void lcd_position_cursor(unsigned col, unsigned row); 51 52 /** 53 * lcd_get_screen_rows() - Get the total number of screen rows 54 * 55 * @return: Number of screen rows 56 */ 57 int lcd_get_screen_rows(void); 58 59 /** 60 * lcd_get_screen_columns() - Get the total number of screen columns 61 * 62 * @return: Number of screen columns 63 */ 64 int lcd_get_screen_columns(void); 65 66 /** 67 * lcd_putc() - Print to screen a single character at the location of the cursor 68 * 69 * @c: The character to print 70 */ 71 void lcd_putc(const char c); 72 73 /** 74 * lcd_puts() - Print to screen a string at the location of the cursor 75 * 76 * @s: The string to print 77 */ 78 void lcd_puts(const char *s); 79 80 /** 81 * lcd_printf() - Print to screen a formatted string at location of the cursor 82 * 83 * @fmt: The formatted string to print 84 * @...: The arguments for the formatted string 85 */ 86 void lcd_printf(const char *fmt, ...); 87