如题,新建工程(未用PE)编译,已经include包含该函数的头文件。转定义也能转到,就是报错 undefined reference to `UART_DRV_Init'。刚接触KDS ,请大神指导!!
int main(void)
{
/* Write your code here */
uart_status_t val;
unsigned char sendBuf[8]={0x7b,0x01,0x06 ,0x06 ,0x01 ,0x00 ,0x77 ,0x7d};
uart_user_config_t uartConfig;
uartConfig.baudRate = 115200;
uartConfig.bitCountPerChar = kUart8BitsPerChar;
uartConfig.parityMode = kUartParityDisabled;
uartConfig.stopBitCount = kUartOneStopBit;
uart_state_t uartState;
val=UART_DRV_Init(0,&uartState,&uartConfig);
while(val!=kStatus_UART_Success);
while(1)
{
val=UART_DRV_SendData(0,sendBuf,8);
}
/* Never leave main */
return 0;
} |