程序代码 注释框架模板

main.c

/** @copyright  Copyright(c)2014-2011 XXXX Co.,Ltd. All rights reserved.
  ******************************************************************************
  * @mainpage   无人机固件程序
  * <table>
  * <tr><th>Project  <td>A600
  * <tr><th>Author   <td>匠在江湖(ID:1234)
  * <tr><th>Source   <td>F:\BaiduNetdiskWorkspace\Work\Item\DDItem\A600\Software
  * </table>
  * @section    项目描述
  * 该无人机是主要应用于......
  * 
  * @section    功能描述
  * -# 定高悬停
  * -# 路径规划飞行
  * 
  * @section    用法描述
  * -# 用遥控器
  * 
  * @section    固件更新记录
  * <table>
  * <tr><th>Date        <th>H_Version   <th>S_Version       <th>Author(ID:xxxxxx)   <th>Description  </tr>
  * <tr><td>2018/08/17  <td>1.0         <td>S02010041808171 <td>匠在江湖(ID:1234)   <td>创建初始版本 </tr>
  * <tr><td>2019/06/24  <td>1.1         <td>S02010041906241 <td>匠在江湖(ID:1234)   <td>
  * -# 无
  * </tr>
  * </table>
  ******************************************************************************
  */

/** @defgroup Main Main
  * @brief Main module driver
  * @{
  */
/* Includes *******************************************************************/
#include <stdio.h> //库头文件
#include "tst.h" //其他文件头文件
#include "main.h" //自己头文件
/* Private typedef ************************************************************/
/* Private constants **********************************************************/
/* Private macro **************************************************************/
/* Private variables **********************************************************/
/* Private function prototypes ************************************************/


/**
  ******************************************************************************
  * @brief   main 函数
  * @param   None
  * @retval  None
  ******************************************************************************
  */
void main(void)
{
	u16 x = tst(3, 2);
    printf("结果 = %d\r\n", x);
    while(1);
}
/** @} end of Main */

/********************************* END OF FILE ********************************/

main.h

/** @copyright  Copyright(c)2014-2011 XXXX Co.,Ltd. All rights reserved.
  ******************************************************************************
  * @file       main.h
  * @brief   
  * @details 
  * @author     匠在江湖(ID:1234)
  * @version    V1.0
  * @date       2014/05/08
  ******************************************************************************
  * @attention
  * 
  * @par 修改日志:
  * <table>
  * <tr><th>Date        <th>Version <th>Author(ID:xxxxxx)   <th>Description</tr>
  * <tr><td>2014/05/08  <td>V1.0    <td>匠在江湖(ID:1234)   <td>创建初始版本</tr>
  * </table>
  ******************************************************************************
  */


#ifndef MAIN_H_
#define MAIN_H_
/* Includes *******************************************************************/

#ifdef __cplusplus
 extern "C"{
#endif

/* Exported types *************************************************************/
/* Exported constants *********************************************************/
/* Exported macro *************************************************************/
/* Exported functions *********************************************************/

#ifdef __cplusplus
}
#endif

#endif /* MAIN_H_ */

/********************************* END OF FILE ********************************/

其他函数  tst.c

/** @copyright  Copyright(c)2014-2011 XXXX Co.,Ltd. All rights reserved.
  ******************************************************************************
  * @file       tst.c
  * @brief      
  * @details    
  * @author     匠在江湖(ID:1234)
  * @version    V1.0
  * @date       2014/05/08
  ******************************************************************************
  * @attention
  * - 类别1
  *     -# 情况1......
  *     -# 情况2......
  * - 类别2
  *     -# 情况1......
  *     -# 情况2......
  * @par 修改日志:
  * <table>
  * <tr><th>Date        <th>Version <th>Author(ID:xxxxxx)   <th>Description</tr>
  * <tr><td>2014/05/08  <td>V1.0    <td>匠在江湖(ID:1234)   <td>创建初始版本</tr>
  * </table>
  ******************************************************************************
  */


/** @defgroup Tst Tst
  * @brief    测试功能代码
  */
/* Includes *******************************************************************/
#include "tst.h"
/* Private typedef ************************************************************/
/* Private constants **********************************************************/
/* Private macro **************************************************************/
/* Private variables **********************************************************/
/* Private function prototypes ************************************************/


/**
  ******************************************************************************
  * @brief   tst 函数
  * @param   - a 输入值1
  *          - b 输入值2
  * @retval  计算的和
  ******************************************************************************
  */
u16 tst(u8 a, u8 b)
{
    u16 sum = a + b;
    return sum;
}

/********************************* END OF FILE ********************************/

其他函数  tst.h

/** @copyright  Copyright(c)2014-2011 XXXX Co.,Ltd. All rights reserved.
  ******************************************************************************
  * @file       tst.h
  * @brief      
  * @details    
  * @author     匠在江湖(ID:1234)
  * @version    V1.0
  * @date       2014/05/08
  ******************************************************************************
  * @attention
  * 
  * @par 修改日志:
  * <table>
  * <tr><th>Date        <th>Version <th>Author(ID:xxxxxx)   <th>Description</tr>
  * <tr><td>2014/05/08  <td>V1.0    <td>匠在江湖(ID:1234)   <td>创建初始版本</tr>
  * </table>
  ******************************************************************************
  */


#ifndef TST_H_
#define TST_H_
/* Includes *******************************************************************/

#ifdef __cplusplus
 extern "C"{
#endif

/* Exported types *************************************************************/
/* Exported constants *********************************************************/
/* Exported macro *************************************************************/
/* Exported functions *********************************************************/
/** @defgroup Tst_exported_functions Tst exported functions
  * @ingroup  Tst
  * @{
  */
extern u16 tst(u8 a, u8 b);
/** @} end of Tst_exported_functions */

#ifdef __cplusplus
}
#endif

#endif /* TST_H_ */

/********************************* END OF FILE ********************************/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值