* doxygen: remove @return command if function return void
When doxygen is upgraded to v1.9.8 (on ubuntu 24.04), doxygen
reports: "doxygen error: found documented return type for xxx
that does not return anything" for those functions which return
void but declare "@return" in doxygen comment.
Solution: remove "@return" for those cases, and update
guide document for how to write doxgen comment for functions.
Signed-off-by: Chen Wang <unicorn_wang@outlook.com>
* doxygen: fixed a minor typo for uart doc
This error is found when building with doxygen 1.9.8, but not
detecetd on 1.9.1.
Signed-off-by: Chen Wang <unicorn_wang@outlook.com>
Similar to PR #10674, `src/scheduler_mp.c` and
`src/scheduler_up.c` also have similar issues.
After investigation, we found: in commit 2c98ce4605
"[HUST CSE][document] Fix some comments, invalid
grouping commands and warnings in Doxygen." This patch
excluded `src/scheduler_mp.c` and `src/scheduler_up.c`
from the Doxygen build and include
`documentation/doxygen/thread.h` (the new file path
after adjustment is `documentation/0.doxygen/core/thread.h`),
placing the Doxygen comments for some functions in this file.
However, this approach has its problems:
- The comments in `documentation/0.doxygen/core/thread.h`
are separated from the source code, making them
difficult to maintain. This also results in the
comments for the newly added functions in
`src/scheduler_mp.c` and `src/scheduler_up.c` not
being updated in a timely manner and failing to
be compiled into Doxygen (becoming HTML).
- For the average programmer, it's unlikely that
they'll consider the `documentation/0.doxygen/`
directory for function declarations and comments,
let alone the need to maintain the Doxygen comments
in that directory. Currently, the header files under
`documentation/0.doxygen/` should strictly be used
only to define Doxygen groups and should not include
Doxygen comments for the code itself. (Similar
issues exist in documentation/0.doxygen/3.hardware.h
and documentation/0.doxygen/core/systeminit.h, which
require further cleanup.)
The solution is similar to PR #10674, where only MP
documentation is generated by default. For functions
defined in MP but not in UP, we use the "@note"
directive in the function's doxygen comment to indicate
whether the function is supported in both UP and MP,
or only in MP.
After implementing this solution, the file
`documentation/0.doxygen/core/thread.h` can be deleted.
Signed-off-by: Chen Wang <unicorn_wang@outlook.com>
For "RT-Thread User Guide":
Take the "RT-Thread Kernel Object Model" sub-section out of
the "Kernel Basics" section and rename it to "Object Management".
Correspondingly, rename the "Kernel Object Management" section
in the "RT-Thread API Guide" to "Object Management".
Signed-off-by: Chen Wang <unicorn_wang@outlook.com>
This patch only updated the groups defined in documentation/0.doxygen.
Other groups will be moved into documentation/0.doxygen and updated at
that time.
Signed-off-by: Chen Wang <unicorn_wang@outlook.com>
The originally defined "group_Device" should actually
be part of the device-driver component, so create
a new "group_device_driver" and then rename
"group_Device" to "group_device_driver".
Signed-off-by: Chen Wang <unicorn_wang@outlook.com>
Match the organization of modules (groups) with
that of user guide.
Preliminary arrangement. This patch is just a
framework arrangement. Details need to be continued.
P.S., in this patch, adding numerical prefixes to
the files in documentation/0.doxygen is to meet the
need of displaying sorting in HTML pages.
Signed-off-by: Chen Wang <unicorn_wang@outlook.com>
This patch contains two small changes, mainly to
prepare for the next step of organizing the modules
framework.
The first change: move the files related to doxygen
examples to `documentation/0.doxygen/example/`
The second change: delete `documentation/0.doxygen/mainpage.h`,
which is the mainpage of the old page. Now the new mainpage
is `documentation/INDEX.md`, so the duplicate can be
deleted.
Signed-off-by: Chen Wang <unicorn_wang@outlook.com>
- Add description on how to group macros.
- Add description for structs on how to write comments
for members when the name of member is too.
- Use @ref to link group instead of the html filenames.
Signed-off-by: Chen Wang <unicorn_wang@outlook.com>
Doxygen examples are grouped on different pages so that you can
easily link to pages of related types in the documentation.
For example, macro examples have their own page, and function
examples have their own page, which correspond to their own code
examples, such as "macro.h" or "function.h".
Signed-off-by: Chen Wang <unicorn_wang@outlook.com>
* doxygen: add prefix for groups
Add "group_" prefix to doxygen group names. This makes
it easier to grep with group name later.
This patch only modifies the groups defined in the pathes
of INPUT of documentation/Doxyfile:
INPUT = . \
../src \
../include \
../components/finsh \
../components/drivers/include/drivers \
../components/drivers/clk \
../components/dfs/dfs_v2/src \
../components/dfs/dfs_v2/include
Other groups are not touched.
Signed-off-by: Chen Wang <unicorn_wang@outlook.com>
* ci: fixed error report when run file_check.py
Such as:
- "please delete extra space at the end of this line."
- "the RT-Thread error code should return negative value. e.g. return
-RT_ERROR"
Signed-off-by: Chen Wang <unicorn_wang@outlook.com>
---------
Signed-off-by: Chen Wang <unicorn_wang@outlook.com>
Documentation is provided to clarify how to write
doxygen documentation for RT-Thread. This document
is also integrated as part of RT-Thread doxygen
documentation.
An example is also provided.
The original README.md is removed and integrated into
this document.
Updated github actions for doxygen too.
Signed-off-by: Chen Wang <unicorn_wang@outlook.com>
* doxygen: adjust documentation directory structure
- Rename documentation/doxygen to documentation/0.doxygen and cleanup
some unused files.
- Add/rename folders for each sub sections, such as
1.introduction/...... Each sub section will be created as a subpage.
- Generate initial Doxyfile, this Doxyfile will be used to unify
doxygen generated API documents and those markdown files under
documentation folder. This patch just add the default Doxyfile
generated by running "doxygen -g". It is used as baseline to add
more features/configurations.
- Rename documentation/README.md to documentation/INDEX.md, and
use it as mainpage.
- Move 0.doxygen/readme.md to documentation/README.md.
* doxygen: update configurations
These configurations are from old documentation/doxygen/Doxyfile.
Try best to compatible exixting design.
* doxygen: add run script
Add a script to automatic some operations.
Updated the README.md.
---------
Signed-off-by: Chen Wang <unicorn_wang@outlook.com>
Co-authored-by: Supper Thomas <78900636@qq.com>