From 54460c71803bbba89081499ea800020ac3522257 Mon Sep 17 00:00:00 2001 From: armink Date: Tue, 7 Oct 2014 08:51:25 +0800 Subject: [PATCH] =?UTF-8?q?1=E3=80=81=E3=80=90=E4=BF=AE=E6=94=B9=E3=80=91?= =?UTF-8?q?=E5=9C=A8=E6=8E=A5=E6=94=B6=E6=95=B0=E6=8D=AE=E9=95=BF=E5=BA=A6?= =?UTF-8?q?=E8=B6=85=E8=BF=87MB=5FSER=5FPDU=5FSIZE=5FMAX=E5=8D=B3PDU?= =?UTF-8?q?=E6=9C=80=E5=A4=A7=E9=95=BF=E5=BA=A6=E5=90=8E=EF=BC=8C=E9=94=99?= =?UTF-8?q?=E8=AF=AF=E6=9C=AA=E8=A2=AB=E5=A4=84=E7=90=86=E7=9A=84Bug?= =?UTF-8?q?=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: armink --- APP/inc/delay_conf.h | 2 +- FreeModbus/modbus/rtu/mbrtu_m.c | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/APP/inc/delay_conf.h b/APP/inc/delay_conf.h index 2b62e03..1285ed4 100644 --- a/APP/inc/delay_conf.h +++ b/APP/inc/delay_conf.h @@ -28,7 +28,7 @@ #define DELAY_MS(X) (X*DELAY_1MS) #define DELAY_S(X) (X*1000*DELAY_1MS) -#elif (RT_TICK_PER_SECOND == 10000)||(RT_TICK_PER_SECOND == 100000)||(RT_TICK_PER_SECOND == 100000) +#elif (RT_TICK_PER_SECOND == 10000) #define DELAY_100US(X) (X*RT_TICK_PER_SECOND/10000) #define DELAY_1MS (RT_TICK_PER_SECOND/1000) #define DELAY_MS(X) (X*DELAY_1MS) diff --git a/FreeModbus/modbus/rtu/mbrtu_m.c b/FreeModbus/modbus/rtu/mbrtu_m.c index 4756f57..987c9a3 100644 --- a/FreeModbus/modbus/rtu/mbrtu_m.c +++ b/FreeModbus/modbus/rtu/mbrtu_m.c @@ -364,6 +364,8 @@ xMBMasterRTUTimerExpired(void) /* An error occured while receiving the frame. */ case STATE_M_RX_ERROR: + vMBMasterSetErrorType(EV_ERROR_RECEIVE_DATA); + xNeedPoll = xMBMasterPortEventPost( EV_MASTER_ERROR_PROCESS ); break; /* Function called in an illegal state. */