title: C Using #define to point to or alias a function
body: <p>I'm a little confused on if I can use #define to point to a function.  I have a codec/DSP who's tool automatically generates pages of code like this:</p>
  
  <pre><code>SIGMA_WRITE_REGISTER(address, data, length);
  SIGMA_WRITE_REGISTER(address, data, length);
  SIGMA_WRITE_REGISTER(address, data, length);
  ....
  </code></pre>
  
  <p>Then in another .h file they do this:</p>
  
  <pre><code>    #define SIGMA_WRITE_REGISTER( address, data, length ) {
  /*TODO: implement macro or define as function*/}
  </code></pre>
  
  <p>Which helpfully doesn't define anything about writing registers.   That's fine though wrote some code for my micro to write registers over I2C and that seems to be working.  Now I don't want to just paste that code into the above define and have it instantiate it 1000 times.  I was hoping I could just use the is define as an alias to my function?</p>
  
  <p>Something like:</p>
  
  <pre><code>#define SIGMA_WRITE_REGISTER(address, data, length) { my_i2_c_func(address, data, length)}
  </code></pre>
  
  <p>I tried something like this and it compiled, I'm not so sure it's working though.  Is this a valid thing to do or am I barking up the wrong tree?</p>