Versions Compared

Key

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

Determines if all the specified bits in a value are clear according to a specified bit mask.

Files

lib_def.h

Prototype

Code Block
languagecpp
          DEF_BIT_IS_CLR(val, mask);


Arguments

val

Value to test if the specified bits are clear.

...

val and mask should be unsigned integers. NULL mask (i.e., mask of value 0) allowed; returns DEF_NO since no mask bits specified.

Example Usage

Code Block
languagecpp
          CPU_INT16U  alarms;
          CPU_INT16U  alarms_mask;
          CPU_INT16U  alarms_clr;


          alarms      = 0x07F0u;
          alarms_mask = DEF_BIT_04 | DEF_BIT_03;
          alarms_clr  = DEF_BIT_IS_CLR(alarms, alarms_mask);