realtouch_ui.c 772 B

123456789101112131415161718192021222324252627282930313233
  1. #include <rtthread.h>
  2. #include <rtgui/rtgui_server.h>
  3. #include <rtgui/rtgui_system.h>
  4. #include <rtgui/rtgui_app.h>
  5. #include "appmgr.h"
  6. #include "statusbar.h"
  7. void realtouch_ui_init(void)
  8. {
  9. rt_device_t device;
  10. struct rt_device_rect_info info;
  11. #ifndef _WIN32
  12. device = rt_device_find("lcd");
  13. {
  14. info.width = 800;
  15. info.height = 480;
  16. /* set graphic resolution */
  17. rt_device_control(device, RTGRAPHIC_CTRL_SET_MODE, &info);
  18. }
  19. if (device != RT_NULL)
  20. /* re-set graphic device */
  21. rtgui_graphic_set_device(device);
  22. #endif
  23. app_mgr_init();
  24. rt_thread_delay(10);
  25. #ifndef _WIN32
  26. calibration_init();
  27. #endif
  28. }