AnsweredAssumed Answered

LPCOpen : Why we use '~' in the Reseved bits masks for registers ?

Question asked by karthik venkatesh on May 24, 2017
Latest reply on May 24, 2017 by Erich Styger



Below is the snapshot from "syscon_8xx.h" file of lpcopen library. If you see, everywhere they have used '~'.


For example, take SYSAHBCLKDIV register in LPC812.

Here Bits <31:8> are reserved bits. We could have defined


But why did LPCOpen use      #define SYSCTL_SYSAHBCLKDIV_RESERVED    (~0xff)       instead ?