Versions Compared

Key

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

...

Code Block
LanguageC++
CaptionTextCAPTION
languagecpp
          CPU_INT08U  upper_nibble;
          CPU_INT32U  mask_32;
           
          upper_nibble = DEF_BIT_FIELD(4u, 4u);
           
          mask_32 = <code >DEFDEF_BIT_FIELD_16(7u, 13u);   /* 16-bit shift macro overflows; sets mask_32 = 0x0000E000 */
          mask_32 = <code >DEFDEF_BIT_FIELD_16(7u, 23u);   /* 16-bit shift macro overflows; sets mask_32 = 0          */
          mask_32 = <code >DEFDEF_BIT_FIELD_32(7u, 23u);   /* 32-bit shift macro correctly  sets mask_32 = 0x3F800000 */