Merge pull request #1682 from guochuangjian/master
更新stm32f10x usart驱动bug及modbus rtu断言bug
This commit is contained in:
commit
fb539cfdc8
|
@ -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 */
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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 )
|
||||
|
|
Loading…
Reference in New Issue