application.c 875 B

1234567891011121314151617181920212223242526272829303132333435
  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. #include <components.h>
  16. /* thread phase init */
  17. void rt_init_thread_entry(void *parameter)
  18. {
  19. /* Initialization RT-Thread Components */
  20. rt_components_init();
  21. }
  22. int rt_application_init(void)
  23. {
  24. rt_thread_t tid;
  25. tid = rt_thread_create("init",
  26. rt_init_thread_entry, RT_NULL,
  27. 2048, RT_THREAD_PRIORITY_MAX / 3, 20);
  28. if (tid != RT_NULL) rt_thread_startup(tid);
  29. return 0;
  30. }