From: Lukasz Majewski Date: Mon, 16 Feb 2015 16:40:25 +0000 (+0100) Subject: common: lcd: extend lcd api by function lcd_get_position_cursor() X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0444eba5e845f83b384618dd6cc1f2ac74512555;p=platform%2Fkernel%2Fu-boot.git common: lcd: extend lcd api by function lcd_get_position_cursor() Changes for v2015.04-rc1: - Moving lcd console related code to lcd_console.c Signed-off-by: Lukasz Majewski --- diff --git a/common/lcd_console.c b/common/lcd_console.c index bb0d7c5485..2d61b2ef00 100644 --- a/common/lcd_console.c +++ b/common/lcd_console.c @@ -16,6 +16,17 @@ static struct console_t cons; +void lcd_set_position_cursor(unsigned col, unsigned row) +{ + lcd_position_cursor(col, row); +} + +void lcd_get_position_cursor(unsigned *col, unsigned *row) +{ + *col = cons.curr_col; + *row = cons.curr_row; +} + void lcd_set_col(short col) { cons.curr_col = col; diff --git a/include/lcd_console.h b/include/lcd_console.h index 2e0f56f990..be692f6d9b 100644 --- a/include/lcd_console.h +++ b/include/lcd_console.h @@ -104,3 +104,19 @@ void lcd_puts(const char *s); * @...: The arguments for the formatted string */ void lcd_printf(const char *fmt, ...); + +/** + * Set the position of the text cursor + * + * @param col Column to place cursor (0 = left side) + * @param row Row to place cursor (0 = top line) + */ +void lcd_set_position_cursor(unsigned col, unsigned row); + +/** + * Get the position of the text cursor + * + * @param *col Pointer to store cursor placement column (0 = left side) + * @param *row Pointer to store cursor placement row (0 = top line) + */ +void lcd_get_position_cursor(unsigned *col, unsigned *row);