main.c 497 B

12345678910111213141516171819202122232425
  1. /*
  2. * Copyright (c) 2006-2021, RT-Thread Development Team
  3. *
  4. * SPDX-License-Identifier: Apache-2.0
  5. *
  6. * Change Logs:
  7. * Date Author Notes
  8. * 2015-07-29 Arda.Fu first implementation
  9. */
  10. #include <rtthread.h>
  11. #include <rtdevice.h>
  12. #define LED4_PIN 30 /* PIO0_30 */
  13. int main(void)
  14. {
  15. /* user app entry */
  16. rt_pin_mode(LED4_PIN, PIN_MODE_OUTPUT);
  17. while (1)
  18. {
  19. rt_pin_write(LED4_PIN, !rt_pin_read(LED4_PIN));
  20. rt_thread_delay(1000);
  21. }
  22. }