Versions Compared

Key

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

...

lib_def.h

Prototype

Code Block
LanguageC++
CaptionTextCAPTION
languagecpp
          DEF_BIT_IS_SET_ANY(val, mask);


Arguments

val

Value to test if any of the specified bits are set.

...

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

CAPTION
Code Block
LanguageC++
CaptionText
languagecpp
          CPU_INT16U  flags;
          CPU_INT16U  flags_mask;
          CPU_INT16U  flags_set;
         


          flags      = 0x0369u;
          flags_mask = DEF_BIT_08 | DEF_BIT_09;
          flags_set  = DEF_BIT_IS_SET_ANY(flags, flags_mask);