|
- /*****************头文件*************************/
- #include "fsl_common.h"
- #include "fsl_gpio.h"
- #include "pin_Init.h"
- #include "delay.h"
- #include "uart_Interrupt.h"
- #include "fsl_uart.h"
- #include "system_MKV56F24.h"
- /*********************************************
- PTA15——LED灯闪烁
- **********************************************/
-
- void main()
- {
- MCG->C4 = 0x20;
- SystemCoreClockUpdate ();
- Delay_Init(); //延时函数初始化
- pin_Init(); //GPIO初始化
- UART1_InterrputInit(); //UART0初始化
- UART2_InterrputInit(); //UART2初始化
- while (1)
- {
- GPIO_PinWrite(GPIOA, 15, 0);
- Delay_ms(500U);
- GPIO_PinWrite(GPIOA, 15, 1);
- Delay_ms(500U);
- UART_WriteByte(UART1, 0x1A); //发送一帧数据(一个字节,8个数据位)
- }
-
- }
-
-
-
|