main.c 646 B

12345678910111213141516171819202122232425262728293031
  1. /*
  2. * Copyright (C) 2022-2024, Xiaohua Semiconductor Co., Ltd.
  3. *
  4. * SPDX-License-Identifier: Apache-2.0
  5. *
  6. * Change Logs:
  7. * Date Author Notes
  8. * 2025-07-10 CDT first version
  9. */
  10. #include <rtthread.h>
  11. #include <rtdevice.h>
  12. #include <board.h>
  13. /* defined the LED_BLUE pin: PC13 */
  14. #define LED_BLUE_PIN GET_PIN(C, 13)
  15. int main(void)
  16. {
  17. /* set LED_BLUE_PIN pin mode to output */
  18. rt_pin_mode(LED_BLUE_PIN, PIN_MODE_OUTPUT);
  19. while (1)
  20. {
  21. rt_pin_write(LED_BLUE_PIN, PIN_HIGH);
  22. rt_thread_mdelay(500);
  23. rt_pin_write(LED_BLUE_PIN, PIN_LOW);
  24. rt_thread_mdelay(500);
  25. }
  26. }