Doxygen使用

Doxygen使用

  1. 配置文件生成以及build

    • doxygen -g dconfig
    • doxygen dconfig
  2. 代码注释

    • 每个文件前面

    • //***************************************************************************************
      //
      //! \file main.c 
      //! This is an simple example show developer how to use dev api to print int number.
      //!
      //! \author    Cedar
      //! \version   V1.0
      //! \date      2014-03-23
      //! \copyright GNU Public License V3.0
      //
      //***************************************************************************************
      
      
    • 对单独一行注释//!< The maxium number of print可放在代码左边或者放在代码上面

    • //! Simple device status.
      //! 
      //! \warning This variable is designed for internal, user \b MUST \b NOT call it.
      
    • // Print debug information

    • 函数注释,在.h文件

    • //***************************************************************************************
      //
      //! \brief  Print Int number to terimal device.
      //!
      //! \param  [in] number is the data you want to print.
      //! \retval the number of print information, in bytes. return zero indicate print error !.
      //!
      //! \note
      //! * Be sure you have called \ref Dev_Init function before call this fuction.
      //! * Remember to check return value.
      //
      //***************************************************************************************
      
  3. 区分普通注释和特殊注释

    • Doxygen通过在这里增加*/!来作为特殊标记

    • /*
       * 正常注释
       */
      
    • /*!
       * 要输出成文档的注释
       */
      
    • //  正常注释
      
    • //! 要输出成文档的注释
      
    • 前面都是对后面代码的注释

    • 如果是对前面代码注释,要再增加一个<

    • //!< Simple device is power on.
      
  4. 区分特殊标记符和普通文本

    • Doxygen采用\@作为特殊标记符
    • \brief
    • 检测紧跟单词是不是Doxygen事先规定好的,如果是,则将按照特定的规则来解释紧跟着的注释;如果不是呢,则将\@解释为普通文本
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值