Can someone explain me the difference between the following defines:
#define ADDR_VAL(x) (*((volatile unsigned long *)(x)))
and
#define ADDR_VAL(x) (*((volatile unsigned long *)x))
In my case mostly the usage will be like:
#define INTR_SRC(x) ADDR_VAL(INTR_BASE_VAL(x) + 0x180)
INTR_SRC(0) = 0x24ul;
Assuming that INTR_BASE_VAL(x)
is a value calculated to 0x1A002D00
, do both of the above menioned ADDR_VAL(x)
defines provide the same results for the INTR_SRC
define?