1
0

application.c 913 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. /*
  2. * File : application.c
  3. * This file is part of RT-Thread RTOS
  4. * COPYRIGHT (C) 2006-2014, 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. * 2014-08-03 aozima first implementation
  13. */
  14. #include <board.h>
  15. #include <rtthread.h>
  16. void rt_init_thread_entry(void* parameter)
  17. {
  18. rt_components_init();
  19. #ifdef RT_USING_LWIP
  20. cme_m7_eth_init();
  21. set_if("e0", "192.168.1.99", "192.168.1.1", "255.255.255.0");
  22. #endif /* RT_USING_LWIP */
  23. }
  24. int rt_application_init()
  25. {
  26. rt_thread_t tid;
  27. tid = rt_thread_create("init",
  28. rt_init_thread_entry,
  29. RT_NULL,
  30. 2048,
  31. RT_THREAD_PRIORITY_MAX/3,
  32. 20);
  33. if (tid != RT_NULL)
  34. rt_thread_startup(tid);
  35. return 0;
  36. }
  37. /*@}*/