How do PEEK and POKE work?
background:

In computing,
PEEK is a BASIC programming language extension used for reading the
contents of a memory cell at a specified address.
The corresponding command to set the contents of a memory cell is POKE.

peek will read the content of the address defined by:
#define NETX_IO_CFG_ACCESS_KEY     0x00100070U

and store it in &quot;ulKey&quot; which is supposed to be a variable declared as unsigned int  (as defined in the pointer )
the next line:
POKE(NETX_IO_CFG_ACCESS_KEY, ulKey);

is to set the content of the address NETX_IO_CFG_ACCESS_KEY with the value of  &quot;ulKey&quot;again, I guess this code is just for example purposes
most probably you should have a look at pointers
http://www.cplusplus.com/doc/tutorial/pointers/
the pointers part:
pointers: a variable which stores the address of another variable is called a pointer
(volatile unsigned int&quot; * this one&quot;)(addr) the asterisk in this line is to tell the compiler that this is a pointer,
then the asterisk in the begginging is for derefrencing (&quot;* this one &quot;(volatile unsigned int *)(addr) = (val)) which is to derefrence the &quot;value pointed to by &quot;addr&quot;
we should tell the compiler that, this address is storing or will store which type of data and here comes unsigned int
volatile is to

Volatile tells the compiler not to optimize anything that has to do with
&quot;addr&quot;

you can have a better understanding from here :
https://stackoverflow.com/questions/246127/why-is-volatile-needed-in-c