Merge pull request #1682 from guochuangjian/master

更新stm32f10x usart驱动bug及modbus rtu断言bug
This commit is contained in:
Bernard Xiong
2018-08-06 13:39:41 +08:00
committed by GitHub
4 changed files with 5 additions and 5 deletions
+2 -2
View File
@@ -184,7 +184,7 @@ void USART1_IRQHandler(void)
}
if (USART_GetFlagStatus(uart->uart_device, USART_FLAG_ORE) == SET)
{
stm32_getc(&serial1);
USART_ReceiveData(uart->uart_device);
}
/* leave interrupt */
rt_interrupt_leave();
@@ -221,7 +221,7 @@ void USART2_IRQHandler(void)
}
if (USART_GetFlagStatus(uart->uart_device, USART_FLAG_ORE) == SET)
{
stm32_getc(&serial2);
USART_ReceiveData(uart->uart_device);
}
/* leave interrupt */
+1 -1
View File
@@ -270,7 +270,7 @@ static void uart_isr(struct rt_serial_device *serial) {
}
if (USART_GetFlagStatus(uart->uart_device, USART_FLAG_ORE) == SET)
{
stm32_getc(serial);
USART_ReceiveData(uart->uart_device);
}
}
+1 -1
View File
@@ -310,7 +310,7 @@ static void uart_isr(struct rt_serial_device *serial)
}
if (USART_GetFlagStatus(uart->uart_device, USART_FLAG_ORE) == SET)
{
stm32_getc(serial);
USART_ReceiveData(uart->uart_device);
}
}
+1 -1
View File
@@ -153,7 +153,7 @@ eMBRTUReceive( UCHAR * pucRcvAddress, UCHAR ** pucFrame, USHORT * pusLength )
eMBErrorCode eStatus = MB_ENOERR;
ENTER_CRITICAL_SECTION( );
RT_ASSERT( usRcvBufferPos < MB_SER_PDU_SIZE_MAX );
RT_ASSERT( usRcvBufferPos <= MB_SER_PDU_SIZE_MAX );
/* Length and CRC check */
if( ( usRcvBufferPos >= MB_SER_PDU_SIZE_MIN )