1
0

application.c 513 B

123456789101112131415161718192021222324252627
  1. /*
  2. * Copyright (c) 2006-2021, RT-Thread Development Team
  3. *
  4. * SPDX-License-Identifier: Apache-2.0
  5. *
  6. * Change Logs:
  7. * Date Author Notes
  8. * 2012-11-20 Bernard the first version
  9. */
  10. #include <rtthread.h>
  11. void init_thread(void* parameter)
  12. {
  13. rt_components_init();
  14. }
  15. int rt_application_init()
  16. {
  17. rt_thread_t tid;
  18. tid = rt_thread_create("init", init_thread, RT_NULL,
  19. 1024, RT_THREAD_PRIORITY_MAX/3, 10);
  20. if (tid != RT_NULL) rt_thread_startup(tid);
  21. return 0;
  22. }