/** * @brief Use brief, otherwise the index won't have a brief explanation. * Detailed explanation. */typedefstructBoxStruct{inta;/**< Some documentation for the member BoxStruct#a. */intb;/**< Some documentation for the member BoxStruct#b. */doublec;/**< Etc. */}tBoxStruct;
/* GLOBAL FUNCTIONS *//** * @brief Example showing how to document a function with Doxygen. * * Description of what the function does. This part may refer to the parameters * of the function, like @p param1 or @p param2. A word of code can also be * inserted like @c this which is equivalent to <tt>this</tt> and can be useful * to say that the function returns a @c void or an @c int. If you want to have * more than one word in typewriter font, then just use @<tt@>. * @param [in] param1 Description of the first parameter of the function. * @param [out] param2 The second one, which follows @p param1, and represents output. //变量 * * @return Describe what the function returns. * @retval XXX_OK if successful. * @see doxygen_theSecondFunction * @see Box_The_Last_One * @see <http://website/> * @note Something to note. * @warning Warning. */intdoxygen_theFirstFunction(intparam1,intparam2);这里应该用到@addtogroup和@{...@},表示这个组的定义从这里开始,直到`@}`结束。```c/** @addtogroup DOXYGEN_API * @brief Doxygen api example. * * Detailed api description. * * @{ *//** * @brief A sample function in the API group. * * This function demonstrates a typical API function. * * @param a Input parameter. * @return Result of some computation. */intsample_function(inta){returna*2;}/** @} */