title: How to assign a variable to an absolute address in c?
body: <p>I am trying to access the PMC_PCER0 and enable it for PID14 on an ARM Cortex M3. I am asked to make a void function that reads a button and "returns" (as my professor insists to call it) its value. Anyway, here is the problem:</p>
  
  <pre><code>void readButton( unsigned int *button)
  {
     do something yo;
  }
  </code></pre>
  
  <p>I have an address for <code>PMC_PCER0</code> and let's suppose for the sake of the question it is at <code>0xfff123da</code> and this <code>PMC_PER0</code> has 32 PIOs, one of which is PID and happens to start at the 14th place, so I need to activate this one.</p>
  
  <p>In order to activate it, do I need to mask <code>PMC_PCER0</code> using the `or operator?</p>
  
  <p>I know I can define <code>PMC_PCER0</code> as follows</p>
  
  <pre><code>#define PMC_PCER0 (0xfff123da)
  </code></pre>
  
  <p>However, this will just  give <code>PMC_PCER0</code> the value of <code>0xfff123da</code>, but what I want to do is <code>PMC_PCER0</code> to actually have that address. And later I want to mask it. I'd appreciate it if you explained it in details.</p>