main.c 540 B

12345678910111213141516171819202122232425262728
  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. * 2024-05-22 LZero first version
  9. */
  10. #include <rtthread.h>
  11. #include <rtdevice.h>
  12. #include "drv_gpio.h"
  13. #define LED_PIN GET_PIN(16, 1)
  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. }