title: Documenting constants with Doxygen in C
body: <p>I have various groups of constants in a C .h file that I'd like to document with Doxygen.</p>
  <p>Example: axis, direction, possible values.</p>
  <pre><code>#define TYPE_LAT 0x01
  #define TYPE_LONG 0x02
  
  #define NORTH 0x01
  #define SOUTH 0x02
  #define EAST 0x01
  #define WEST 0x02
  
  #define TROPIC_OF_CANCER 23.5
  #define EQUATOR 0
  #define PRIME_MERIDIAN 0
  #define SYD_LAT_DIR SOUTH
  #define SYD_LNG_DIR EAST
  #define SYD_LAT_VAL 151.21
  #define SYD_LNG_VAL 33.9
  </code></pre>
  <p>These would be arguments for parameters in a function like:</p>
  <pre><code>void SetOneDimension(int axis, int direction, float value);
  </code></pre>
  <p>and for Sydney I'd do:</p>
  <pre><code>SetOneDimension(TYPE_LAT, SYD_LAT_DIR, SYD_LAT_VAL);
  SetOneDimension(TYPE_LNG, SYD_LNG_DIR, SYD_LNG_VAL);
  </code></pre>
  <p>Ideally in the documentation I'd like to categorise the constants where I show them as sub-sections to their appropriate &quot;parents,&quot; like this:</p>
  <pre><code>Dimension types:
  
  #define TYPE_LAT 0x01
      Directions:
      #define NORTH 0x01
      #define SOUTH 0x02
      #define SYD_LAT_DIR SOUTH
          Key Values:
          #define EQUATOR 0
          #define TROPIC_OF_CANCER 23.5
          #define SYD_LAT_VAL 151.21
  
  
  #define TYPE_LAT 0x02
      Directions:
      #define EAST 0x01
      #define WEST 0x02
      #define SYD_LNG_DIR EAST   
          Key Values:
          #define PRIME_MERIDIAN 0
          #define SYD_LNG_VAL 33.9
  </code></pre>
  <p>with a relevant comment for each. This allows a quick sighting for valid sets / combinations of parameters. The example above is simple - I would actually have functions with multiple commands, sub-commands and possible values.</p>
  <p>Doxygen member groups would be great but I don't think they allow sub-groups like I am after. There is the possibility of using module groups but I htink these go beyond what I'm after here.</p>
  <p>Do you have any suggestions on how to document these with Doxygen?</p>