Versions Compared

Key

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

...

val and mask should be unsigned integers.

Example Usage

Code Block
LanguageC++
CaptionTextCAPTION
languagecpp
          CPU_INT16U  flags;
          CPU_INT16U  flags_alarm;
          CPU_INT32U  events;
           
          flags       = Get current flags;
          flags_alarm = DEF_BIT_00 | DEF_BIT_03;
          DEF_BIT_SET(flags, flags_alarm);
          DEF_BIT_SET_32(events, flags);