application.c 668 B

12345678910111213141516171819202122232425262728293031323334
  1. /*
  2. * Copyright (c) 2006-2018, RT-Thread Development Team
  3. *
  4. * SPDX-License-Identifier: Apache-2.0
  5. *
  6. * Change Logs:
  7. * Date Author Notes
  8. * 2009-01-05 Bernard the first version
  9. * 2014-04-27 Bernard make code cleanup.
  10. */
  11. #include <board.h>
  12. #include <rtthread.h>
  13. void rt_init_thread_entry(void* parameter)
  14. {
  15. /* initialization RT-Thread Components */
  16. rt_components_init();
  17. }
  18. int rt_application_init()
  19. {
  20. rt_thread_t tid;
  21. tid = rt_thread_create("init",
  22. rt_init_thread_entry, RT_NULL,
  23. 2048, RT_THREAD_PRIORITY_MAX/3, 20);
  24. if (tid != RT_NULL)
  25. rt_thread_startup(tid);
  26. return 0;
  27. }