title: Using a member of typedef enum is this possible?
body: <p>So I have a typedef enum similar to:</p>
  
  <pre><code>typedef enum
  {
      CH1,
      CH2,
      CH3
  } AIN_Ch_t;
  </code></pre>
  
  <p>This is declared in a separate file.</p>
  
  <p>So in another file I want to use this enum.</p>
  
  <p>Here is what I think should be right:</p>
  
  <pre><code>//declare variable of type AIN_Ch_t
  AIN_Ch_t channel1;
  //use the variable as parameter in function compiler gives error
  func1(channel1.CH1);
  </code></pre>
  
  <p>But when I do this - no error:</p>
  
  <pre><code>func1(CH1); //no error. compiler likes.
  </code></pre>
  
  <p>Obviously I'm thinking about this all wrong. Can someone clarify? thanks!</p>