main.c 627 B

12345678910111213141516171819202122232425262728293031
  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. * 2017-10-10 Tanek first version
  9. */
  10. #include <rtthread.h>
  11. #include <rtdevice.h>
  12. #include "drv_gpio.h"
  13. /* DS1,GPIO3_IO03,GPIO_SD_B1_03 */
  14. #define LED0_PIN GET_PIN(3,3)
  15. int main(void)
  16. {
  17. /* set LED0 pin mode to output */
  18. rt_pin_mode(LED0_PIN, PIN_MODE_OUTPUT);
  19. while (1)
  20. {
  21. rt_pin_write(LED0_PIN, PIN_HIGH);
  22. rt_thread_mdelay(500);
  23. rt_pin_write(LED0_PIN, PIN_LOW);
  24. rt_thread_mdelay(500);
  25. }
  26. }