1
0

application.c 959 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  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. * 2009-01-05 Bernard the first version
  9. */
  10. #include <rtthread.h>
  11. #include <stdio.h>
  12. #include <board.h>
  13. extern int platform_init(void);
  14. extern int platform_post_init(void);
  15. extern int mnt_init(void);
  16. void rt_init_thread_entry(void *parameter)
  17. {
  18. rt_kprintf("Hello RT-Thread!\n");
  19. platform_init();
  20. mnt_init();
  21. platform_post_init();
  22. #if defined(PKG_USING_GUIENGINE) && defined(GUIENGINE_USING_DEMO)
  23. {
  24. extern int rt_gui_demo_init(void);
  25. rt_gui_demo_init();
  26. }
  27. #endif
  28. }
  29. int rt_application_init()
  30. {
  31. rt_thread_t tid;
  32. tid = rt_thread_create("init",
  33. rt_init_thread_entry, RT_NULL,
  34. 2048, RT_THREAD_PRIORITY_MAX / 3, 20);
  35. if (tid != RT_NULL)
  36. rt_thread_startup(tid);
  37. return 0;
  38. }