diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2012-07-21 14:56:21 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2012-07-21 14:56:21 +0000 |
commit | fcfd6c4d7ca3cc8d2751652a79a08d64eb8ec5a3 (patch) | |
tree | a06bbe9986c21dae6763e584c9ab79394cb3b99b /apps/modbus/functions/mbfuncother.c | |
parent | 1dc0e8b8c5b6e03fcfcdcbc89efd512f934eaca5 (diff) | |
download | nuttx-fcfd6c4d7ca3cc8d2751652a79a08d64eb8ec5a3.tar.gz nuttx-fcfd6c4d7ca3cc8d2751652a79a08d64eb8ec5a3.tar.bz2 nuttx-fcfd6c4d7ca3cc8d2751652a79a08d64eb8ec5a3.zip |
FreeModBus is now integrated with the Nuttx configuration system
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@4961 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'apps/modbus/functions/mbfuncother.c')
-rw-r--r-- | apps/modbus/functions/mbfuncother.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/apps/modbus/functions/mbfuncother.c b/apps/modbus/functions/mbfuncother.c index fcee972bf..5d5636a16 100644 --- a/apps/modbus/functions/mbfuncother.c +++ b/apps/modbus/functions/mbfuncother.c @@ -29,8 +29,9 @@ */ /* ----------------------- System includes ----------------------------------*/ -#include "stdlib.h" -#include "string.h" +#include <nuttx/config.h> +#include <stdlib.h> +#include <string.h> /* ----------------------- Platform includes --------------------------------*/ #include "port.h" @@ -39,12 +40,11 @@ #include "mb.h" #include "mbframe.h" #include "mbproto.h" -#include "mbconfig.h" -#if MB_FUNC_OTHER_REP_SLAVEID_ENABLED > 0 +#ifdef CONFIG_MB_FUNC_OTHER_REP_SLAVEID_ENABLED /* ----------------------- Static variables ---------------------------------*/ -static UCHAR ucMBSlaveID[MB_FUNC_OTHER_REP_SLAVEID_BUF]; +static UCHAR ucMBSlaveID[CONFIG_MB_FUNC_OTHER_REP_SLAVEID_BUF]; static USHORT usMBSlaveIDLen; /* ----------------------- Start implementation -----------------------------*/ @@ -58,7 +58,7 @@ eMBSetSlaveID( UCHAR ucSlaveID, BOOL xIsRunning, /* the first byte and second byte in the buffer is reserved for * the parameter ucSlaveID and the running flag. The rest of * the buffer is available for additional data. */ - if( usAdditionalLen + 2 < MB_FUNC_OTHER_REP_SLAVEID_BUF ) + if( usAdditionalLen + 2 < CONFIG_MB_FUNC_OTHER_REP_SLAVEID_BUF ) { usMBSlaveIDLen = 0; ucMBSlaveID[usMBSlaveIDLen++] = ucSlaveID; |