RTEMS 6.1-rc1
Macros
Macros for use with bit field definitions (xxx_SHIFT, xxx_MASK).

Macros

#define NXP_VAL2FLD(field, value)   (((value) << (field ## _SHIFT)) & (field ## _MASK))
 Mask and left-shift a bit field value for use in a register bit range. More...
 
#define NXP_FLD2VAL(field, value)   (((value) & (field ## _MASK)) >> (field ## _SHIFT))
 Mask and right-shift a register value to extract a bit field value. More...
 
#define NXP_VAL2FLD(field, value)   (((value) << (field ## _SHIFT)) & (field ## _MASK))
 Mask and left-shift a bit field value for use in a register bit range. More...
 
#define NXP_FLD2VAL(field, value)   (((value) & (field ## _MASK)) >> (field ## _SHIFT))
 Mask and right-shift a register value to extract a bit field value. More...
 
#define NXP_VAL2FLD(field, value)   (((value) << (field ## _SHIFT)) & (field ## _MASK))
 Mask and left-shift a bit field value for use in a register bit range. More...
 
#define NXP_FLD2VAL(field, value)   (((value) & (field ## _MASK)) >> (field ## _SHIFT))
 Mask and right-shift a register value to extract a bit field value. More...
 

Detailed Description

Macro Definition Documentation

◆ NXP_FLD2VAL [1/3]

#define NXP_FLD2VAL (   field,
  value 
)    (((value) & (field ## _MASK)) >> (field ## _SHIFT))

Mask and right-shift a register value to extract a bit field value.

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

◆ NXP_FLD2VAL [2/3]

#define NXP_FLD2VAL (   field,
  value 
)    (((value) & (field ## _MASK)) >> (field ## _SHIFT))

Mask and right-shift a register value to extract a bit field value.

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

◆ NXP_FLD2VAL [3/3]

#define NXP_FLD2VAL (   field,
  value 
)    (((value) & (field ## _MASK)) >> (field ## _SHIFT))

Mask and right-shift a register value to extract a bit field value.

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

◆ NXP_VAL2FLD [1/3]

#define NXP_VAL2FLD (   field,
  value 
)    (((value) << (field ## _SHIFT)) & (field ## _MASK))

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

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

◆ NXP_VAL2FLD [2/3]

#define NXP_VAL2FLD (   field,
  value 
)    (((value) << (field ## _SHIFT)) & (field ## _MASK))

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

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

◆ NXP_VAL2FLD [3/3]

#define NXP_VAL2FLD (   field,
  value 
)    (((value) << (field ## _SHIFT)) & (field ## _MASK))

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

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