application.c 889 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  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. * 2011-05-24 Bernard the first version
  9. */
  10. /**
  11. * @addtogroup FM4
  12. */
  13. /*@{*/
  14. #include <rtthread.h>
  15. #include "board.h"
  16. void rt_init_thread_entry(void *parameter)
  17. {
  18. #ifdef RT_USING_COMPONENTS_INIT
  19. /* initialization RT-Thread Components */
  20. rt_components_init();
  21. #endif
  22. //finsh_system_init();
  23. finsh_set_device(RT_CONSOLE_DEVICE_NAME);
  24. /**< init led device */
  25. {
  26. extern void rt_led_hw_init(void);
  27. rt_led_hw_init();
  28. }
  29. }
  30. int rt_application_init()
  31. {
  32. rt_thread_t tid;
  33. tid = rt_thread_create("init",
  34. rt_init_thread_entry, RT_NULL,
  35. 2048, 8, 20);
  36. if (tid != RT_NULL) rt_thread_startup(tid);
  37. return 0;
  38. }
  39. /*@}*/