application.c 698 B

1234567891011121314151617181920212223242526272829303132
  1. /*
  2. * File : application.c
  3. * This file is part of RT-Thread RTOS
  4. * COPYRIGHT (C) 2012, 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://www.rt-thread.org/license/LICENSE
  9. *
  10. * Change Logs:
  11. * Date Author Notes
  12. * 2012-11-20 Bernard the first version
  13. */
  14. #include <rtthread.h>
  15. void init_thread(void* parameter)
  16. {
  17. rt_components_init();
  18. }
  19. int rt_application_init()
  20. {
  21. rt_thread_t tid;
  22. tid = rt_thread_create("init", init_thread, RT_NULL,
  23. 1024, RT_THREAD_PRIORITY_MAX/3, 10);
  24. if (tid != RT_NULL) rt_thread_startup(tid);
  25. return 0;
  26. }