mirror of
https://github.com/armink/FreeModbus_Slave-Master-RTT-STM32.git
synced 2025-02-02 12:40:15 +08:00
1、【修改】软件中几处断言无法通过的地方
Signed-off-by: armink <armink.ztl@gmail.com>
This commit is contained in:
parent
301b75ced0
commit
24432b4fee
@ -43,7 +43,7 @@
|
|||||||
|
|
||||||
// <o> Internal SRAM memory size[Kbytes] <8-64>
|
// <o> Internal SRAM memory size[Kbytes] <8-64>
|
||||||
// <i>Default: 64
|
// <i>Default: 64
|
||||||
#define STM32_SRAM_SIZE 64
|
#define STM32_SRAM_SIZE 20
|
||||||
#define STM32_SRAM_END (0x20000000 + STM32_SRAM_SIZE * 1024)
|
#define STM32_SRAM_END (0x20000000 + STM32_SRAM_SIZE * 1024)
|
||||||
|
|
||||||
|
|
||||||
|
@ -160,7 +160,7 @@ eMBMasterRTUReceive( UCHAR * pucRcvAddress, UCHAR ** pucFrame, USHORT * pusLengt
|
|||||||
eMBErrorCode eStatus = MB_ENOERR;
|
eMBErrorCode eStatus = MB_ENOERR;
|
||||||
|
|
||||||
ENTER_CRITICAL_SECTION( );
|
ENTER_CRITICAL_SECTION( );
|
||||||
assert_param( usRcvBufferPos < MB_SER_PDU_SIZE_MAX );
|
assert_param( usMasterRcvBufferPos < MB_SER_PDU_SIZE_MAX );
|
||||||
|
|
||||||
/* Length and CRC check */
|
/* Length and CRC check */
|
||||||
if( ( usMasterRcvBufferPos >= MB_SER_PDU_SIZE_MIN )
|
if( ( usMasterRcvBufferPos >= MB_SER_PDU_SIZE_MIN )
|
||||||
@ -235,7 +235,7 @@ xMBMasterRTUReceiveFSM( void )
|
|||||||
BOOL xTaskNeedSwitch = FALSE;
|
BOOL xTaskNeedSwitch = FALSE;
|
||||||
UCHAR ucByte;
|
UCHAR ucByte;
|
||||||
|
|
||||||
assert_param( eSndState == STATE_TX_IDLE );
|
assert_param( eSndState == STATE_M_TX_IDLE );
|
||||||
|
|
||||||
/* Always read the character. */
|
/* Always read the character. */
|
||||||
( void )xMBMasterPortSerialGetByte( ( CHAR * ) & ucByte );
|
( void )xMBMasterPortSerialGetByte( ( CHAR * ) & ucByte );
|
||||||
@ -301,7 +301,7 @@ xMBMasterRTUTransmitFSM( void )
|
|||||||
{
|
{
|
||||||
BOOL xNeedPoll = FALSE;
|
BOOL xNeedPoll = FALSE;
|
||||||
|
|
||||||
assert_param( eRcvState == STATE_RX_IDLE );
|
assert_param( eRcvState == STATE_M_RX_IDLE );
|
||||||
|
|
||||||
switch ( eSndState )
|
switch ( eSndState )
|
||||||
{
|
{
|
||||||
|
@ -183,7 +183,6 @@ void USART1_IRQHandler(void)
|
|||||||
//发送中断
|
//发送中断
|
||||||
if (USART_GetITStatus(USART1, USART_IT_TXE) == SET)
|
if (USART_GetITStatus(USART1, USART_IT_TXE) == SET)
|
||||||
{
|
{
|
||||||
USART_ClearITPendingBit(USART1, USART_IT_TXE);
|
|
||||||
prvvUARTTxReadyISR();
|
prvvUARTTxReadyISR();
|
||||||
}
|
}
|
||||||
rt_interrupt_leave();
|
rt_interrupt_leave();
|
||||||
|
@ -184,7 +184,6 @@ void USART2_IRQHandler(void)
|
|||||||
//发送中断
|
//发送中断
|
||||||
if (USART_GetITStatus(USART2, USART_IT_TXE) == SET)
|
if (USART_GetITStatus(USART2, USART_IT_TXE) == SET)
|
||||||
{
|
{
|
||||||
USART_ClearITPendingBit(USART2, USART_IT_TXE);
|
|
||||||
prvvUARTTxReadyISR();
|
prvvUARTTxReadyISR();
|
||||||
}
|
}
|
||||||
rt_interrupt_leave();
|
rt_interrupt_leave();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user