application.c 592 B

12345678910111213141516171819202122232425262728293031
  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. * 2020-04-29 supperthomas first version
  9. * 2021-06-26 supperthomas fix led
  10. *
  11. */
  12. #include <rtthread.h>
  13. #include <rtdevice.h>
  14. int main(void)
  15. {
  16. int count = 1;
  17. rt_pin_mode(RT_BSP_LED_PIN, PIN_MODE_OUTPUT);
  18. while (count++)
  19. {
  20. rt_pin_write(RT_BSP_LED_PIN, PIN_HIGH);
  21. rt_thread_mdelay(500);
  22. rt_pin_write(RT_BSP_LED_PIN, PIN_LOW);
  23. rt_thread_mdelay(500);
  24. }
  25. return RT_EOK;
  26. }