主机设置uart参数时,停止位和校验位在哪里设置?
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
1 //初始化串口配置
2 void NPI_InitTransport( npiCBack_t npiCBack )
3 {
4 halUARTCfg_t uartConfig;
5
6 // configure UART
7 uartConfig.configured = TRUE;
8 uartConfig.baudRate = NPI_UART_BR;
9 uartConfig.flowControl = NPI_UART_FC;
10 uartConfig.flowControlThreshold = NPI_UART_FC_THRESHOLD;
11 uartConfig.rx.maxBufSize = NPI_UART_RX_BUF_SIZE;
12 uartConfig.tx.maxBufSize = NPI_UART_TX_BUF_SIZE;
13 uartConfig.idleTimeout = NPI_UART_IDLE_TIMEOUT;
14 uartConfig.intEnable = NPI_UART_INT_ENABLE;
15 uartConfig.callBackFunc = (halUARTCBack_t)npiCBack;
16
17 // start UART
18 // Note: Assumes no issue opening UART port.
19 (void)HalUARTOpen( NPI_UART_PORT, &uartConfig );
20
21 return;
22 }
这里面也没有停止位和校验啊,我找到这两个宏了,不过不知道在哪里设置?是在上面这个结构体定义中加进去停止位和校验么?