diff --git a/bsp/simulator/applications/application.c b/bsp/simulator/applications/application.c index 56c8f6f565..656da63f61 100755 --- a/bsp/simulator/applications/application.c +++ b/bsp/simulator/applications/application.c @@ -27,6 +27,7 @@ #include extern int platform_init(void); +extern int platform_post_init(void); extern int mnt_init(void); void rt_init_thread_entry(void *parameter) @@ -36,7 +37,9 @@ void rt_init_thread_entry(void *parameter) platform_init(); mnt_init(); -#if defined(PKG_USING_GUIENGINE) && defined(RTGUI_USING_DEMO) + platform_post_init(); + +#if defined(PKG_USING_GUIENGINE) && defined(GUIENGINE_USING_DEMO) { extern int rt_gui_demo_init(void); rt_gui_demo_init(); diff --git a/bsp/simulator/applications/platform.c b/bsp/simulator/applications/platform.c index 3ee4a59e88..f4b0db41eb 100644 --- a/bsp/simulator/applications/platform.c +++ b/bsp/simulator/applications/platform.c @@ -29,6 +29,11 @@ int platform_init(void) #endif /* RT_USING_DFS */ + return 0; +} + +int platform_post_init(void) +{ #ifdef PKG_USING_GUIENGINE { extern void rt_hw_sdl_start(void); diff --git a/bsp/simulator/drivers/sdl_fb.c b/bsp/simulator/drivers/sdl_fb.c index 0bdda9c4f9..98da565a2a 100755 --- a/bsp/simulator/drivers/sdl_fb.c +++ b/bsp/simulator/drivers/sdl_fb.c @@ -73,7 +73,7 @@ int sdlfb_info(int *format, int *bpp) } static rt_mutex_t sdllock; -static rt_err_t sdlfb_control(rt_device_t dev, rt_uint8_t cmd, void *args) +static rt_err_t sdlfb_control(rt_device_t dev, int cmd, void *args) { struct sdlfb_device *device;