main.c 581 B

1234567891011121314151617181920212223242526272829
  1. /*
  2. * Copyright (c) 2023, RT-Thread Development Team
  3. *
  4. * SPDX-License-Identifier: Apache-2.0
  5. *
  6. * Change Logs:
  7. * Date Author Notes
  8. * 2023-07-06 Supperthomas first version
  9. */
  10. #include <rtthread.h>
  11. #include <rtdevice.h>
  12. #include <board.h>
  13. #define GPIO_LED_B GET_PIN(F, 11)
  14. #define GPIO_LED_R GET_PIN(F, 12)
  15. int main(void)
  16. {
  17. rt_pin_mode(GPIO_LED_R, PIN_MODE_OUTPUT);
  18. while (1)
  19. {
  20. rt_pin_write(GPIO_LED_R, PIN_HIGH);
  21. rt_thread_mdelay(500);
  22. rt_pin_write(GPIO_LED_R, PIN_LOW);
  23. rt_thread_mdelay(500);
  24. }
  25. }