From: Przemyslaw Marczak Date: Wed, 2 Apr 2014 14:13:59 +0000 (+0200) Subject: lib: tizen: thor screen update X-Git-Tag: submit/tizen_common/20141030.153846~50 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=dc90dd1de91db293168f43cec66097ff3faa3800;p=platform%2Fkernel%2Fu-boot.git lib: tizen: thor screen update Now cable connection message is displayed on thor screen. When cable is connected then only unneeded lcd console lines are overwritten. Main changes: - add new function: draw_thor_connected() - update function draw_thor_screen() - usb: gadget: thor: - move call to draw_thor_screen(), - add call to draw_thor_connected() other change: - remove draw_thor_init_screen() function Change-Id: Ifc33f63eeb4822551fc78af1c6dd2a03044cab7e Signed-off-by: Przemyslaw Marczak --- diff --git a/drivers/usb/gadget/f_thor.c b/drivers/usb/gadget/f_thor.c index 1eb6a52..650b249 100644 --- a/drivers/usb/gadget/f_thor.c +++ b/drivers/usb/gadget/f_thor.c @@ -700,7 +700,7 @@ int thor_init(void) int power_key_cnt = 0; #ifdef CONFIG_TIZEN - draw_thor_init_screen(); + draw_thor_screen(); #endif /* Wait for a device enumeration and configuration settings */ debug("THOR enumeration/configuration setting....\n"); @@ -717,7 +717,7 @@ int thor_init(void) } } #ifdef CONFIG_TIZEN - draw_thor_screen(); + draw_thor_connected(); #endif thor_set_dma(thor_rx_data_buf, strlen("THOR")); /* detect the download request from Host PC */ diff --git a/include/libtizen.h b/include/libtizen.h index 3d31d22..fb47b26 100644 --- a/include/libtizen.h +++ b/include/libtizen.h @@ -14,8 +14,8 @@ void get_tizen_logo_info(vidinfo_t *vid); void draw_thor_progress(unsigned long long int total_file_size, unsigned long long int downloaded_file_size); -void draw_thor_init_screen(void); void draw_thor_screen(void); +void draw_thor_connected(void); void draw_thor_fail_screen(void); void draw_thor_cable_info(void); diff --git a/lib/tizen/tizen.c b/lib/tizen/tizen.c index 48a5708..53ee77b 100644 --- a/lib/tizen/tizen.c +++ b/lib/tizen/tizen.c @@ -62,11 +62,25 @@ void draw_thor_fail_screen(void) bmp_display((unsigned long)download_fail_text, x, y); } -void draw_thor_init_screen(void) +static unsigned int tmp_msg_x, tmp_msg_y; + +void draw_thor_connected(void) { - lcd_clear(); - lcd_printf("\n\n\tConnect USB cable for start THOR."); - lcd_printf("\n\n\tFor EXIT press POWERKEY 3 times.\n"); + unsigned int prev_console_x, prev_console_y; + + /* Get curent lcd xy */ + lcd_get_position_cursor(&prev_console_x, &prev_console_y); + + /* Set proper lcd xy position for clean unneeded messages */ + lcd_set_position_cursor(tmp_msg_x, tmp_msg_y); + lcd_puts("\n\n "); + lcd_puts("\n\n "); + + lcd_set_position_cursor(tmp_msg_x, tmp_msg_y); + lcd_printf("\n\n\tConnection established."); + + /* Restore last lcd x y position */ + lcd_set_position_cursor(prev_console_x, prev_console_y); } void draw_thor_screen(void) @@ -74,6 +88,22 @@ void draw_thor_screen(void) int x, y; lcd_clear(); + lcd_printf("\n\n\tTHOR Tizen Downloader"); + + lcd_printf("\n\n\tU-BOOT bootloader info:"); + lcd_printf("\n\tCompilation date: %s\n\tBinary version: %s\n", + U_BOOT_DATE, PLAIN_VERSION); + + char *pit_compatible = getenv("dfu_alt_pit_compatible"); + if (pit_compatible) { + lcd_printf("\tPlatform compatible with PIT Version: %s\n", + pit_compatible); + }; + + lcd_get_position_cursor(&tmp_msg_x, &tmp_msg_y); + + lcd_printf("\n\n\tPlease connect USB cable."); + lcd_printf("\n\n\tFor EXIT press POWERKEY 3 times.\n"); x = 199 + LOGO_X_OFS; y = 272 + LOGO_Y_OFS; @@ -90,15 +120,6 @@ void draw_thor_screen(void) bmp_display((unsigned long)prog_base, x, y); - lcd_printf("%s (%s)\n", U_BOOT_VERSION, U_BOOT_DATE); - - lcd_printf("\nConnection established\n"); - - char *pit_compatible = getenv("dfu_alt_pit_compatible"); - if (pit_compatible) { - lcd_printf("Platform compatible with PIT Version: %s\n", - pit_compatible); - }; } void draw_thor_progress(unsigned long long int total_file_size,