RTEMS  5.0.0
Macros
Core register bit field macros

Macros for use with bit field definitions (xxx_Pos, xxx_Msk). More...

Macros

#define _VAL2FLD(field, value)   ((value << field ## _Pos) & field ## _Msk)
 Mask and shift a bit field value for use in a register bit range. More...
 
#define _FLD2VAL(field, value)   ((value & field ## _Msk) >> field ## _Pos)
 Mask and shift a register value to extract a bit filed value. More...
 

Detailed Description

Macros for use with bit field definitions (xxx_Pos, xxx_Msk).

Macro Definition Documentation

◆ _FLD2VAL

#define _FLD2VAL (   field,
  value 
)    ((value & field ## _Msk) >> field ## _Pos)

Mask and shift a register value to extract a bit filed value.

Parameters
[in]fieldName of the register bit field.
[in]valueValue of register.
Returns
Masked and shifted bit field value.

◆ _VAL2FLD

#define _VAL2FLD (   field,
  value 
)    ((value << field ## _Pos) & field ## _Msk)

Mask and shift a bit field value for use in a register bit range.

Parameters
[in]fieldName of the register bit field.
[in]valueValue of the bit field.
Returns
Masked and shifted value.