application.c 773 B

123456789101112131415161718192021222324252627282930
  1. /*
  2. * File : app.c
  3. * This file is part of RT-Thread RTOS
  4. * COPYRIGHT (C) 2006, RT-Thread Development Team
  5. *
  6. * The license and distribution terms for this file may be
  7. * found in the file LICENSE in this distribution or at
  8. * http://openlab.rt-thread.com/license/LICENSE
  9. *
  10. * Change Logs:
  11. * Date Author Notes
  12. * 2010-08-28 Yi.Qiu the first version
  13. */
  14. #include <rtthread.h>
  15. #include <rtgui/rtgui.h>
  16. #include <rtgui/rtgui_server.h>
  17. #include <rtgui/rtgui_system.h>
  18. #include <rtgui/widgets/workbench.h>
  19. #include "tetris.h"
  20. int rt_application_init(void)
  21. {
  22. rt_thread_t tid;
  23. tid = rt_thread_create("tetris", tetris_ui_entry, RT_NULL, 2048, 20, 5);
  24. if (tid != RT_NULL) rt_thread_startup(tid);
  25. return 0;
  26. }