thor: check board type before display for CONFIG_OF_MULTI.
authorPrzemyslaw Marczak <p.marczak@samsung.com>
Thu, 18 Sep 2014 13:27:59 +0000 (15:27 +0200)
committerJaehoon Chung <jh80.chung@samsung.com>
Wed, 5 Apr 2017 09:57:05 +0000 (18:57 +0900)
For multi platform binary, it is required to check
the board type because not every board supports display.

Change-Id: Ia4153d58f48846a0bec6e9dc90ea17d87d5da096
Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
cmd/thordown.c
drivers/usb/gadget/f_thor.c
include/libtizen.h

index f2322bb30bc3ba5cddd7ee8a82768bb7b449a0b3..2b4ea8a4eb409874748fd45ad8d0a8a75f74f6cc 100644 (file)
@@ -67,9 +67,14 @@ done:
 
 #ifdef CONFIG_TIZEN
 #ifdef CONFIG_LCD      /* TODO : Need to enable LCD */
-       if (ret != CMD_RET_SUCCESS)
+       if (ret != CMD_RET_SUCCESS) {
+#ifdef CONFIG_OF_MULTI
+               if (board_is_trats2())
+                       draw_thor_fail_screen();
+#else
                draw_thor_fail_screen();
-       else
+#endif
+       } else
                lcd_clear();
 #endif
 #endif
index ad7d19cd0cbeaca4ee6d86b75e8395fe94972780..2a97299b93827654196e993b5a637a24e6e298bf 100644 (file)
@@ -579,9 +579,15 @@ static int thor_rx_data(void)
 #ifdef CONFIG_TIZEN
                downloaded_file_size += dev->out_req->actual;
 #ifdef CONFIG_LCD      /* TODO : Need to enable LCD*/
+#ifdef CONFIG_OF_MULTI
+               if (board_is_trats2())
+                       draw_thor_progress(total_file_size,
+                                          downloaded_file_size);
+#else
                draw_thor_progress(total_file_size, downloaded_file_size);
 #endif
 #endif
+#endif /* CONFIG_TIZEN */
        } while (data_to_rx);
 
        return tmp;
@@ -728,9 +734,14 @@ int thor_init(void)
 #ifdef CONFIG_TIZEN
 #ifdef CONFIG_LCD      /* TODO : Need to enable LCD*/
        draw_thor_init_screen();
+#ifdef CONFIG_OF_MULTI
+       if (board_is_trats2())
+               draw_thor_screen();
+#else
        draw_thor_screen();
 #endif
 #endif
+#endif /* CONFIG_TIZEN */
        /* Wait for a device enumeration and configuration settings */
        debug("THOR enumeration/configuration setting....\n");
        while (!dev->configuration_done) {
@@ -748,9 +759,14 @@ int thor_init(void)
 #ifdef CONFIG_TIZEN
 #ifdef CONFIG_LCD      /* TODO : Need to enable LCD*/
        draw_thor_screen();
+#ifdef CONFIG_OF_MULTI
+       if (board_is_trats2())
+               draw_thor_connected();
+#else
        draw_thor_connected();
 #endif
 #endif
+#endif /* CONFIG_TIZEN */
        thor_set_dma(thor_rx_data_buf, strlen("THOR"));
        /* detect the download request from Host PC */
        if (thor_rx_data() < 0) {
index 07b9497e9a324630d91627741da7b1ee096371c8..cce5f40848f5e52a4dc615f03e400089496023c2 100644 (file)
@@ -9,6 +9,7 @@
 #define _LIBTIZEN_H_
 
 #include <lcd.h>
+#include <samsung/misc.h>
 
 #define HD_RESOLUTION  0