Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Reads a 'val' field, masked and shifted, given by mask 'field_mask'.

Files

lib_def.h

Prototype

Code Block
LanguageC++
CaptionTextCAPTION
languagecpp
          DEF_BIT_FIELD_RD(val, field_mask);

Arguments

val

Value to a field from.

field_mask

Mask of field to read.

Returned Value

Field value, masked and right-shifted to bit position 0.

Required Configuration

None.

Notes / Warnings

  1. 'field_mask' argument must NOT be 0.
  2. 'field_mask' argument must contain a mask with contiguous set bits.
  3. 'val' & 'field_mask' SHOULD be unsigned integers.