main.c 778 B

12345678910111213141516171819202122232425262728293031323334
  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. * 2015-11-19 Urey the first version
  9. * 2017-09-20 Quintin.Z modify for nv32
  10. */
  11. #include "rtthread.h"
  12. #include "finsh.h"
  13. extern void led_thread_entry(void* parameter);
  14. int main(void)
  15. {
  16. rt_thread_t thread;
  17. #ifdef RT_USING_FINSH
  18. #if !defined(RT_USING_POSIX_STDIO) && defined(RT_USING_DEVICE)
  19. finsh_set_device(RT_CONSOLE_DEVICE_NAME);
  20. #endif
  21. #endif
  22. /* Create led thread */
  23. thread = rt_thread_create("led",
  24. led_thread_entry, RT_NULL,
  25. 256, 20, 20);
  26. if(thread != RT_NULL)
  27. rt_thread_startup(thread);
  28. return 0;
  29. }