Browse Source

ModBus fixes from Freddie Chopin

git-svn-id: http://svn.code.sf.net/p/nuttx/code/trunk@5351 42af7a65-404d-4744-a932-0658087f49c3
sbg
patacongo 12 years ago
parent
commit
81caf90b8d
  1. 4
      apps/examples/Make.defs
  2. 4
      apps/modbus/mb.c

4
apps/examples/Make.defs

@ -106,6 +106,10 @@ ifeq ($(CONFIG_EXAMPLES_MM),y) @@ -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

4
apps/modbus/mb.c

@ -399,10 +399,12 @@ eMBPoll( void ) @@ -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;

Loading…
Cancel
Save