ledapp.c 728 B

1234567891011121314151617181920212223242526272829303132333435
  1. /*
  2. * File : ledapp.c
  3. * This file is part of RT-Thread RTOS
  4. * COPYRIGHT (C) 2006, RT-Thread Development Team
  5. *
  6. * The license and distribution terms for this file may be
  7. * found in the file LICENSE in this distribution or at
  8. * http://www.rt-thread.org/license/LICENSE
  9. *
  10. * Change Logs:
  11. * Date Author Notes
  12. * 2017-09-19 Quintin.Z the first version
  13. */
  14. #include <stdio.h>
  15. #include <rthw.h>
  16. #include <rtdevice.h>
  17. #include "board.h"
  18. #include <rtthread.h>
  19. #include "gpio.h"
  20. void led_thread_entry(void* parameter)
  21. {
  22. GPIO_Init (GPIOA, GPIO_PTB5_MASK, GPIO_PinOutput);
  23. while(1)
  24. {
  25. GPIO_Toggle (GPIOA, GPIO_PTB5_MASK);
  26. rt_thread_delay(RT_TICK_PER_SECOND / 10);
  27. }
  28. }