当前位置:网站首页>Play RT-THREAD of doxygen
Play RT-THREAD of doxygen
2022-08-10 21:28:00 【Thomas_Fly】
Play RT-THREAD of doxygen
Article Objectives
We often see the headaches of how to write function comments and how to generate beautiful code comment documents.As far as I know, there is one and only one commonly used code comment rule in C language, which is doxygen.So mastering doxygen is crucial for us to write beautiful comments.This article will teach you how to write doxygen and how to organize beautiful API documentation on RT-THREAD.
How to generate doxygen on RT-THREAD
Teach you how to operate first, I just sorted it out recently and found the doxygen on RT-THREAD
https://github.com/RT-Thread/rt-thread/tree/master/documentation/doxygen
Cannot generate documentation, some paths have changed.So let me fix it for you.
https://github.com/RT-Thread/rt-thread/pull/6217
Now you only need to download the latest code after 2022.8.4.
Download code and software
- First download the source code of rt-thread https://github.com/RT-Thread/rt-thread/, you can use the following command
git clone [email protected]:RT-Thread/rt-thread.git --depth=1
- Download doxygen software (readme.md in doxygen folder) https://doxygen.nl/index.html
Just download the step installation package doxygen-1.9.4-setup.exe
- Install doxygen, there is nothing to pay attention to when installing, just go to the next step.
Generate html document
We open the software we just installed Doxywizard
Open
in the menu File
to open the following file in RT-THREAD rt-thread/documentation/doxygen/Doxyfile
Then just run run
directly, all the operations are done.
If you want to read Chinese, you can also choose Chinese according to the following settings
Open html document
Find the generated html
folder and open the index.html
file
Show effect
Next, we can see the renderings, and we can see some comments written by everyone under the src directory
The above is basically how to use RT-THREAD's doxygen.Is it simple and convenient?
The following is a brief introduction to how to write doxygen yourself.
How Doxygen is written
vscode plugin installation
Let's talk about how to write doxygen first.The traditional method is to write directly with a text editor, which I will not introduce here.Here we use a tool to help us write commonly used doxygen.Open vscode and install the plugin doxygen
This plugin has two operations
- Enter ·
/**
at the head of the source code file, and then press the Enter key directly, you can see the automatically generated comments.
- Enter
/**
above the written function, and then press the Enter key, and you will see the effect.
doxygen file generation
Just open the Doxygen tool, select the source folder, and click run
doxygen configuration
Doxygen actually has a lot of configurations, here I will cite a few commonly used configurations.
The following configuration can generate a tree diagram on the left for easy viewing.Other configurations are not introduced one by one.
If you want to know more, please refer to the link
https://mp.weixin.qq.com/s/HA352TEBELNJ9pgCTMkWIg
Some suggestions when doxygen writes
Question 1: Are doxygen's function comments written in header files or source files?
This is due to different company roles.If your code is as lib..c is not open to customers. At this time, it is better to write it in .h.
If you are doing open source, the source files can be released. At this time, it is better to put them in .c.In short, just put it in one place, and other places do not need to be written according to doxygen.
If you have any other questions, you can leave a message in the comment area and I will answer them one by one
边栏推荐
猜你喜欢
面向未来的 IT 基础设施管理架构——融合云(Unified IaaS)
【nvm】【node多版本管理工具】使用说明和踩坑(exit status 1)
HighTec快捷键(Keys)设置位置
化学制品制造业数智化供应链管理系统:建立端到端供应链采购一体化平台
TortoiseSVN小乌龟的使用
ACM模板笔记:最长不下降/上升子序列
【PCBA方案设计】蓝牙跳绳方案
LeetCode-498-对角线遍历
饿了么-机构树单选
npm warn config global `--global`, `--local` are deprecated. use `--location=global` instead.
随机推荐
【实用软件】【VSCode】使用技巧大全(持续更新)
2021DozerCTF
HGAME 2022 Week2 writeup by pankas
将视图模型转换为使用 Hilt 依赖注入
函数:函数删除操作语法&使用例——《mysql 从入门到内卷再到入土》
ENVI感兴趣区ROI文件由XML格式转为ROI格式
华为路由器旁挂引流实验(使用流策略)
智能方案设计——智能跳绳方案
快消品行业经销商协同系统:实现经销商可视化管理,提高沟通执行效率
找的笔试题的复盘(一)
第四届红帽杯网络安全大赛
Kerberos认证
DDL:CREATE 创建数据库——《mysql 从入门到内卷再到入土》
图数据库(Neo4j)入门
JS中的filter、map、reduce
直播课堂系统09--腾讯云点播管理模块(一)
2021年中国工业互联网安全大赛(福建省选拔赛) 暨首届福建省工业互联网创新大赛
ENVI最小距离、最大似然、支持向量机遥感影像分类
【PCBA solution】Electronic grip strength tester solution she'ji
LeetCode-36-二叉搜索树与双向链表