Explorar o código

fix:uart停止位设置没起作用

alienwalker %!s(int64=4) %!d(string=hai) anos
pai
achega
5e05d006f0
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      bsp/air105/hal/core_uart.c

+ 1 - 1
bsp/air105/hal/core_uart.c

@@ -226,7 +226,7 @@ void Uart_BaseInit(uint8_t UartID, uint32_t BaudRate, uint8_t IsRxCacheEnable, u
 	/* LCR = 0 */
 	Uart->LCR &= ~UART_LCR_DLAB;
 	LCR = UART_WordLength_5b + DataBits - UART_DATA_BIT5;
-	switch(Parity)
+	switch(StopBits)
 	{
 	case UART_STOP_BIT1:
 		LCR |= UART_StopBits_1;