diff --git a/core/app-mgr/app-manager/platform/zephyr/app_mgr_zephyr.c b/core/app-mgr/app-manager/platform/zephyr/app_mgr_zephyr.c index 59c471fe9..cca66549c 100644 --- a/core/app-mgr/app-manager/platform/zephyr/app_mgr_zephyr.c +++ b/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) diff --git a/samples/gui/wasm-runtime-wgl/src/platform/zephyr/display_ili9340.c b/samples/gui/wasm-runtime-wgl/src/platform/zephyr/display_ili9340.c index 607030c88..4d4ed390b 100644 --- a/samples/gui/wasm-runtime-wgl/src/platform/zephyr/display_ili9340.c +++ b/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); diff --git a/samples/gui/wasm-runtime-wgl/src/platform/zephyr/main.c b/samples/gui/wasm-runtime-wgl/src/platform/zephyr/main.c index 097d3faff..5b31d005d 100644 --- a/samples/gui/wasm-runtime-wgl/src/platform/zephyr/main.c +++ b/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)); } } diff --git a/samples/littlevgl/vgl-wasm-runtime/src/platform/zephyr/display_ili9340.c b/samples/littlevgl/vgl-wasm-runtime/src/platform/zephyr/display_ili9340.c index 607030c88..4d4ed390b 100644 --- a/samples/littlevgl/vgl-wasm-runtime/src/platform/zephyr/display_ili9340.c +++ b/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); diff --git a/samples/littlevgl/vgl-wasm-runtime/src/platform/zephyr/main.c b/samples/littlevgl/vgl-wasm-runtime/src/platform/zephyr/main.c index b0cb47405..a6fc332b8 100644 --- a/samples/littlevgl/vgl-wasm-runtime/src/platform/zephyr/main.c +++ b/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)); } }