debug modbus slave

This commit is contained in:
wmano
2025-09-10 23:03:11 +08:00
parent 7b764c34b9
commit 485e535c4d
28 changed files with 507 additions and 449 deletions
+3 -3
View File
@@ -61,7 +61,7 @@
/* ----------------------- Static variables ---------------------------------*/
static UCHAR ucMBAddress;
static eMBMode eMBCurrentMode;
//static eMBMode eMBCurrentMode;
static enum
{
@@ -188,7 +188,7 @@ eMBInit( eMBMode eMode, UCHAR ucSlaveAddress, UCHAR ucPort, ULONG ulBaudRate, eM
}
else
{
eMBCurrentMode = eMode;
// eMBCurrentMode = eMode;
eMBState = STATE_DISABLED;
}
}
@@ -219,7 +219,7 @@ eMBTCPInit( USHORT ucTCPPort )
peMBFrameSendCur = eMBTCPSend;
pvMBFrameCloseCur = MB_PORT_HAS_CLOSE ? vMBTCPPortClose : NULL;
ucMBAddress = MB_TCP_PSEUDO_ADDRESS;
eMBCurrentMode = MB_TCP;
// eMBCurrentMode = MB_TCP;
eMBState = STATE_DISABLED;
}
return eStatus;