application.c 852 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. /*
  2. * File : application.c
  3. * This file is part of RT-Thread RTOS
  4. * COPYRIGHT (C) 2009 - 2011, 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. * 2011-02-24 Bernard the first version
  13. */
  14. /**
  15. * @addtogroup FM3
  16. */
  17. /*@{*/
  18. #include <rtthread.h>
  19. #include "board.h"
  20. #include "led.h"
  21. void rt_init_thread_entry(void *parameter)
  22. {
  23. rt_hw_led_init();
  24. }
  25. int rt_application_init()
  26. {
  27. rt_thread_t init_thread;
  28. init_thread = rt_thread_create("init", rt_init_thread_entry, RT_NULL, 1024, 21, 20);
  29. if(init_thread != RT_NULL)
  30. rt_thread_startup(init_thread);
  31. return 0;
  32. }
  33. /*@}*/