title: typedef enum: Different values for one member
body: <p>I'm wondering if I can assign different values to the same member of an typedef enum like this...:</p>
  
  <pre><code>typedef enum {
  
      START   = 0x01,
      DATA    = 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09,
      CRC     = 0x0A, 0x0B
  
  }bytes_t;
  </code></pre>
  
  <p>...so I can later use it like this:</p>
  
  <pre><code>bytesReceived++;                        // incremented for every received byte
  
  switch (bytesReceived) {
  
      case START:
          dPkg-&gt;startByte = dpkgRxBuffer[bytesReceived];              
          break;
  
      case DATA:
          dPkg-&gt;data = dpkgRxBuffer[bytesReceived];
          break;
  
      case CRC:
          dPkg-&gt;crc = dpkgRxBuffer[bytesReceived];
          break;
  
  }
  </code></pre>
  
  <p>So the program carries out the <code>DATA</code> case eight times if called in a loop. Does this work? It's only a first idea, so I can't give you further context unfortunately.</p>