title: #define a tuple in C
body: <p>I want to be able to define a tuple which represents the arguments needed by other macros.</p>
  
  <p>I think the best way to show what I want is to show an example:</p>
  
  <pre><code>#include &lt;avr/io.h&gt;
  
  #define LED_PORT PORTB
  #define LED_DDR  DDRB
  #define LED_PIN  PB7
  #define LED      LED_PORT, LED_DDR, LED_PIN
  
  #define OUTPUT(port, ddr, pin) ddr |= 1 &lt;&lt; pin
  
  void main(void) {
      OUTPUT(LED);
  }
  </code></pre>
  
  <p>I want <code>OUTPUT(LED)</code> to be then expanded into:</p>
  
  <pre><code>LED_DDR |= 1 &lt;&lt; LED_PIN
  </code></pre>
  
  <p>The problem that I get is to do with the order of expansion, and results in the following error:</p>
  
  <blockquote>
    <p>macro "OUTPUT" requires 3 arguments, but only 1 given</p>
  </blockquote>
  
  <p>This is for use with an AVR project with custom built hardware where I have defined <code>LED</code> and other components with a respective <code>LED_PORT</code> <code>LED_DDR</code> and <code>LED_PIN</code>.</p>
  
  <p>I then want to define more macros that can take this LED and use the appropriate arguments to map to the most succinct way possible.</p>
  
  <p>Is this possible with the standard C-preprocessor?</p>