学习有以下问题
#include <stdio.h>
#include "Driver\DrvGPIO.h"
#include "Driver\DrvSYS.h"
#include "Driver\DrvUART.h"
#include "Driver\DrvUSB.h"
//#include "LCD_Driver.h"
#include "18B20\ds18b20.h"
#define DEBUG 0 // 为啥我这里 设置为1 或者0 软件仿真时候都时进入以下程序呢????
#ifdef DEBUG
STR_UART_T sParam;
/* Set UART Pin */
//DrvGPIO_Init();
DrvGPIO_InitFunction(E_FUNC_UART0);
/* UART Setting */
sParam.u32BaudRate = 115200;
sParam.u8cDataBits = DRVUART_DATABITS_8;
sParam.u8cStopBits = DRVUART_STOPBITS_1;
sParam.u8cParity = DRVUART_PARITY_NONE;
sParam.u8cRxTriggerLevel= DRVUART_FIFO_1BYTES;
sParam.u8TimeOut = 0;
/* Select UART Clock Source From 12Mhz*/
DrvSYS_SelectIPClockSource(E_SYS_UART_CLKSRC,0);
/* Set UART Configuration */
DrvUART_Open(UART_PORT0,&sParam);
#endif
|