main.c 442 B

12345678910111213141516171819202122232425
  1. /**
  2. * Copyright (c) 2020 Raspberry Pi (Trading) Ltd.
  3. *
  4. * SPDX-License-Identifier: BSD-3-Clause
  5. */
  6. #include <rtthread.h>
  7. #include "board.h"
  8. int main() {
  9. const uint LED_PIN = 25;
  10. rt_kprintf("Hello, RT-Thread!\n");
  11. gpio_init(LED_PIN);
  12. gpio_set_dir(LED_PIN, GPIO_OUT);
  13. while (true) {
  14. gpio_put(LED_PIN, 1);
  15. rt_thread_mdelay(1000);
  16. gpio_put(LED_PIN, 0);
  17. rt_thread_mdelay(1000);
  18. }
  19. }