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)
committerJoonyoung Shim <jy0922.shim@samsung.com>
Thu, 15 Jan 2015 06:35:41 +0000 (15:35 +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>
common/cmd_thordown.c
drivers/usb/gadget/f_thor.c
include/libtizen.h

index 18a84cf243465ed187488359f1d2a206e419ee69..76438e4ff9ab6abd8198b1785cfde74fc2d6103e 100644 (file)
@@ -65,9 +65,14 @@ done:
        dfu_free_entities();
 
 #ifdef CONFIG_TIZEN
-       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
        return ret;
index fddd244b8ce9ab6719a9924f9564a48f393e21b0..4e7152791705ecd483ec86015f434d67fd6119d5 100644 (file)
@@ -577,7 +577,13 @@ static int thor_rx_data(void)
                data_to_rx -= dev->out_req->actual;
 #ifdef CONFIG_TIZEN
                downloaded_file_size += dev->out_req->actual;
+#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
        } while (data_to_rx);
 
@@ -723,7 +729,12 @@ int thor_init(void)
        int power_key_cnt = 0;
 
 #ifdef CONFIG_TIZEN
+#ifdef CONFIG_OF_MULTI
+       if (board_is_trats2())
+               draw_thor_screen();
+#else
        draw_thor_screen();
+#endif
 #endif
        /* Wait for a device enumeration and configuration settings */
        debug("THOR enumeration/configuration setting....\n");
@@ -740,7 +751,12 @@ int thor_init(void)
                }
        }
 #ifdef CONFIG_TIZEN
+#ifdef CONFIG_OF_MULTI
+       if (board_is_trats2())
+               draw_thor_connected();
+#else
        draw_thor_connected();
+#endif
 #endif
        thor_set_dma(thor_rx_data_buf, strlen("THOR"));
        /* detect the download request from Host PC */
index fc5df1f86783abccd6a5e0cd103058a7e899150e..1ab4ac618a0cdfa320eac39e45d43a26ce3ea9e3 100644 (file)
@@ -9,6 +9,7 @@
 #define _LIBTIZEN_H_
 
 #include <lcd.h>
+#include <samsung/misc.h>
 
 #define HD_RESOLUTION  0