Is it possible to use the value of a constant variable or a macro in the doxygen documentation?
I have the following lines in the source file
#define RD_IDN 0x01
#define RD_TEMP 0x02
// etc
and I'd like to use these values somewhere else in the documentation like this:
/* If the received command code is 0x01, the device will return it's unique ID. */
I think it is not possible to do it. The features of the doxygen's built-in C-preprocessor are described in the documentation, and there is nothing about replacement of macros in the comments.
As alternative, you may try something like
//! Your RD_IDN description
#define RD_IDN 0x01
#define RD_TEMP 0x02
and then
/*! If the received command code is #RD_IDN, the device will return it's unique ID. */
Doxygen will add a link to the macro, with Your RD_IDN description shown ad hint when you hover the mouse. To see the value, you still have to click on it. Note that you must keep ENABLE_PREPROCESSING set to the default value YES on you Doxyfile.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With