1
0

application.c 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. /*
  2. * File : application.c
  3. * This file is part of RT-Thread RTOS
  4. * COPYRIGHT (C) 2006, RT-Thread Development Team
  5. *
  6. * The license and distribution terms for this file may be
  7. * found in the file LICENSE in this distribution or at
  8. * http://www.rt-thread.org/license/LICENSE
  9. *
  10. * Change Logs:
  11. * Date Author Notes
  12. * 2009-01-05 Bernard the first version
  13. * 2014-04-27 Bernard make code cleanup.
  14. */
  15. #include <board.h>
  16. #include <rtthread.h>
  17. #include <drivers/mtd_nand.h>
  18. #include "finsh.h"
  19. #include "time.h"
  20. #ifdef RT_USING_DFS
  21. /* dfs init */
  22. #include <dfs.h>
  23. /* dfs filesystem:ELM filesystem init */
  24. #include <dfs_elm.h>
  25. /* dfs Filesystem APIs */
  26. #include <dfs_fs.h>
  27. #include <dfs_posix.h>
  28. #endif
  29. #ifdef RT_USING_LWIP
  30. #include <lwip/sys.h>
  31. #include <lwip/api.h>
  32. #include <netif/ethernetif.h>
  33. #include "drv_eth.h"
  34. #endif
  35. #ifdef RT_USING_GDB
  36. #include <gdb_stub.h>
  37. #endif
  38. #ifdef PKG_USING_GUIENGINE
  39. #include "rtgui_demo.h"
  40. #include <rtgui/driver.h>
  41. #endif
  42. //rt_module_t module_ptr;
  43. #define DATA_PATH "/Data"
  44. void rt_init_thread_entry(void* parameter)
  45. {
  46. /* initialization RT-Thread Components */
  47. #ifdef RT_USING_COMPONENTS_INIT
  48. rt_components_init();
  49. #endif
  50. }
  51. int rt_application_init()
  52. {
  53. rt_thread_t tid;
  54. tid = rt_thread_create("init",
  55. rt_init_thread_entry, RT_NULL,
  56. 2048, RT_THREAD_PRIORITY_MAX/3, 20);
  57. if (tid != RT_NULL)
  58. rt_thread_startup(tid);
  59. return 0;
  60. }