From b717ccd2e612e9a84ed274f8f5679d120bbd7dfe Mon Sep 17 00:00:00 2001 From: armink Date: Wed, 2 Apr 2014 12:05:34 +0800 Subject: [PATCH] =?UTF-8?q?1=E3=80=81=E3=80=90=E4=BF=AE=E6=94=B9=E3=80=91F?= =?UTF-8?q?reeModbus=E4=B8=BB=E6=9C=BA=E4=B8=80=E5=A4=84=E9=94=99=E8=AF=AF?= =?UTF-8?q?=E7=9A=84=E6=8E=A5=E5=8F=A3=E5=91=BD=E5=90=8D=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: armink --- FreeModbus/modbus/functions/mbfunccoils_m.c | 6 +++--- FreeModbus/modbus/functions/mbfuncdisc_m.c | 2 +- FreeModbus/modbus/functions/mbfuncholding_m.c | 8 ++++---- FreeModbus/modbus/functions/mbfuncinput_m.c | 2 +- FreeModbus/modbus/include/mb_m.h | 2 +- FreeModbus/port/portevent_m.c | 2 +- 6 files changed, 11 insertions(+), 11 deletions(-) diff --git a/FreeModbus/modbus/functions/mbfunccoils_m.c b/FreeModbus/modbus/functions/mbfunccoils_m.c index a5ee267..f6bb51c 100644 --- a/FreeModbus/modbus/functions/mbfunccoils_m.c +++ b/FreeModbus/modbus/functions/mbfunccoils_m.c @@ -103,7 +103,7 @@ eMBMasterReqReadCoils( UCHAR ucSndAddr, USHORT usCoilAddr, USHORT usNCoils ,LONG ucMBFrame[MB_PDU_REQ_READ_COILCNT_OFF + 1] = usNCoils; vMBMasterSetPDUSndLength( MB_PDU_SIZE_MIN + MB_PDU_REQ_READ_SIZE ); ( void ) xMBMasterPortEventPost( EV_MASTER_FRAME_SENT ); - eErrStatus = vMBMasterWaitRequestFinish( ); + eErrStatus = eMBMasterWaitRequestFinish( ); } return eErrStatus; @@ -210,7 +210,7 @@ eMBMasterReqWriteCoil( UCHAR ucSndAddr, USHORT usCoilAddr, USHORT usCoilData, LO ucMBFrame[MB_PDU_REQ_WRITE_VALUE_OFF + 1] = usCoilData; vMBMasterSetPDUSndLength( MB_PDU_SIZE_MIN + MB_PDU_REQ_WRITE_SIZE ); ( void ) xMBMasterPortEventPost( EV_MASTER_FRAME_SENT ); - eErrStatus = vMBMasterWaitRequestFinish( ); + eErrStatus = eMBMasterWaitRequestFinish( ); } return eErrStatus; } @@ -320,7 +320,7 @@ eMBMasterReqWriteMultipleCoils( UCHAR ucSndAddr, } vMBMasterSetPDUSndLength( MB_PDU_SIZE_MIN + MB_PDU_REQ_WRITE_MUL_SIZE_MIN + ucByteCount ); ( void ) xMBMasterPortEventPost( EV_MASTER_FRAME_SENT ); - eErrStatus = vMBMasterWaitRequestFinish( ); + eErrStatus = eMBMasterWaitRequestFinish( ); } return eErrStatus; } diff --git a/FreeModbus/modbus/functions/mbfuncdisc_m.c b/FreeModbus/modbus/functions/mbfuncdisc_m.c index ed865ed..6c8d6c4 100644 --- a/FreeModbus/modbus/functions/mbfuncdisc_m.c +++ b/FreeModbus/modbus/functions/mbfuncdisc_m.c @@ -88,7 +88,7 @@ eMBMasterReqReadDiscreteInputs( UCHAR ucSndAddr, USHORT usDiscreteAddr, USHORT u ucMBFrame[MB_PDU_REQ_READ_DISCCNT_OFF + 1] = usNDiscreteIn; vMBMasterSetPDUSndLength( MB_PDU_SIZE_MIN + MB_PDU_REQ_READ_SIZE ); ( void ) xMBMasterPortEventPost( EV_MASTER_FRAME_SENT ); - eErrStatus = vMBMasterWaitRequestFinish( ); + eErrStatus = eMBMasterWaitRequestFinish( ); } return eErrStatus; } diff --git a/FreeModbus/modbus/functions/mbfuncholding_m.c b/FreeModbus/modbus/functions/mbfuncholding_m.c index 65df268..d938c36 100644 --- a/FreeModbus/modbus/functions/mbfuncholding_m.c +++ b/FreeModbus/modbus/functions/mbfuncholding_m.c @@ -115,7 +115,7 @@ eMBMasterReqWriteHoldingRegister( UCHAR ucSndAddr, USHORT usRegAddr, USHORT usRe ucMBFrame[MB_PDU_REQ_WRITE_VALUE_OFF + 1] = usRegData ; vMBMasterSetPDUSndLength( MB_PDU_SIZE_MIN + MB_PDU_REQ_WRITE_SIZE ); ( void ) xMBMasterPortEventPost( EV_MASTER_FRAME_SENT ); - eErrStatus = vMBMasterWaitRequestFinish( ); + eErrStatus = eMBMasterWaitRequestFinish( ); } return eErrStatus; } @@ -193,7 +193,7 @@ eMBMasterReqWriteMultipleHoldingRegister( UCHAR ucSndAddr, } vMBMasterSetPDUSndLength( MB_PDU_SIZE_MIN + MB_PDU_REQ_WRITE_MUL_SIZE_MIN + 2*usNRegs ); ( void ) xMBMasterPortEventPost( EV_MASTER_FRAME_SENT ); - eErrStatus = vMBMasterWaitRequestFinish( ); + eErrStatus = eMBMasterWaitRequestFinish( ); } return eErrStatus; } @@ -280,7 +280,7 @@ eMBMasterReqReadHoldingRegister( UCHAR ucSndAddr, USHORT usRegAddr, USHORT usNRe ucMBFrame[MB_PDU_REQ_READ_REGCNT_OFF + 1] = usNRegs; vMBMasterSetPDUSndLength( MB_PDU_SIZE_MIN + MB_PDU_REQ_READ_SIZE ); ( void ) xMBMasterPortEventPost( EV_MASTER_FRAME_SENT ); - eErrStatus = vMBMasterWaitRequestFinish( ); + eErrStatus = eMBMasterWaitRequestFinish( ); } return eErrStatus; } @@ -386,7 +386,7 @@ eMBMasterReqReadWriteMultipleHoldingRegister( UCHAR ucSndAddr, } vMBMasterSetPDUSndLength( MB_PDU_SIZE_MIN + MB_PDU_REQ_READWRITE_SIZE_MIN + 2*usNWriteRegs ); ( void ) xMBMasterPortEventPost( EV_MASTER_FRAME_SENT ); - eErrStatus = vMBMasterWaitRequestFinish( ); + eErrStatus = eMBMasterWaitRequestFinish( ); } return eErrStatus; } diff --git a/FreeModbus/modbus/functions/mbfuncinput_m.c b/FreeModbus/modbus/functions/mbfuncinput_m.c index 653414f..7c50cc2 100644 --- a/FreeModbus/modbus/functions/mbfuncinput_m.c +++ b/FreeModbus/modbus/functions/mbfuncinput_m.c @@ -88,7 +88,7 @@ eMBMasterReqReadInputRegister( UCHAR ucSndAddr, USHORT usRegAddr, USHORT usNRegs ucMBFrame[MB_PDU_REQ_READ_REGCNT_OFF + 1] = usNRegs; vMBMasterSetPDUSndLength( MB_PDU_SIZE_MIN + MB_PDU_REQ_READ_SIZE ); ( void ) xMBMasterPortEventPost( EV_MASTER_FRAME_SENT ); - eErrStatus = vMBMasterWaitRequestFinish( ); + eErrStatus = eMBMasterWaitRequestFinish( ); } return eErrStatus; } diff --git a/FreeModbus/modbus/include/mb_m.h b/FreeModbus/modbus/include/mb_m.h index 15ebb0e..f6b25e2 100644 --- a/FreeModbus/modbus/include/mb_m.h +++ b/FreeModbus/modbus/include/mb_m.h @@ -392,7 +392,7 @@ void vMBMasterSetCurTimerMode( eMBMasterTimerMode eMBTimerMode ); BOOL xMBMasterRequestIsBroadcast( void ); eMBMasterErrorEventType eMBMasterGetErrorType( void ); void vMBMasterSetErrorType( eMBMasterErrorEventType errorType ); -eMBMasterReqErrCode vMBMasterWaitRequestFinish( void ); +eMBMasterReqErrCode eMBMasterWaitRequestFinish( void ); /* ----------------------- Callback -----------------------------------------*/ diff --git a/FreeModbus/port/portevent_m.c b/FreeModbus/port/portevent_m.c index 685ecad..c6a2961 100644 --- a/FreeModbus/port/portevent_m.c +++ b/FreeModbus/port/portevent_m.c @@ -194,7 +194,7 @@ void vMBMasterCBRequestScuuess( void ) { * * @return request error code */ -eMBMasterReqErrCode vMBMasterWaitRequestFinish( void ) { +eMBMasterReqErrCode eMBMasterWaitRequestFinish( void ) { eMBMasterReqErrCode eErrStatus = MB_MRE_NO_ERR; rt_uint32_t recvedEvent; /* waiting for OS event */