1、【修改】FreeModbus主机广播时,写多个寄存器或线圈过程中,命令执行出错的问题。
Signed-off-by: armink <armink.ztl@gmail.com>
This commit is contained in:
parent
6f01fe6286
commit
5832f7aa89
|
@ -1,12 +1,14 @@
|
||||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
<?fileVersion 4.0.0?><cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage">
|
<?fileVersion 4.0.0?>
|
||||||
|
|
||||||
|
<cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage">
|
||||||
<storageModule moduleId="org.eclipse.cdt.core.settings">
|
<storageModule moduleId="org.eclipse.cdt.core.settings">
|
||||||
<cconfiguration id="iar.arm.toolchain.project.exe.configuration.debug.v5.4.0.1797449233">
|
<cconfiguration id="iar.arm.toolchain.project.exe.configuration.debug.v5.4.0.1797449233">
|
||||||
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="iar.arm.toolchain.project.exe.configuration.debug.v5.4.0.1797449233" moduleId="org.eclipse.cdt.core.settings" name="Debug">
|
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="iar.arm.toolchain.project.exe.configuration.debug.v5.4.0.1797449233" moduleId="org.eclipse.cdt.core.settings" name="Debug">
|
||||||
<externalSettings/>
|
<externalSettings/>
|
||||||
<extensions>
|
<extensions>
|
||||||
<extension id="com.iar.cdt.errorParser.com.iar.cdt.errorParser.ErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
|
||||||
<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
|
<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
|
||||||
|
<extension id="com.iar.cdt.errorParser.com.iar.cdt.errorParser.ErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||||
</extensions>
|
</extensions>
|
||||||
</storageModule>
|
</storageModule>
|
||||||
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
||||||
|
@ -59,6 +61,7 @@
|
||||||
<option id="iar.arm.toolchain.compiler.option.defines.v5.4.0.1280497388" name="Defined Symbols:" superClass="iar.arm.toolchain.compiler.option.defines.v5.4.0" valueType="definedSymbols">
|
<option id="iar.arm.toolchain.compiler.option.defines.v5.4.0.1280497388" name="Defined Symbols:" superClass="iar.arm.toolchain.compiler.option.defines.v5.4.0" valueType="definedSymbols">
|
||||||
<listOptionValue builtIn="false" value="STM32F10X_MD"/>
|
<listOptionValue builtIn="false" value="STM32F10X_MD"/>
|
||||||
<listOptionValue builtIn="false" value="USE_STDPERIPH_DRIVER"/>
|
<listOptionValue builtIn="false" value="USE_STDPERIPH_DRIVER"/>
|
||||||
|
<listOptionValue builtIn="false" value="USE_FULL_ASSERT"/>
|
||||||
</option>
|
</option>
|
||||||
<option id="iar.arm.toolchain.compiler.option.preserveComments.v6.2.0.126518534" name="Preserve comments" superClass="iar.arm.toolchain.compiler.option.preserveComments.v6.2.0"/>
|
<option id="iar.arm.toolchain.compiler.option.preserveComments.v6.2.0.126518534" name="Preserve comments" superClass="iar.arm.toolchain.compiler.option.preserveComments.v6.2.0"/>
|
||||||
<option id="iar.arm.toolchain.compiler.option.generateLineDirectives.v6.2.0.1926829743" name="Generate #line directives" superClass="iar.arm.toolchain.compiler.option.generateLineDirectives.v6.2.0"/>
|
<option id="iar.arm.toolchain.compiler.option.generateLineDirectives.v6.2.0.1926829743" name="Generate #line directives" superClass="iar.arm.toolchain.compiler.option.generateLineDirectives.v6.2.0"/>
|
||||||
|
@ -114,8 +117,8 @@
|
||||||
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="iar.arm.toolchain.project.exe.configuration.release.v5.4.0.1401199975" moduleId="org.eclipse.cdt.core.settings" name="Release">
|
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="iar.arm.toolchain.project.exe.configuration.release.v5.4.0.1401199975" moduleId="org.eclipse.cdt.core.settings" name="Release">
|
||||||
<externalSettings/>
|
<externalSettings/>
|
||||||
<extensions>
|
<extensions>
|
||||||
<extension id="com.iar.cdt.errorParser.com.iar.cdt.errorParser.ErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
|
||||||
<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
|
<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
|
||||||
|
<extension id="com.iar.cdt.errorParser.com.iar.cdt.errorParser.ErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||||
</extensions>
|
</extensions>
|
||||||
</storageModule>
|
</storageModule>
|
||||||
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
||||||
|
|
|
@ -337,7 +337,8 @@ eMBMasterFuncWriteMultipleCoils( UCHAR * pucFrame, USHORT * usLen )
|
||||||
eMBException eStatus = MB_EX_NONE;
|
eMBException eStatus = MB_EX_NONE;
|
||||||
eMBErrorCode eRegStatus;
|
eMBErrorCode eRegStatus;
|
||||||
|
|
||||||
if( *usLen == MB_PDU_FUNC_WRITE_MUL_SIZE )
|
/* If this request is broadcast, the *usLen is not need check. */
|
||||||
|
if( ( *usLen == MB_PDU_FUNC_WRITE_MUL_SIZE ) || xMBMasterRequestIsBroadcast() )
|
||||||
{
|
{
|
||||||
vMBMasterGetPDUSndBuf(&ucMBFrame);
|
vMBMasterGetPDUSndBuf(&ucMBFrame);
|
||||||
usRegAddress = ( USHORT )( pucFrame[MB_PDU_FUNC_WRITE_MUL_ADDR_OFF] << 8 );
|
usRegAddress = ( USHORT )( pucFrame[MB_PDU_FUNC_WRITE_MUL_ADDR_OFF] << 8 );
|
||||||
|
|
|
@ -209,7 +209,8 @@ eMBMasterFuncWriteMultipleHoldingRegister( UCHAR * pucFrame, USHORT * usLen )
|
||||||
eMBException eStatus = MB_EX_NONE;
|
eMBException eStatus = MB_EX_NONE;
|
||||||
eMBErrorCode eRegStatus;
|
eMBErrorCode eRegStatus;
|
||||||
|
|
||||||
if( *usLen == MB_PDU_SIZE_MIN + MB_PDU_FUNC_WRITE_MUL_SIZE )
|
/* If this request is broadcast, the *usLen is not need check. */
|
||||||
|
if( ( *usLen == MB_PDU_SIZE_MIN + MB_PDU_FUNC_WRITE_MUL_SIZE ) || xMBMasterRequestIsBroadcast() )
|
||||||
{
|
{
|
||||||
vMBMasterGetPDUSndBuf(&ucMBFrame);
|
vMBMasterGetPDUSndBuf(&ucMBFrame);
|
||||||
usRegAddress = ( USHORT )( ucMBFrame[MB_PDU_REQ_WRITE_MUL_ADDR_OFF] << 8 );
|
usRegAddress = ( USHORT )( ucMBFrame[MB_PDU_REQ_WRITE_MUL_ADDR_OFF] << 8 );
|
||||||
|
|
|
@ -87,8 +87,6 @@ GraphEnabled=0
|
||||||
ShowTimeLog=1
|
ShowTimeLog=1
|
||||||
ShowTimeSum=1
|
ShowTimeSum=1
|
||||||
SumSortOrder=0
|
SumSortOrder=0
|
||||||
[Breakpoints2]
|
|
||||||
Count=0
|
|
||||||
[Trace2]
|
[Trace2]
|
||||||
Enabled=0
|
Enabled=0
|
||||||
ShowSource=0
|
ShowSource=0
|
||||||
|
@ -113,3 +111,5 @@ Mode=3
|
||||||
Graph=0
|
Graph=0
|
||||||
Symbiont=0
|
Symbiont=0
|
||||||
Exclusions=
|
Exclusions=
|
||||||
|
[Breakpoints2]
|
||||||
|
Count=0
|
||||||
|
|
Loading…
Reference in New Issue