25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

29 lines
545 B

  1. /*****************头文件*************************/
  2. #include "fsl_common.h"
  3. #include "fsl_gpio.h"
  4. #include "pin_Init.h"
  5. #include "delay.h"
  6. /*********************************************
  7. PTA15——LED灯闪烁
  8. **********************************************/
  9. void main()
  10. {
  11. CLOCK_EnableClock(kCLOCK_PortA); //开启PORT时钟
  12. Delay_Init(); //延时函数初始化
  13. pin_Init(); //GPIO初始化
  14. while (1)
  15. {
  16. GPIO_PinWrite(GPIOA, 15, 0);
  17. Delay_ms(500U);
  18. GPIO_PinWrite(GPIOA, 15, 1);
  19. Delay_ms(500U);
  20. }
  21. }