当前位置:网站首页>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
边栏推荐
- DDL:ALTER 修改数据库——《mysql 从入门到内卷再到入土》
- Future-oriented IT infrastructure management architecture - Unified IaaS
- Mark!画出漂亮的神经网络图!神经网络可视化工具集锦搜集
- 第五届“强网杯”全国网络安全挑战赛(线上赛)
- The evolution history of Go programmers
- 论文解读(g-U-Nets)《Graph U-Nets》
- 地理探测器Geodetector软件的下载、应用与结果解读
- 【Windows】你不能访问此共享文件夹,因为你组织的安全策略阻止未经身份验证的来宾访问,这些策略可帮助保护你的电脑
- TortoiseSVN小乌龟的使用
- [Golang]用反射让你的代码变优美
猜你喜欢
TortoiseSVN小乌龟的使用
化学制品制造业数智化供应链管理系统:建立端到端供应链采购一体化平台
Live Classroom System 08-Tencent Cloud Object Storage and Course Classification Management
leetcode:45. 跳跃游戏II
Live Classroom System 08 Supplement - Tencent Cloud Object Storage and Course Classification Management
ansible各个模块的详解和使用
LeetCode-402-移掉K位数字
带你一文读懂SaaS版多租户商城系统对多品牌企业的应用价值
LeetCode-36-二叉搜索树与双向链表
用示波器揭示以太网传输机制
随机推荐
管理员必须知道的RADIUS认证服务器的部署成本
RADIUS Authentication Server Deployment Costs That Administrators Must Know
【PCBA scheme design】Bluetooth skipping scheme
Introduction to PostgreSQL
ENVI自动生成地面控制点实现栅格影像的自动地理配准
第四届红帽杯网络安全大赛
Live Classroom System 08-Tencent Cloud Object Storage and Course Classification Management
[Golang]用反射让你的代码变优美
Live Classroom System 08 Supplement - Tencent Cloud Object Storage and Course Classification Management
单选点击可取消功能
UPDATE:修改数据语法使用例——《mysql 从入门到内卷再到入土》
如何提交一个PR?【OpenHarmony成长计划】【OpenHarmony开源社区】
SELECT:简单的查询操作语法&使用例——《mysql 从入门到内卷再到入土》
HighTec快捷键(Keys)设置位置
Kubernetes 笔记 / 入门 / 生产环境 / 用部署工具安装 Kubernetes / 用 kubeadm 启动集群 / 用 kubeadm 创建集群
使用SylixOS虚拟串口,实现系统串口自由
ArcGIS自动随机生成采样点的方法
社区分享|货拉拉通过JumpServer纳管大规模云上资产
Application of Spatial 3D Model Reconstruction Based on Pix4Dmapper - Spatial Analysis and Site Selection
wget编译升级故障解决