BOOL
xMBRTUReceiveFSM( void )
{
BOOL xTaskNeedSwitch = FALSE;
UCHAR ucByte;
assert( eSndState == STATE_TX_IDLE );
/* Always read the character. */
( void )xMBPortSerialGetByte( ( CHAR * ) & ucByte );
switch ( eRcvState )
{
/* If we have received a character in the init state we have to
* wait until the frame is finished.
*/
case STATE_RX_INIT:
vMBPortTimersEnable( );
break;
/* In the error state we wait until all characters in the
* damaged frame are transmitted.
*/
case STATE_RX_ERROR:
vMBPortTimersEnable( );
break;
/* In the idle state we wait for a new character. If a character
* is received the t1.5 and t3.5 timers are started and the
* receiver is in the state STATE_RX_RECEIVCE.
*/
case STATE_RX_IDLE:
usRcvBufferPos = 0;
ucRTUBuf[usRcvBufferPos+&#
关于freemodbus源码中的xMBRTUReceiveFSM()
最新推荐文章于 2024-09-20 21:16:57 发布
本文详细解读了freemodbus库中mbrtu.c文件内的xMBRTUReceiveFSM()函数,阐述了其在eMBInit()初始化后如何响应RXNE中断,以及在不同状态(STATE_RX_INIT, STATE_RX_IDLE, STATE_RX_RCV)下的工作原理,特别是数据接收、超时处理和状态转换机制。"
109123373,10012313,BERT文本预处理详解与实现,"['自然语言处理', '深度学习', '预处理', 'Python']
摘要由CSDN通过智能技术生成