title: How can I define pointer to the struct?
body: <p>I would like to define to the struct</p>
  
  <pre><code>typedef struct
  {
      unsigned long GPFSEL[6];
      unsigned long Reserved_1;
      unsigned long GPSET[2];
      unsigned long Reserved_2;
  
  //Ignoring the reserved and test bytes
  } GPIO_REGS_;
  </code></pre>
  
  <p>One solution would be this</p>
  
  <pre><code>volatile  GPIO_REGS_ * const GPIO_REGS  = ((volatile GPIO_REGS_ *) 0x20200000UL);
  </code></pre>
  
  <p>In this case I can reach the register as follow:</p>
  
  <pre><code>GPIO_REGS-&gt;GPSET[0];
  </code></pre>
  
  <p>But how should I define the GPIO_REGS variable that I can use as follow</p>
  
  <pre><code>GPIO_REGS.GPSET[0];
  </code></pre>
  
  <p>Why the following won't work?</p>
  
  <pre><code>#define GPIO_REGS  (*(( GPIO_REGS_ *) 0x20200000UL));
  </code></pre>