main.c 645 B

12345678910111213141516171819202122232425262728293031323334
  1. /*
  2. * Copyright (c) 2006-2018, RT-Thread Development Team
  3. *
  4. * SPDX-License-Identifier: Apache-2.0
  5. *
  6. * Change Logs:
  7. * Date Author Notes
  8. * 2019-05-06 tyustli first version
  9. *
  10. */
  11. #include <rtthread.h>
  12. #include <rtdevice.h>
  13. #include "drv_gpio.h"
  14. /* GPIO1_IO09 */
  15. #define LED0_PIN GET_PIN(1,9)
  16. int main(void)
  17. {
  18. #ifndef PHY_USING_KSZ8081
  19. /* set LED0 pin mode to output */
  20. rt_pin_mode(LED0_PIN, PIN_MODE_OUTPUT);
  21. while (1)
  22. {
  23. rt_pin_write(LED0_PIN, PIN_HIGH);
  24. rt_thread_mdelay(500);
  25. rt_pin_write(LED0_PIN, PIN_LOW);
  26. rt_thread_mdelay(500);
  27. }
  28. #endif
  29. }