Hi there!  I have a question regarding the doxygen preprocessor.  In some of my 
code (.c) modules I have a #define setup to tell the .h file for that module 
how to behave.  For example in the following file (driver.c) I define the 
constant CDR:


#define CDR
#include "driver.h"


/**
 @brief Initialize all CAN1 Driver variables.
 @return none
*/
void initialize(void)
{
 //! @todo Run some code here...
 printf("%d", test_file_scope_variable);
}


Then in the header file (driver.h), I perform certain actions based on whether 
CDR has been defined.  For example, the static variable 
test_file_scope_variable below is only declared if CDR is defined.


#ifdef CDR /* LOCAL definition */


/**
 @var test_file_scope_variable
  File Scope variable to Test doxigen
*/
static u16 test_file_scope_variable;


#endif /* CDR */


All the above code works great at the compiler level but when I go to run 
doxygen the documentation generated never shows test_file_scope_variable since 
doxygen can't seem to see that CDR has been defined in the C module.  Does 
anyone know how to solve this?  I know that I can solve this by defining CDR 
using the PREDEFINED setting in the doxygen settings.  However this will define 
CDR for the whole project and I only want it defined only for this module and 
header combination.



Thanks!  Any help would be greatly appreciated!



-Joe
------------------------------------------------------------------------------
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments & Everything In Between.
Get a Quote or Start a Free Trial Today. 
http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
_______________________________________________
Doxygen-users mailing list
Doxygen-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/doxygen-users

Reply via email to