main.c 603 B

123456789101112131415161718192021222324252627282930
  1. /*
  2. * Copyright (C) 2018 Shanghai Eastsoft Microelectronics Co., Ltd.
  3. *
  4. * SPDX-License-Identifier: Apache-2.0
  5. *
  6. * Change Logs:
  7. * Date Author Notes
  8. * 2019-01-28 wangyq the first version
  9. */
  10. #include <rtthread.h>
  11. #include <rtdevice.h>
  12. #define LED_PIN 39
  13. int main(void)
  14. {
  15. int count = 1;
  16. /* set PC08 pin mode to output */
  17. rt_pin_mode(LED_PIN, PIN_MODE_OUTPUT);
  18. while (count++)
  19. {
  20. rt_pin_write(LED_PIN, PIN_HIGH);
  21. rt_thread_mdelay(500);
  22. rt_pin_write(LED_PIN, PIN_LOW);
  23. rt_thread_mdelay(500);
  24. }
  25. return RT_EOK;
  26. }