Lines Matching +full:8 +full:- +full:byte
31 /* ----------------------- System includes ----------------------------------*/
35 /* ----------------------- Platform includes --------------------------------*/
38 /* ----------------------- Modbus includes ----------------------------------*/
42 /* ----------------------- Defines ------------------------------------------*/
43 #define BITS_UCHAR 8U
45 /* ----------------------- Start implementation -----------------------------*/
56 RT_ASSERT( ucNBits <= 8 ); in xMBUtilSetBits()
57 RT_ASSERT( ( size_t )BITS_UCHAR == sizeof( UCHAR ) * 8 ); in xMBUtilSetBits()
59 /* Calculate byte offset for first byte containing the bit values starting in xMBUtilSetBits()
64 usNPreBits = ( USHORT )( usBitOffset - usByteOffset * BITS_UCHAR ); in xMBUtilSetBits()
70 usMask = ( USHORT )( ( 1 << ( USHORT ) ucNBits ) - 1 ); in xMBUtilSetBits()
71 usMask <<= usBitOffset - usByteOffset * BITS_UCHAR; in xMBUtilSetBits()
93 /* Calculate byte offset for first byte containing the bit values starting in xMBUtilGetBits()
98 usNPreBits = ( USHORT )( usBitOffset - usByteOffset * BITS_UCHAR ); in xMBUtilGetBits()
101 usMask = ( USHORT )( ( 1 << ( USHORT ) ucNBits ) - 1 ); in xMBUtilGetBits()