application.c 851 B

12345678910111213141516171819202122232425262728293031323334
  1. /*
  2. * File : application.c
  3. * This file is part of RT-Thread RTOS
  4. * COPYRIGHT (C) 2014, 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. * 2014-07-18 ArdaFu the first version for TM4C129X
  13. */
  14. #include <rtthread.h>
  15. /* thread phase init */
  16. void rt_init_thread_entry(void *parameter)
  17. {
  18. /* Initialization RT-Thread Components */
  19. rt_components_init();
  20. }
  21. int rt_application_init(void)
  22. {
  23. rt_thread_t tid;
  24. tid = rt_thread_create("init",
  25. rt_init_thread_entry, RT_NULL,
  26. 2048, RT_THREAD_PRIORITY_MAX / 3, 20);
  27. if (tid != RT_NULL) rt_thread_startup(tid);
  28. return 0;
  29. }