1
0

application.c 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. /*
  2. * File : application.c
  3. * This file is part of RT-Thread RTOS
  4. * COPYRIGHT (C) 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-07-18 ArdaFu the first version for TM4C129X
  13. */
  14. #include <rtthread.h>
  15. #include <board.h>
  16. #include <components.h>
  17. #ifdef RT_USING_LWIP
  18. #include "drv_eth.h"
  19. #endif
  20. /* thread phase init */
  21. void rt_init_thread_entry(void *parameter)
  22. {
  23. /* Initialization RT-Thread Components */
  24. rt_components_init();
  25. #ifdef RT_USING_FINSH
  26. finsh_set_device(RT_CONSOLE_DEVICE_NAME);
  27. #endif
  28. #ifdef RT_USING_LWIP
  29. rt_hw_tiva_eth_init();
  30. #endif
  31. }
  32. int rt_application_init(void)
  33. {
  34. rt_thread_t tid;
  35. tid = rt_thread_create("init",
  36. rt_init_thread_entry, RT_NULL,
  37. 2048, RT_THREAD_PRIORITY_MAX / 3, 20);
  38. if (tid != RT_NULL) rt_thread_startup(tid);
  39. return 0;
  40. }