summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2012-11-14 14:29:01 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2012-11-14 14:29:01 +0000
commit2eecebfb100a560236cb83806b84f7e54be8e4eb (patch)
treeaf076e0fd0dec201a529396ae02d170bb4d3ec2d /apps
parent94868f4d740c6778c909f38df0bb15975f073730 (diff)
downloadnuttx-2eecebfb100a560236cb83806b84f7e54be8e4eb.tar.gz
nuttx-2eecebfb100a560236cb83806b84f7e54be8e4eb.tar.bz2
nuttx-2eecebfb100a560236cb83806b84f7e54be8e4eb.zip
ModBus fixes from Freddie Chopin
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@5351 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'apps')
-rw-r--r--apps/examples/Make.defs4
-rw-r--r--apps/modbus/mb.c4
2 files changed, 7 insertions, 1 deletions
diff --git a/apps/examples/Make.defs b/apps/examples/Make.defs
index 1c6151384..3d95ccb16 100644
--- a/apps/examples/Make.defs
+++ b/apps/examples/Make.defs
@@ -106,6 +106,10 @@ ifeq ($(CONFIG_EXAMPLES_MM),y)
CONFIGURED_APPS += examples/mm
endif
+ifeq ($(CONFIG_EXAMPLES_MODBUS),y)
+CONFIGURED_APPS += examples/modbus
+endif
+
ifeq ($(CONFIG_EXAMPLES_MOUNT),y)
CONFIGURED_APPS += examples/mount
endif
diff --git a/apps/modbus/mb.c b/apps/modbus/mb.c
index 209b1274c..8417d1274 100644
--- a/apps/modbus/mb.c
+++ b/apps/modbus/mb.c
@@ -399,10 +399,12 @@ eMBPoll( void )
ucMBFrame[usLength++] = ( uint8_t )( ucFunctionCode | MB_FUNC_ERROR );
ucMBFrame[usLength++] = eException;
}
+#ifdef CONFIG_MB_ASCII_ENABLED
if( ( eMBCurrentMode == MB_ASCII ) && CONFIG_MB_ASCII_TIMEOUT_WAIT_BEFORE_SEND_MS )
{
vMBPortTimersDelay( CONFIG_MB_ASCII_TIMEOUT_WAIT_BEFORE_SEND_MS );
- }
+ }
+#endif
eStatus = peMBFrameSendCur( ucMBAddress, ucMBFrame, usLength );
}
break;