summaryrefslogtreecommitdiff
path: root/apps/modbus/functions/mbfuncholding.c
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2012-07-21 14:56:21 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2012-07-21 14:56:21 +0000
commitfcfd6c4d7ca3cc8d2751652a79a08d64eb8ec5a3 (patch)
treea06bbe9986c21dae6763e584c9ab79394cb3b99b /apps/modbus/functions/mbfuncholding.c
parent1dc0e8b8c5b6e03fcfcdcbc89efd512f934eaca5 (diff)
downloadnuttx-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/mbfuncholding.c')
-rw-r--r--apps/modbus/functions/mbfuncholding.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/apps/modbus/functions/mbfuncholding.c b/apps/modbus/functions/mbfuncholding.c
index e74a0624d..507b7f382 100644
--- a/apps/modbus/functions/mbfuncholding.c
+++ b/apps/modbus/functions/mbfuncholding.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,7 +40,6 @@
#include "mb.h"
#include "mbframe.h"
#include "mbproto.h"
-#include "mbconfig.h"
/* ----------------------- Defines ------------------------------------------*/
#define MB_PDU_FUNC_READ_ADDR_OFF ( MB_PDU_DATA_OFF + 0)
@@ -71,7 +71,7 @@ eMBException prveMBError2Exception( eMBErrorCode eErrorCode );
/* ----------------------- Start implementation -----------------------------*/
-#if MB_FUNC_WRITE_HOLDING_ENABLED > 0
+#ifdef CONFIG_MB_FUNC_WRITE_HOLDING_ENABLED
eMBException
eMBFuncWriteHoldingRegister( UCHAR * pucFrame, USHORT * usLen )
@@ -105,7 +105,7 @@ eMBFuncWriteHoldingRegister( UCHAR * pucFrame, USHORT * usLen )
}
#endif
-#if MB_FUNC_WRITE_MULTIPLE_HOLDING_ENABLED > 0
+#ifdef CONFIG_MB_FUNC_WRITE_MULTIPLE_HOLDING_ENABLED
eMBException
eMBFuncWriteMultipleHoldingRegister( UCHAR * pucFrame, USHORT * usLen )
{
@@ -164,7 +164,7 @@ eMBFuncWriteMultipleHoldingRegister( UCHAR * pucFrame, USHORT * usLen )
}
#endif
-#if MB_FUNC_READ_HOLDING_ENABLED > 0
+#ifdef CONFIG_MB_FUNC_READ_HOLDING_ENABLED
eMBException
eMBFuncReadHoldingRegister( UCHAR * pucFrame, USHORT * usLen )
@@ -229,7 +229,7 @@ eMBFuncReadHoldingRegister( UCHAR * pucFrame, USHORT * usLen )
#endif
-#if MB_FUNC_READWRITE_HOLDING_ENABLED > 0
+#ifdef CONFIG_MB_FUNC_READWRITE_HOLDING_ENABLED
eMBException
eMBFuncReadWriteMultipleHoldingRegister( UCHAR * pucFrame, USHORT * usLen )