main.c 634 B

12345678910111213141516171819202122232425262728293031
  1. /*
  2. * Copyright (c) 2017-2019, MindMotion AE Team
  3. *
  4. * SPDX-License-Identifier: Apache-2.0
  5. *
  6. * Change Logs:
  7. * Date Author Notes
  8. * 2019-03-13 henryhuang first version
  9. */
  10. #include <rtthread.h>
  11. #include <rtdevice.h>
  12. #include "HAL_device.h"
  13. /* defined the LED pin: PA15 */
  14. #define LED_PIN 38
  15. int main(void)
  16. {
  17. int count = 1;
  18. /* set LED4 pin mode to output */
  19. rt_pin_mode(LED_PIN, PIN_MODE_OUTPUT);
  20. while (count++)
  21. {
  22. rt_pin_write(LED_PIN, PIN_HIGH);
  23. rt_thread_mdelay(500);
  24. rt_pin_write(LED_PIN, PIN_LOW);
  25. rt_thread_mdelay(500);
  26. }
  27. return RT_EOK;
  28. }