main.c 616 B

12345678910111213141516171819202122232425262728293031
  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. * 2020-04-16 bigmagic first version
  9. */
  10. #include <rtthread.h>
  11. #include <rtdevice.h>
  12. #include <board.h>
  13. #define ACTLED (42)
  14. int main(int argc, char** argv)
  15. {
  16. rt_kprintf("Hi, this is RT-Thread!!\n");
  17. rt_pin_mode(ACTLED, PIN_MODE_OUTPUT);
  18. while(1)
  19. {
  20. rt_pin_write(ACTLED, PIN_HIGH);
  21. rt_thread_mdelay(1000);
  22. rt_pin_write(ACTLED, PIN_LOW);
  23. rt_thread_mdelay(1000);
  24. }
  25. return RT_EOK;
  26. }