Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

Writes 'field_val' field at position given by mask 'field_mask' in variable 'var'.

Files

lib_def.h

Prototype

          DEF_BIT_FIELD_ENC(field_val, field_mask);

Arguments

var

Variable to write field to.

field_val

Desired value for field.

field_mask

Mask of field to write to.

Returned Value

Field value, masked and left-shifted to field position.

Required Configuration

None.

Notes / Warnings

  1. 'field_mask' argument must contain a mask with contiguous set bits.
  2. 'var', 'field_val' & 'field_mask' SHOULD be unsigned integers.
  • No labels