主程序中代码如下:
#define DEBUG
#include "ddl.h"
#include "uart.h"
#include "gpio.h"
#include "sysctrl.h"
int main()
{
Sysctrl_SetPeripheralGate(SysctrlPeripheralGpio,TRUE);
Sysctrl_SetPeripheralGate(SysctrlPeripheralUart0,TRUE);
#ifdef DEBUG
Debug_UartInit(); //调试串口初始化
#endif
#ifdef DEBUG
printf("This is a UART Test!"); //输出调试内容
#endif
while(1)
{
;
}
}
|