application.c 743 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  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. * 2014-08-03 aozima first implementation
  9. */
  10. #include <board.h>
  11. #include <rtthread.h>
  12. void rt_init_thread_entry(void* parameter)
  13. {
  14. rt_components_init();
  15. #ifdef RT_USING_LWIP
  16. cme_m7_eth_init();
  17. set_if("e0", "192.168.1.99", "192.168.1.1", "255.255.255.0");
  18. #endif /* RT_USING_LWIP */
  19. }
  20. int rt_application_init()
  21. {
  22. rt_thread_t tid;
  23. tid = rt_thread_create("init",
  24. rt_init_thread_entry,
  25. RT_NULL,
  26. 2048,
  27. RT_THREAD_PRIORITY_MAX/3,
  28. 20);
  29. if (tid != RT_NULL)
  30. rt_thread_startup(tid);
  31. return 0;
  32. }
  33. /*@}*/