FreeModBus is now integrated with the Nuttx configuration system

git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@4961 7fd9a85b-ad96-42d3-883c-3090e2eb8679
This commit is contained in:
patacongo
2012-07-21 14:56:21 +00:00
parent 3eafac29cd
commit 4c2b6c49c9
24 changed files with 978 additions and 220 deletions
+6 -6
View File
@@ -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;