main.c 578 B

123456789101112131415161718192021222324252627
  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. * 2018-11-27 balanceTWK first version
  9. */
  10. #include <rtthread.h>
  11. #include <rtdevice.h>
  12. #include <drivers/pin.h>
  13. #include "board.h"
  14. void main(void)
  15. {
  16. /* set LED0 pin mode to output */
  17. rt_pin_mode(LED0_PIN, PIN_MODE_OUTPUT);
  18. while (1)
  19. {
  20. rt_pin_write(LED0_PIN, PIN_HIGH);
  21. rt_thread_mdelay(500);
  22. rt_pin_write(LED0_PIN, PIN_LOW);
  23. rt_thread_mdelay(500);
  24. }
  25. }