main.c 611 B

123456789101112131415161718192021222324252627
  1. /*
  2. * Copyright (c) 2021-2022, RT-Thread Development Team
  3. *
  4. * SPDX-License-Identifier: Apache-2.0
  5. *
  6. * Change Logs:
  7. * Date Author Notes
  8. * 2022-04-24 supperthomas first version
  9. * 2022-06-02 supperthomas fix version
  10. */
  11. #include <rtthread.h>
  12. #include <rtdevice.h>
  13. #include <board.h>
  14. int rtt_main(void)
  15. {
  16. rt_pin_mode(RT_BSP_LED_PIN, PIN_MODE_OUTPUT);
  17. while (1)
  18. {
  19. printf("Hello!RT-THREAD!\r\n");
  20. rt_pin_write(RT_BSP_LED_PIN, PIN_HIGH);
  21. rt_thread_mdelay(1000);
  22. rt_pin_write(RT_BSP_LED_PIN, PIN_LOW);
  23. rt_thread_mdelay(1000);
  24. }
  25. }