main.c 667 B

1234567891011121314151617181920212223242526272829
  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. /* show RT-Thread version */
  17. rt_show_version();
  18. rt_kprintf("Hello!RT-THREAD!\r\n");
  19. rt_pin_mode(RT_BSP_LED_PIN, PIN_MODE_OUTPUT);
  20. while (1)
  21. {
  22. rt_pin_write(RT_BSP_LED_PIN, PIN_HIGH);
  23. rt_thread_mdelay(1000);
  24. rt_pin_write(RT_BSP_LED_PIN, PIN_LOW);
  25. rt_thread_mdelay(1000);
  26. }
  27. }