main.c 632 B

12345678910111213141516171819202122232425262728
  1. /*
  2. * Copyright (c) 2006-2022, RT-Thread Development Team
  3. *
  4. * SPDX-License-Identifier: Apache-2.0
  5. *
  6. * Change Logs:
  7. * Date Author Notes
  8. * 2021-08-23 AisinoChip the first version
  9. * 2021-10-17 AisinoChip remove unused header file
  10. */
  11. #include "board.h"
  12. #include <drivers/pin.h>
  13. #define LED_PIN_NUM 1 /* PA1 */
  14. int main(void)
  15. {
  16. rt_pin_mode(LED_PIN_NUM, PIN_MODE_OUTPUT);
  17. while (1)
  18. {
  19. rt_pin_write(LED_PIN_NUM, PIN_LOW);
  20. rt_thread_delay(RT_TICK_PER_SECOND / 2);
  21. rt_pin_write(LED_PIN_NUM, PIN_HIGH);
  22. rt_thread_delay(RT_TICK_PER_SECOND / 2);
  23. }
  24. }