ledapp.c 554 B

12345678910111213141516171819202122232425262728293031
  1. /*
  2. * Copyright (c) 2006-2021, RT-Thread Development Team
  3. *
  4. * SPDX-License-Identifier: Apache-2.0
  5. *
  6. * Change Logs:
  7. * Date Author Notes
  8. * 2017-09-19 Quintin.Z the first version
  9. */
  10. #include <stdio.h>
  11. #include <rthw.h>
  12. #include <rtdevice.h>
  13. #include "board.h"
  14. #include <rtthread.h>
  15. #include "gpio.h"
  16. void led_thread_entry(void* parameter)
  17. {
  18. GPIO_Init (GPIOA, GPIO_PTB5_MASK, GPIO_PinOutput);
  19. while(1)
  20. {
  21. GPIO_Toggle (GPIOA, GPIO_PTB5_MASK);
  22. rt_thread_delay(RT_TICK_PER_SECOND / 10);
  23. }
  24. }