diff --git a/components/rtgui/include/rtgui/driver.h b/components/rtgui/include/rtgui/driver.h index 1f929d2b02..89ff99f156 100644 --- a/components/rtgui/include/rtgui/driver.h +++ b/components/rtgui/include/rtgui/driver.h @@ -52,8 +52,8 @@ void rtgui_graphic_driver_add(const struct rtgui_graphic_driver* driver); struct rtgui_graphic_driver* rtgui_graphic_driver_get_default(void); void rtgui_graphic_driver_get_rect(const struct rtgui_graphic_driver *driver, rtgui_rect_t *rect); -void rtgui_graphic_driver_screen_update(struct rtgui_graphic_driver* driver, rtgui_rect_t *rect); -rt_uint8_t* rtgui_graphic_driver_get_framebuffer(struct rtgui_graphic_driver* driver); +void rtgui_graphic_driver_screen_update(const struct rtgui_graphic_driver* driver, rtgui_rect_t *rect); +rt_uint8_t* rtgui_graphic_driver_get_framebuffer(const struct rtgui_graphic_driver* driver); rt_err_t rtgui_graphic_set_device(rt_device_t device); diff --git a/components/rtgui/server/driver.c b/components/rtgui/server/driver.c index 93f0195d69..67e4aee909 100644 --- a/components/rtgui/server/driver.c +++ b/components/rtgui/server/driver.c @@ -72,7 +72,7 @@ rt_err_t rtgui_graphic_set_device(rt_device_t device) } /* screen update */ -void rtgui_graphic_driver_screen_update(struct rtgui_graphic_driver* driver, rtgui_rect_t *rect) +void rtgui_graphic_driver_screen_update(const struct rtgui_graphic_driver* driver, rtgui_rect_t *rect) { struct rt_device_rect_info rect_info; @@ -83,7 +83,7 @@ void rtgui_graphic_driver_screen_update(struct rtgui_graphic_driver* driver, rtg } /* get video frame buffer */ -rt_uint8_t* rtgui_graphic_driver_get_framebuffer(struct rtgui_graphic_driver* driver) +rt_uint8_t* rtgui_graphic_driver_get_framebuffer(const struct rtgui_graphic_driver* driver) { return (rt_uint8_t*)driver->framebuffer; }