main.c 512 B

12345678910111213141516171819202122232425
  1. /*
  2. * Copyright (c) 2006-2024 RT-Thread Development Team
  3. *
  4. * SPDX-License-Identifier: Apache-2.0
  5. *
  6. * Change Logs:
  7. * Date Author Notes
  8. * 2025-2-2 yekai first version
  9. */
  10. #include <rtthread.h>
  11. #include <rtdevice.h>
  12. #include <board.h>
  13. #define LED_PIN GET_PIN(E, 2)
  14. int main(void) {
  15. /* set GPIO pin mode to output */
  16. rt_pin_mode(LED_PIN, PIN_MODE_OUTPUT);
  17. while (1) {
  18. rt_pin_write(LED_PIN, !rt_pin_read(LED_PIN));
  19. rt_thread_mdelay(1000);
  20. }
  21. }