Skip to content

Commit

Permalink
Fix zephyr samples build issue caused by zephyr kernel API update (by…
Browse files Browse the repository at this point in the history
…tecodealliance#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
  • Loading branch information
Weining2019 authored Apr 12, 2020
1 parent 5f7b946 commit 6277f10
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion core/app-mgr/app-manager/platform/zephyr/app_mgr_zephyr.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion samples/gui/wasm-runtime-wgl/src/platform/zephyr/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ void main(void)
{
iwasm_main();
for(;;){
k_sleep(1000);
k_sleep(Z_TIMEOUT_MS(1000));
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ void main(void)
display_init();
iwasm_main();
for(;;){
k_sleep(1000);
k_sleep(Z_TIMEOUT_MS(1000));
}
}

0 comments on commit 6277f10

Please sign in to comment.