main.c 541 B

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