application.c 671 B

12345678910111213141516171819202122232425262728293031323334353637
  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-02-13 mojingxian first version
  9. */
  10. #include "application.h"
  11. #include "board.h"
  12. #include "rtthread.h"
  13. void app_init_entry(void *parg)
  14. {
  15. parg = parg;
  16. rt_hw_core_timer_init();//start system tick in first thread.
  17. rt_hw_isr_install();
  18. }
  19. void rt_application_init(void)
  20. {
  21. rt_thread_t led_thread;
  22. #ifdef RT_USING_HEAP
  23. led_thread = rt_thread_create("init", app_init_entry, RT_NULL, 512, 200, 20);
  24. #endif
  25. if (led_thread != RT_NULL)
  26. {
  27. rt_thread_startup(led_thread);
  28. }
  29. }