application.c 896 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  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 FM3
  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. #ifdef RT_USING_FINSH
  23. (RT_CONSOLE_DEVICE_NAME);
  24. #endif /* RT_USING_FINSH */
  25. /**< init led device */
  26. {
  27. extern void rt_led_hw_init(void);
  28. rt_led_hw_init();
  29. }
  30. }
  31. int rt_application_init()
  32. {
  33. rt_thread_t tid;
  34. tid = rt_thread_create("init",
  35. rt_init_thread_entry, RT_NULL,
  36. 2048, 8, 20);
  37. if (tid != RT_NULL) rt_thread_startup(tid);
  38. return 0;
  39. }
  40. /*@}*/