FreeModBus now builds

git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@4963 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
patacongo
2012-07-21 16:18:16 +00:00
parent 1df7b496dd
commit d06e6c83b3
19 changed files with 130 additions and 98 deletions

View File

@@ -32,13 +32,14 @@
#include <nuttx/config.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
/* ----------------------- Platform includes --------------------------------*/
#include "port.h"
/* ----------------------- Modbus includes ----------------------------------*/
#include "mb.h"
#include "mbproto.h"
#include <apps/modbus/mb.h>
#include <apps/modbus/mbproto.h>
/* ----------------------- Defines ------------------------------------------*/
#define BITS_UCHAR 8U
@@ -54,8 +55,8 @@ xMBUtilSetBits( UCHAR * ucByteBuf, USHORT usBitOffset, UCHAR ucNBits,
USHORT usNPreBits;
USHORT usValue = ucValue;
assert( ucNBits <= 8 );
assert( ( size_t )BITS_UCHAR == sizeof( UCHAR ) * 8 );
ASSERT( ucNBits <= 8 );
ASSERT( ( size_t )BITS_UCHAR == sizeof( UCHAR ) * 8 );
/* Calculate byte offset for first byte containing the bit values starting
* at usBitOffset. */