Przeglądaj źródła

Fix zephyr samples build issue caused by zephyr kernel API update (#232)

* Clean compiling warnings of zephyr samples

* Support xtensa AOT and fix build issue of alios

* Refine wgl native functions call

* Fix zephyr samples build issue caused by zephyr kernel API update
Weining 5 lat temu
rodzic
commit
ffd975d2d6

+ 1 - 1
core/app-mgr/app-manager/platform/zephyr/app_mgr_zephyr.c

@@ -38,7 +38,7 @@ void app_manager_timer_destroy(void *timer)
 
 void app_manager_timer_start(void *timer, int timeout)
 {
-    k_timer_start(timer, timeout, 0);
+    k_timer_start(timer, Z_TIMEOUT_MS(timeout), Z_TIMEOUT_MS(0));
 }
 
 void app_manager_timer_stop(void *timer)

+ 4 - 4
samples/gui/wasm-runtime-wgl/src/platform/zephyr/display_ili9340.c

@@ -38,7 +38,7 @@ struct ili9340_data ili9340_data1;
 static void ili9340_exit_sleep(struct ili9340_data *data)
 {
     ili9340_transmit(data, ILI9340_CMD_EXIT_SLEEP, NULL, 0);
-    //k_sleep(120);
+    //k_sleep(Z_TIMEOUT_MS(120));
 }
 
 int ili9340_init()
@@ -82,11 +82,11 @@ int ili9340_init()
 
     LOG_DBG("Resetting display driver\n");
     gpio_pin_set(data->reset_gpio, DT_ILITEK_ILI9340_0_RESET_GPIOS_PIN, 1);
-    k_sleep(1);
+    k_sleep(Z_TIMEOUT_MS(1));
     gpio_pin_set(data->reset_gpio, DT_ILITEK_ILI9340_0_RESET_GPIOS_PIN, 0);
-    k_sleep(1);
+    k_sleep(Z_TIMEOUT_MS(1));
     gpio_pin_set(data->reset_gpio, DT_ILITEK_ILI9340_0_RESET_GPIOS_PIN, 1);
-    k_sleep(5);
+    k_sleep(Z_TIMEOUT_MS(5));
 
     LOG_DBG("Initializing LCD\n");
     ili9340_lcd_init(data);

+ 1 - 1
samples/gui/wasm-runtime-wgl/src/platform/zephyr/main.c

@@ -16,7 +16,7 @@ void main(void)
 {
     iwasm_main();
     for(;;){
-        k_sleep(1000);
+        k_sleep(Z_TIMEOUT_MS(1000));
     }
 }
 

+ 4 - 4
samples/littlevgl/vgl-wasm-runtime/src/platform/zephyr/display_ili9340.c

@@ -38,7 +38,7 @@ struct ili9340_data ili9340_data1;
 static void ili9340_exit_sleep(struct ili9340_data *data)
 {
     ili9340_transmit(data, ILI9340_CMD_EXIT_SLEEP, NULL, 0);
-    //k_sleep(120);
+    //k_sleep(Z_TIMEOUT_MS(120));
 }
 
 int ili9340_init()
@@ -82,11 +82,11 @@ int ili9340_init()
 
     LOG_DBG("Resetting display driver\n");
     gpio_pin_set(data->reset_gpio, DT_ILITEK_ILI9340_0_RESET_GPIOS_PIN, 1);
-    k_sleep(1);
+    k_sleep(Z_TIMEOUT_MS(1));
     gpio_pin_set(data->reset_gpio, DT_ILITEK_ILI9340_0_RESET_GPIOS_PIN, 0);
-    k_sleep(1);
+    k_sleep(Z_TIMEOUT_MS(1));
     gpio_pin_set(data->reset_gpio, DT_ILITEK_ILI9340_0_RESET_GPIOS_PIN, 1);
-    k_sleep(5);
+    k_sleep(Z_TIMEOUT_MS(5));
 
     LOG_DBG("Initializing LCD\n");
     ili9340_lcd_init(data);

+ 1 - 1
samples/littlevgl/vgl-wasm-runtime/src/platform/zephyr/main.c

@@ -18,7 +18,7 @@ void main(void)
     display_init();
     iwasm_main();
     for(;;){
-        k_sleep(1000);
+        k_sleep(Z_TIMEOUT_MS(1000));
     }
 }