doxygen 常用语法

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/u013517122/article/details/82462279

1. 头文件

//CommonType.h
/**
 * @file        CommonType.h
 * @brief       define common type
 * @details     file details content
 * @author      LikeShadows
 * @date        2018.09.06
 * @version     V1.0
 * @copyright   LikeShadows
 */
 ```
 ## 2. 全局变量
 ```
 /**
 * 4-octet type
 */
 typedef unsigned int UINT;


 /**
 * struct coordinate system
 */ 
typedef struct {
    UINT x;     ///< x-coordinate
    UINT y;     ///< y-coordinate
}Coordinate;


/**
 * enum type
 */
enum COLOR {
    RED = 0,     ///< red color
    GREEN,       ///< green color
    YELLOW,      ///< yellow color
    BLUE,        ///< blue color
};


/**
 * Macro define 
 */
#define NULL    0
 ```

## 3. 函数声明

/**
*
* @param[in] fileNameLen file name len
* @param[in] fileName file name
* @param[out] fileData file content data
* @return 0: OK, !0: Fail
* @retval UINT
* @see main.c
* @remarks remark content
* @exception exception error
* @warning warning info
* @bug bug details
* @pre pre conditions, e.g input param type or vaule
* @post aft conditions, e.g system state changed
* @note fileName must be not Null
*/
UINT WriteFile(UINT fileNameLen, BYTE *fileName, BYTE *fileData);
“`

猜你喜欢

转载自blog.csdn.net/u013517122/article/details/82462279