Choco OS  V.0.16.9.0
Join to the chocolate world
(Bits) The library for the bits operation

Macros

#define oC_Bits_Mask_U8(FROM, TO)
 
#define oC_Bits_Mask_U16(FROM, TO)
 
#define oC_Bits_Mask_U32(FROM, TO)
 
#define oC_Bits_Mask_U64(FROM, TO)
 
#define oC_Bits_ValueWithMask(VALUE, FROM, MASK)
 

Functions

static uint8_t oC_Bits_SetBitsU8 (uint8_t *outVariable, uint8_t Mask)
 
static uint16_t oC_Bits_SetBitsU16 (uint16_t *outVariable, uint16_t Mask)
 
static uint32_t oC_Bits_SetBitsU32 (uint32_t *outVariable, uint32_t Mask)
 
static uint64_t oC_Bits_SetBitsU64 (uint64_t *outVariable, uint64_t Mask)
 
static uint8_t oC_Bits_ClearBitsU8 (uint8_t *outVariable, uint8_t Mask)
 
static uint16_t oC_Bits_ClearBitsU16 (uint16_t *outVariable, uint16_t Mask)
 
static uint32_t oC_Bits_ClearBitsU32 (uint32_t *outVariable, uint32_t Mask)
 
static uint64_t oC_Bits_ClearBitsU64 (uint64_t *outVariable, uint64_t Mask)
 
static uint8_t oC_Bits_SetValueU8 (uint8_t *outVariable, uint8_t Value, uint8_t StartBitNr, uint8_t EndBitNr)
 
static uint16_t oC_Bits_SetValueU16 (uint16_t *outVariable, uint16_t Value, uint8_t StartBitNr, uint8_t EndBitNr)
 
static uint32_t oC_Bits_SetValueU32 (uint32_t *outVariable, uint32_t Value, uint8_t StartBitNr, uint8_t EndBitNr)
 
static uint64_t oC_Bits_SetValueU64 (uint64_t *outVariable, uint64_t Value, uint8_t StartBitNr, uint8_t EndBitNr)
 
static uint8_t oC_Bits_GetValueU8 (uint8_t Variable, uint8_t StartBitNr, uint8_t EndBitNr)
 
static uint16_t oC_Bits_GetValueU16 (uint16_t Variable, uint8_t StartBitNr, uint8_t EndBitNr)
 
static uint32_t oC_Bits_GetValueU32 (uint32_t Variable, uint8_t StartBitNr, uint8_t EndBitNr)
 
static uint64_t oC_Bits_GetValueU64 (uint64_t Variable, uint8_t StartBitNr, uint8_t EndBitNr)
 
static void oC_Bits_SplitU64ToU32 (uint64_t Variable, uint32_t *outLow, uint32_t *outHigh)
 
static void oC_Bits_SplitU32ToU16 (uint32_t Variable, uint16_t *outLow, uint16_t *outHigh)
 
static void oC_Bits_SplitU16ToU8 (uint16_t Variable, uint8_t *outLow, uint8_t *outHigh)
 
static uint16_t oC_Bits_JoinU8ToU16 (uint8_t LowPart, uint8_t HighPart)
 
static uint32_t oC_Bits_JoinU16ToU32 (uint16_t LowPart, uint16_t HighPart)
 
static uint64_t oC_Bits_JoinU32ToU64 (uint32_t LowPart, uint32_t HighPart)
 
static int8_t oC_Bits_GetBitNumberU8 (uint8_t BitMask)
 
static int8_t oC_Bits_GetBitNumberU16 (uint16_t BitMask)
 
static int8_t oC_Bits_GetBitNumberU32 (uint32_t BitMask)
 
static int8_t oC_Bits_GetBitNumberU64 (uint64_t BitMask)
 
static bool oC_Bits_IsBitSetU8 (uint8_t BitMask, uint8_t BitIndex)
 checks if bit is set More...
 
static bool oC_Bits_IsBitSetU16 (uint16_t BitMask, uint8_t BitIndex)
 checks if bit is set More...
 
static bool oC_Bits_IsBitSetU32 (uint32_t BitMask, uint8_t BitIndex)
 checks if bit is set More...
 
static bool oC_Bits_IsBitSetU64 (uint64_t BitMask, uint8_t BitIndex)
 checks if bit is set More...
 
static uint8_t oC_Bits_SetBitU8 (uint8_t *outVariable, uint8_t BitIndex)
 sets bit in the variable More...
 
static uint16_t oC_Bits_SetBitU16 (uint16_t *outVariable, uint8_t BitIndex)
 sets bit in the variable More...
 
static uint32_t oC_Bits_SetBitU32 (uint32_t *outVariable, uint8_t BitIndex)
 sets bit in the variable More...
 
static uint64_t oC_Bits_SetBitU64 (uint64_t *outVariable, uint8_t BitIndex)
 sets bit in the variable More...
 
static uint8_t oC_Bits_ClearBitU8 (uint8_t *outVariable, uint8_t BitIndex)
 clear selected bit More...
 
static uint16_t oC_Bits_ClearBitU16 (uint16_t *outVariable, uint8_t BitIndex)
 clear selected bit More...
 
static uint32_t oC_Bits_ClearBitU32 (uint32_t *outVariable, uint8_t BitIndex)
 clear selected bit More...
 
static uint64_t oC_Bits_ClearBitU64 (uint64_t *outVariable, uint8_t BitIndex)
 clear selected bit More...
 
static bool oC_Bits_AreBitsSetU8 (uint8_t BitMask, uint8_t BitsToCheck)
 checks if all bits in field are set More...
 
static bool oC_Bits_AreBitsSetU16 (uint16_t BitMask, uint16_t BitsToCheck)
 checks if all bits in field are set More...
 
static bool oC_Bits_AreBitsSetU32 (uint32_t BitMask, uint32_t BitsToCheck)
 checks if all bits in field are set More...
 
static bool oC_Bits_AreBitsSetU64 (uint64_t BitMask, uint64_t BitsToCheck)
 checks if all bits in field are set More...
 
static bool oC_Bits_AreBitsClearU8 (uint8_t BitMask, uint8_t BitsToCheck)
 checks if all bits in field are clear More...
 
static bool oC_Bits_AreBitsClearU16 (uint16_t BitMask, uint16_t BitsToCheck)
 checks if all bits in field are clear More...
 
static bool oC_Bits_AreBitsClearU32 (uint32_t BitMask, uint32_t BitsToCheck)
 checks if all bits in field are clear More...
 
static bool oC_Bits_AreBitsClearU64 (uint64_t BitMask, uint64_t BitsToCheck)
 checks if all bits in field are clear More...
 
static bool oC_Bits_IsAtLeastOneBitSetU8 (uint8_t BitMask, uint8_t BitsToCheck)
 checks if at least one of bits in field is set More...
 
static bool oC_Bits_IsAtLeastOneBitSetU16 (uint16_t BitMask, uint16_t BitsToCheck)
 checks if at least one of bits in field is set More...
 
static bool oC_Bits_IsAtLeastOneBitSetU32 (uint32_t BitMask, uint32_t BitsToCheck)
 checks if at least one of bits in field is set More...
 
static bool oC_Bits_IsAtLeastOneBitSetU64 (uint64_t BitMask, uint64_t BitsToCheck)
 checks if at least one of bits in field is set More...
 
static bool oC_Bits_IsAtLeastOneBitClearU8 (uint8_t BitMask, uint8_t BitsToCheck)
 checks if at least one of bits in field is set More...
 
static bool oC_Bits_IsAtLeastOneBitClearU16 (uint16_t BitMask, uint16_t BitsToCheck)
 checks if at least one of bits in field is set More...
 
static bool oC_Bits_IsAtLeastOneBitClearU32 (uint32_t BitMask, uint32_t BitsToCheck)
 checks if at least one of bits in field is set More...
 
static bool oC_Bits_IsAtLeastOneBitClearU64 (uint64_t BitMask, uint64_t BitsToCheck)
 checks if at least one of bits in field is set More...
 

Detailed Description

Macro Definition Documentation

#define oC_Bits_Mask_U16 (   FROM,
  TO 
)

This definition create uint16_t type mask.

Parameters
FROMNumber of bit when the mask will be started.
TONumber of bit when the mask will be finished.

Definition at line 60 of file oc_bits.h.

#define oC_Bits_Mask_U32 (   FROM,
  TO 
)

This definition create uint32_t type mask.

Parameters
FROMNumber of bit when the mask will be started.
TONumber of bit when the mask will be finished.

Definition at line 73 of file oc_bits.h.

#define oC_Bits_Mask_U64 (   FROM,
  TO 
)

This definition create uint64_t type mask.

Parameters
FROMNumber of bit when the mask will be started.
TONumber of bit when the mask will be finished.

Definition at line 86 of file oc_bits.h.

#define oC_Bits_Mask_U8 (   FROM,
  TO 
)

This definition create uint8_t type mask.

Parameters
FROMNumber of bit when the mask will be started.
TONumber of bit when the mask will be finished.

Definition at line 47 of file oc_bits.h.

#define oC_Bits_ValueWithMask (   VALUE,
  FROM,
  MASK 
)

The definition creates value at the given index with mask.

For example:

1 uint16_t value = oC_Bits_ValueWithMask( 0xAA , 8 , 0xFF ) | oC_Bits_ValueWithMask( 0xBB , 0 , 0xFF00 ) ;
2 
3 // now value = 0xAABB
Parameters
VALUEValue to set
FROMStart bit for value
MASKMask of value

Definition at line 106 of file oc_bits.h.

Function Documentation

static bool oC_Bits_AreBitsClearU16 ( uint16_t  BitMask,
uint16_t  BitsToCheck 
)
inlinestatic

The function is for checking if each bit in the mask is clear

Parameters
BitMaskBits mask, that should contain all bits from the BitsToCheck variable
BitsToCheckBits that should be clear
Returns
true if all bits are set

Definition at line 935 of file oc_bits.h.

static bool oC_Bits_AreBitsClearU32 ( uint32_t  BitMask,
uint32_t  BitsToCheck 
)
inlinestatic

The function is for checking if each bit in the mask is clear

Parameters
BitMaskBits mask, that should contain all bits from the BitsToCheck variable
BitsToCheckBits that should be clear
Returns
true if all bits are set

Definition at line 952 of file oc_bits.h.

static bool oC_Bits_AreBitsClearU64 ( uint64_t  BitMask,
uint64_t  BitsToCheck 
)
inlinestatic

The function is for checking if each bit in the mask is clear

Parameters
BitMaskBits mask, that should contain all bits from the BitsToCheck variable
BitsToCheckBits that should be clear
Returns
true if all bits are set

Definition at line 969 of file oc_bits.h.

static bool oC_Bits_AreBitsClearU8 ( uint8_t  BitMask,
uint8_t  BitsToCheck 
)
inlinestatic

The function is for checking if each bit in the mask is clear

Parameters
BitMaskBits mask, that should contain all bits from the BitsToCheck variable
BitsToCheckBits that should be clear
Returns
true if all bits are set

Definition at line 918 of file oc_bits.h.

static bool oC_Bits_AreBitsSetU16 ( uint16_t  BitMask,
uint16_t  BitsToCheck 
)
inlinestatic

The function is for checking if each bit in the mask is set

Parameters
BitMaskBits mask, that should contain all bits from the BitsToCheck variable
BitsToCheckBits that should be set
Returns
true if all bits are set

Definition at line 867 of file oc_bits.h.

static bool oC_Bits_AreBitsSetU32 ( uint32_t  BitMask,
uint32_t  BitsToCheck 
)
inlinestatic

The function is for checking if each bit in the mask is set

Parameters
BitMaskBits mask, that should contain all bits from the BitsToCheck variable
BitsToCheckBits that should be set
Returns
true if all bits are set

Definition at line 884 of file oc_bits.h.

static bool oC_Bits_AreBitsSetU64 ( uint64_t  BitMask,
uint64_t  BitsToCheck 
)
inlinestatic

The function is for checking if each bit in the mask is set

Parameters
BitMaskBits mask, that should contain all bits from the BitsToCheck variable
BitsToCheckBits that should be set
Returns
true if all bits are set

Definition at line 901 of file oc_bits.h.

static bool oC_Bits_AreBitsSetU8 ( uint8_t  BitMask,
uint8_t  BitsToCheck 
)
inlinestatic

The function is for checking if each bit in the mask is set

Parameters
BitMaskBits mask, that should contain all bits from the BitsToCheck variable
BitsToCheckBits that should be set
Returns
true if all bits are set

Definition at line 850 of file oc_bits.h.

static uint16_t oC_Bits_ClearBitsU16 ( uint16_t *  outVariable,
uint16_t  Mask 
)
inlinestatic

The function to clear uint16_t type mask on uint16_t type variable.

Parameters
*outVariableVariable in which bits will be clear.
MaskMask to be used.
Returns
Variable with clears bits.

Definition at line 205 of file oc_bits.h.

static uint32_t oC_Bits_ClearBitsU32 ( uint32_t *  outVariable,
uint32_t  Mask 
)
inlinestatic

The function to clear uint32_t type mask on uint32_t type variable.

Parameters
*outVariableVariable in which bits will be clear.
MaskMask to be used.
Returns
Variable with clears bits.

Definition at line 222 of file oc_bits.h.

static uint64_t oC_Bits_ClearBitsU64 ( uint64_t *  outVariable,
uint64_t  Mask 
)
inlinestatic

The function to clear uint64_t type mask on uint64_t type variable.

Parameters
*outVariableVariable in which bits will be clear.
MaskMask to be used.
Returns
Variable with clears bits.

Definition at line 239 of file oc_bits.h.

static uint8_t oC_Bits_ClearBitsU8 ( uint8_t *  outVariable,
uint8_t  Mask 
)
inlinestatic

The function to clear uint8_t type mask on uint8_t type variable.

Parameters
*outVariableVariable in which bits will be clear.
MaskMask to be used.
Returns
Variable with clears bits.

Definition at line 188 of file oc_bits.h.

static uint16_t oC_Bits_ClearBitU16 ( uint16_t *  outVariable,
uint8_t  BitIndex 
)
inlinestatic

The function is for clearing bit at BitIndex position

Parameters
outVariableVariable to clear bit
BitIndexIndex of the bit to clear
Returns
variable with bit cleared

Definition at line 796 of file oc_bits.h.

static uint32_t oC_Bits_ClearBitU32 ( uint32_t *  outVariable,
uint8_t  BitIndex 
)
inlinestatic

The function is for clearing bit at BitIndex position

Parameters
outVariableVariable to clear bit
BitIndexIndex of the bit to clear
Returns
variable with bit cleared

Definition at line 814 of file oc_bits.h.

static uint64_t oC_Bits_ClearBitU64 ( uint64_t *  outVariable,
uint8_t  BitIndex 
)
inlinestatic

The function is for clearing bit at BitIndex position

Parameters
outVariableVariable to clear bit
BitIndexIndex of the bit to clear
Returns
variable with bit cleared

Definition at line 832 of file oc_bits.h.

static uint8_t oC_Bits_ClearBitU8 ( uint8_t *  outVariable,
uint8_t  BitIndex 
)
inlinestatic

The function is for clearing bit at BitIndex position

Parameters
outVariableVariable to clear bit
BitIndexIndex of the bit to clear
Returns
variable with bit cleared

Definition at line 778 of file oc_bits.h.

static int8_t oC_Bits_GetBitNumberU16 ( uint16_t  BitMask)
inlinestatic

The function return number of first bit which is set in uint16_t type Mask.

Parameters
BitMaskMask to be check.
Returns
Number of first sets bit (-1 when there is no set bits).

Definition at line 556 of file oc_bits.h.

static int8_t oC_Bits_GetBitNumberU32 ( uint32_t  BitMask)
inlinestatic

The function return number of first bit which is set in uint32_t type Mask.

Parameters
BitMaskMask to be check.
Returns
Number of first sets bit (-1 when there is no set bits).

Definition at line 585 of file oc_bits.h.

static int8_t oC_Bits_GetBitNumberU64 ( uint64_t  BitMask)
inlinestatic

The function return number of first bit which is set in uint64_t type Mask.

Parameters
BitMaskMask to be check.
Returns
Number of first sets bit (-1 when there is no set bits).

Definition at line 614 of file oc_bits.h.

static int8_t oC_Bits_GetBitNumberU8 ( uint8_t  BitMask)
inlinestatic

The function return number of first bit which is set in uint8_t type Mask.

Parameters
BitMaskMask to be check.
Returns
Number of first sets bit (-1 when there is no set bits).

Definition at line 527 of file oc_bits.h.

static uint16_t oC_Bits_GetValueU16 ( uint16_t  Variable,
uint8_t  StartBitNr,
uint8_t  EndBitNr 
)
inlinestatic

The function to get value from uint16_t type variable.

Parameters
VariableVariable which stores some value.
StartBitNrNumber of first bit of stored value.
EndBitNrNumber of last bit of stored value.
Warning
StartBitNr can not be greater than EndBit!
StartBitNr can not be greater than 15!
EndBitNr can not be greater than 15!
Returns
Resulting value.

Definition at line 374 of file oc_bits.h.

static uint32_t oC_Bits_GetValueU32 ( uint32_t  Variable,
uint8_t  StartBitNr,
uint8_t  EndBitNr 
)
inlinestatic

The function to get value from uint32_t type variable.

Parameters
VariableVariable which stores some value.
StartBitNrNumber of first bit of stored value.
EndBitNrNumber of last bit of stored value.
Warning
StartBitNr can not be greater than EndBit!
StartBitNr can not be greater than 31!
EndBitNr can not be greater than 31!
Returns
Resulting value.

Definition at line 395 of file oc_bits.h.

static uint64_t oC_Bits_GetValueU64 ( uint64_t  Variable,
uint8_t  StartBitNr,
uint8_t  EndBitNr 
)
inlinestatic

The function to get value from uint64_t type variable.

Parameters
VariableVariable which stores some value.
StartBitNrNumber of first bit of stored value.
EndBitNrNumber of last bit of stored value.
Warning
StartBitNr can not be greater than EndBit!
StartBitNr can not be greater than 63!
EndBitNr can not be greater than 63!
Returns
Resulting value.

Definition at line 416 of file oc_bits.h.

static uint8_t oC_Bits_GetValueU8 ( uint8_t  Variable,
uint8_t  StartBitNr,
uint8_t  EndBitNr 
)
inlinestatic

The function to get value from uint8_t type variable.

Parameters
VariableVariable which stores some value.
StartBitNrNumber of first bit of stored value.
EndBitNrNumber of last bit of stored value.
Warning
StartBitNr can not be greater than EndBit!
StartBitNr can not be greater than 7!
EndBitNr can not be greater than 7!
Returns
Resulting value.

Definition at line 353 of file oc_bits.h.

static bool oC_Bits_IsAtLeastOneBitClearU16 ( uint16_t  BitMask,
uint16_t  BitsToCheck 
)
inlinestatic

The function is for checking if at least one bit in the mask is set

Parameters
BitMaskBits mask, that should contain all bits from the BitsToCheck variable
BitsToCheckBits that should be set
Returns
true if all bits are set

Definition at line 1071 of file oc_bits.h.

static bool oC_Bits_IsAtLeastOneBitClearU32 ( uint32_t  BitMask,
uint32_t  BitsToCheck 
)
inlinestatic

The function is for checking if at least one bit in the mask is set

Parameters
BitMaskBits mask, that should contain all bits from the BitsToCheck variable
BitsToCheckBits that should be set
Returns
true if all bits are set

Definition at line 1088 of file oc_bits.h.

static bool oC_Bits_IsAtLeastOneBitClearU64 ( uint64_t  BitMask,
uint64_t  BitsToCheck 
)
inlinestatic

The function is for checking if at least one bit in the mask is set

Parameters
BitMaskBits mask, that should contain all bits from the BitsToCheck variable
BitsToCheckBits that should be set
Returns
true if all bits are set

Definition at line 1105 of file oc_bits.h.

static bool oC_Bits_IsAtLeastOneBitClearU8 ( uint8_t  BitMask,
uint8_t  BitsToCheck 
)
inlinestatic

The function is for checking if at least one bit in the mask is set

Parameters
BitMaskBits mask, that should contain all bits from the BitsToCheck variable
BitsToCheckBits that should be set
Returns
true if all bits are set

Definition at line 1054 of file oc_bits.h.

static bool oC_Bits_IsAtLeastOneBitSetU16 ( uint16_t  BitMask,
uint16_t  BitsToCheck 
)
inlinestatic

The function is for checking if at least one bit in the mask is set

Parameters
BitMaskBits mask, that should contain all bits from the BitsToCheck variable
BitsToCheckBits that should be set
Returns
true if all bits are set

Definition at line 1003 of file oc_bits.h.

static bool oC_Bits_IsAtLeastOneBitSetU32 ( uint32_t  BitMask,
uint32_t  BitsToCheck 
)
inlinestatic

The function is for checking if at least one bit in the mask is set

Parameters
BitMaskBits mask, that should contain all bits from the BitsToCheck variable
BitsToCheckBits that should be set
Returns
true if all bits are set

Definition at line 1020 of file oc_bits.h.

static bool oC_Bits_IsAtLeastOneBitSetU64 ( uint64_t  BitMask,
uint64_t  BitsToCheck 
)
inlinestatic

The function is for checking if at least one bit in the mask is set

Parameters
BitMaskBits mask, that should contain all bits from the BitsToCheck variable
BitsToCheckBits that should be set
Returns
true if all bits are set

Definition at line 1037 of file oc_bits.h.

static bool oC_Bits_IsAtLeastOneBitSetU8 ( uint8_t  BitMask,
uint8_t  BitsToCheck 
)
inlinestatic

The function is for checking if at least one bit in the mask is set

Parameters
BitMaskBits mask, that should contain all bits from the BitsToCheck variable
BitsToCheckBits that should be set
Returns
true if all bits are set

Definition at line 986 of file oc_bits.h.

static bool oC_Bits_IsBitSetU16 ( uint16_t  BitMask,
uint8_t  BitIndex 
)
inlinestatic

The function is checking if the bit is set

Parameters
BitMaskVariable with mask of bits
BitIndexIndex of bit to check
Returns
true if bit is set

Definition at line 662 of file oc_bits.h.

static bool oC_Bits_IsBitSetU32 ( uint32_t  BitMask,
uint8_t  BitIndex 
)
inlinestatic

The function is checking if the bit is set

Parameters
BitMaskVariable with mask of bits
BitIndexIndex of bit to check
Returns
true if bit is set

Definition at line 679 of file oc_bits.h.

static bool oC_Bits_IsBitSetU64 ( uint64_t  BitMask,
uint8_t  BitIndex 
)
inlinestatic

The function is checking if the bit is set

Parameters
BitMaskVariable with mask of bits
BitIndexIndex of bit to check
Returns
true if bit is set

Definition at line 696 of file oc_bits.h.

static bool oC_Bits_IsBitSetU8 ( uint8_t  BitMask,
uint8_t  BitIndex 
)
inlinestatic

The function is checking if the bit is set

Parameters
BitMaskVariable with mask of bits
BitIndexIndex of bit to check
Returns
true if bit is set

Definition at line 645 of file oc_bits.h.

static uint32_t oC_Bits_JoinU16ToU32 ( uint16_t  LowPart,
uint16_t  HighPart 
)
inlinestatic

The function to join two uint16_t type variables.

Parameters
LowPartLower part.
HighPartHigher part.
Returns
Jointed variable.

Definition at line 496 of file oc_bits.h.

static uint64_t oC_Bits_JoinU32ToU64 ( uint32_t  LowPart,
uint32_t  HighPart 
)
inlinestatic

The function to join two uint32_t type variables.

Parameters
LowPartLower part.
HighPartHigher part.
Returns
Jointed variable.

Definition at line 512 of file oc_bits.h.

static uint16_t oC_Bits_JoinU8ToU16 ( uint8_t  LowPart,
uint8_t  HighPart 
)
inlinestatic

The function to join two uint8_t type variables.

Parameters
LowPartLower part.
HighPartHigher part.
Returns
Jointed variable.

Definition at line 480 of file oc_bits.h.

static uint16_t oC_Bits_SetBitsU16 ( uint16_t *  outVariable,
uint16_t  Mask 
)
inlinestatic

The function to set uint16_t type mask on uint16_t type variable.

Parameters
*outVariableVariable in which bits will be set.
MaskMask to be used.
Returns
Variable with sets bits.

Definition at line 137 of file oc_bits.h.

static uint32_t oC_Bits_SetBitsU32 ( uint32_t *  outVariable,
uint32_t  Mask 
)
inlinestatic

The function to set uint32_t type mask on uint32_t type variable.

Parameters
*outVariableVariable in which bits will be set.
MaskMask to be used.
Returns
Variable with sets bits.

Definition at line 154 of file oc_bits.h.

static uint64_t oC_Bits_SetBitsU64 ( uint64_t *  outVariable,
uint64_t  Mask 
)
inlinestatic

The function to set uint64_t type mask on uint64_t type variable.

Parameters
*outVariableVariable in which bits will be set.
MaskMask to be used.
Returns
Variable with sets bits.

Definition at line 171 of file oc_bits.h.

static uint8_t oC_Bits_SetBitsU8 ( uint8_t *  outVariable,
uint8_t  Mask 
)
inlinestatic

The function to set uint8_t type mask on uint8_t type variable.

Parameters
*outVariableVariable in which bits will be set.
MaskMask to be used.
Returns
Variable with sets bits.

Definition at line 120 of file oc_bits.h.

static uint16_t oC_Bits_SetBitU16 ( uint16_t *  outVariable,
uint8_t  BitIndex 
)
inlinestatic
Parameters
outVariablevariable to set
BitIndexindex of bit to set in the variable
Returns
value after changes

Definition at line 727 of file oc_bits.h.

static uint32_t oC_Bits_SetBitU32 ( uint32_t *  outVariable,
uint8_t  BitIndex 
)
inlinestatic
Parameters
outVariablevariable to set
BitIndexindex of bit to set in the variable
Returns
value after changes

Definition at line 743 of file oc_bits.h.

static uint64_t oC_Bits_SetBitU64 ( uint64_t *  outVariable,
uint8_t  BitIndex 
)
inlinestatic
Parameters
outVariablevariable to set
BitIndexindex of bit to set in the variable
Returns
value after changes

Definition at line 759 of file oc_bits.h.

static uint8_t oC_Bits_SetBitU8 ( uint8_t *  outVariable,
uint8_t  BitIndex 
)
inlinestatic
Parameters
outVariablevariable to set
BitIndexindex of bit to set in the variable
Returns
value after changes

Definition at line 711 of file oc_bits.h.

static uint16_t oC_Bits_SetValueU16 ( uint16_t *  outVariable,
uint16_t  Value,
uint8_t  StartBitNr,
uint8_t  EndBitNr 
)
inlinestatic

The function to set with shift uint16_t type value into uint16_t type variable.

Parameters
*outVariableVariable in which value will be set.
ValueValue to set.
StartBitNrNumber of bit when the value will be started.
EndBitNrNumber of bit when the value will be finished.
Warning
StartBitNr can not be greater than EndBit!
StartBitNr can not be greater than 15!
EndBitNr can not be greater than 15!
Returns
Variable in which value is set.

Definition at line 285 of file oc_bits.h.

static uint32_t oC_Bits_SetValueU32 ( uint32_t *  outVariable,
uint32_t  Value,
uint8_t  StartBitNr,
uint8_t  EndBitNr 
)
inlinestatic

The function to set with shift uint32_t type value into uint32_t type variable.

Parameters
*outVariableVariable in which value will be set.
ValueValue to set.
StartBitNrNumber of bit when the value will be started.
EndBitNrNumber of bit when the value will be finished.
Warning
StartBitNr can not be greater than EndBit!
StartBitNr can not be greater than 31!
EndBitNr can not be greater than 31!
Returns
Variable in which value is set.

Definition at line 308 of file oc_bits.h.

static uint64_t oC_Bits_SetValueU64 ( uint64_t *  outVariable,
uint64_t  Value,
uint8_t  StartBitNr,
uint8_t  EndBitNr 
)
inlinestatic

The function to set with shift uint64_t type value into uint64_t type variable.

Parameters
*outVariableVariable in which value will be set.
ValueValue to set.
StartBitNrNumber of bit when the value will be started.
EndBitNrNumber of bit when the value will be finished.
Warning
StartBitNr can not be greater than EndBit!
StartBitNr can not be greater than 63!
EndBitNr can not be greater than 63!
Returns
Variable in which value is set.

Definition at line 331 of file oc_bits.h.

static uint8_t oC_Bits_SetValueU8 ( uint8_t *  outVariable,
uint8_t  Value,
uint8_t  StartBitNr,
uint8_t  EndBitNr 
)
inlinestatic

The function to set with shift uint8_t type value into uint8_t type variable.

Parameters
*outVariableVariable in which value will be set.
ValueValue to set.
StartBitNrNumber of bit when the value will be started.
EndBitNrNumber of bit when the value will be finished.
Warning
StartBitNr can not be greater than EndBit!
StartBitNr can not be greater than 7!
EndBitNr can not be greater than 7!
Returns
Variable in which value is set.

Definition at line 262 of file oc_bits.h.

static void oC_Bits_SplitU16ToU8 ( uint16_t  Variable,
uint8_t *  outLow,
uint8_t *  outHigh 
)
inlinestatic

The function to split uint16_t type variable.

Parameters
VariableVariable which stores some value.
*outLowLower part.
*outHighHigher part.

Definition at line 463 of file oc_bits.h.

static void oC_Bits_SplitU32ToU16 ( uint32_t  Variable,
uint16_t *  outLow,
uint16_t *  outHigh 
)
inlinestatic

The function to split uint32_t type variable.

Parameters
VariableVariable which stores some value.
*outLowLower part.
*outHighHigher part.

Definition at line 447 of file oc_bits.h.

static void oC_Bits_SplitU64ToU32 ( uint64_t  Variable,
uint32_t *  outLow,
uint32_t *  outHigh 
)
inlinestatic

The function to split uint64_t type variable.

Parameters
VariableVariable which stores some value.
*outLowLower part.
*outHighHigher part.

Definition at line 431 of file oc_bits.h.