mirror of
https://github.com/apache/nuttx-apps.git
synced 2025-10-17 15:32:21 +08:00
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:
@@ -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. */
|
||||
|
Reference in New Issue
Block a user