hal_entry.c 654 B

1234567891011121314151617181920212223242526272829303132
  1. /*
  2. * Copyright (c) 2006-2025, RT-Thread Development Team
  3. *
  4. * SPDX-License-Identifier: Apache-2.0
  5. *
  6. * Change Logs:
  7. * Date Author Notes
  8. * 2021-10-10 Sherman first version
  9. */
  10. #include <rtthread.h>
  11. #include "hal_data.h"
  12. #ifdef RT_USING_NANO
  13. #include <drv_gpio.h>
  14. #else
  15. #include <rtdevice.h>
  16. #endif /* RT_USING_NANO */
  17. #define LED1_PIN BSP_IO_PORT_02_PIN_07 /* Onboard LED pins */
  18. void hal_entry(void)
  19. {
  20. rt_kprintf("\nHello RT-Thread!\n");
  21. while (1)
  22. {
  23. rt_pin_write(LED1_PIN, PIN_HIGH);
  24. rt_thread_mdelay(500);
  25. rt_pin_write(LED1_PIN, PIN_LOW);
  26. rt_thread_mdelay(500);
  27. }
  28. }