Files
rt-thread/documentation/0.doxygen/example/include/groups.h
Chen Wang 761bb89f27
Some checks failed
ToolsCI / Tools (push) Waiting to run
AutoTestCI / components/cpp11 (push) Waiting to run
AutoTestCI / kernel/atomic (push) Waiting to run
AutoTestCI / kernel/atomic/riscv64 (push) Waiting to run
AutoTestCI / kernel/atomic_c11 (push) Waiting to run
AutoTestCI / kernel/atomic_c11/riscv64 (push) Waiting to run
AutoTestCI / kernel/device (push) Waiting to run
AutoTestCI / kernel/ipc (push) Waiting to run
AutoTestCI / kernel/irq (push) Waiting to run
AutoTestCI / kernel/mem (push) Waiting to run
AutoTestCI / kernel/mem/riscv64 (push) Waiting to run
AutoTestCI / kernel/thread (push) Waiting to run
AutoTestCI / kernel/timer (push) Waiting to run
AutoTestCI / rtsmart/aarch64 (push) Waiting to run
AutoTestCI / rtsmart/arm (push) Waiting to run
AutoTestCI / rtsmart/riscv64 (push) Waiting to run
AutoTestCI / components/utest (push) Waiting to run
RT-Thread BSP Static Build Check / ESP32C3 (push) Waiting to run
RT-Thread BSP Static Build Check / Infineon_TI_microchip (push) Waiting to run
RT-Thread BSP Static Build Check / RT-Thread Online Packages (STM32F407 RT-Spark) (push) Waiting to run
RT-Thread BSP Static Build Check / RTduino/Arduino Libraries (Raspberry Pico) (push) Waiting to run
RT-Thread BSP Static Build Check / RTduino/Arduino Libraries (STM32F412 Nucleo) (push) Waiting to run
RT-Thread BSP Static Build Check / aarch64 (push) Waiting to run
RT-Thread BSP Static Build Check / gd32_n32_apm32 (push) Waiting to run
RT-Thread BSP Static Build Check / hpmicro (push) Waiting to run
RT-Thread BSP Static Build Check / i386-unknown (push) Waiting to run
RT-Thread BSP Static Build Check / llvm-arm (push) Waiting to run
RT-Thread BSP Static Build Check / mips (push) Waiting to run
RT-Thread BSP Static Build Check / nordic(yml) (push) Waiting to run
RT-Thread BSP Static Build Check / nuvoton (push) Waiting to run
RT-Thread BSP Static Build Check / nxp_renesas (push) Waiting to run
RT-Thread BSP Static Build Check / others_at32_hc32_ht32 (push) Waiting to run
RT-Thread BSP Static Build Check / riscv-none (push) Waiting to run
RT-Thread BSP Static Build Check / riscv64-unknown (push) Waiting to run
RT-Thread BSP Static Build Check / simulator (push) Waiting to run
RT-Thread BSP Static Build Check / stm32_f2_f4 (push) Waiting to run
RT-Thread BSP Static Build Check / stm32_f7_g0_h7_mp15_u5_h5_wb5 (push) Waiting to run
RT-Thread BSP Static Build Check / stm32l4_f0_f1 (push) Waiting to run
BSP compilation with more drivers / BSP Compilation with More Drivers (push) Waiting to run
pkgs_test / change (push) Has been skipped
doc_doxygen / doxygen_doc generate (push) Has been cancelled
doc_doxygen / deploy (push) Has been cancelled
doxygen: add documentation for doxygen
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>
2025-02-11 17:09:44 +08:00

75 lines
2.4 KiB
C

#ifndef _DOXYGEN_EXAMPLE_GROUPS_H_
#define _DOXYGEN_EXAMPLE_GROUPS_H_
/**
* @page page_howto_groups How to use groups in doxygen documentation.
*
* Doxygen has three mechanisms to group things together. For RT-Thread
* API documentation, we use 'topics' to create new page for each group.
* On HTML browser, the topics pages are shown under the "Modules" in the
* treeview on the left.
*
* To define a group, we use `@defgroup` command. The group name should be
* prefixed with a "group_", and the group name should be unique. We can
* define a group anywhere, not necessarily in the same file as the members
* of the group. Generally, we define a group in a header file.
*
* To make an entity (structure, function etc. or another group) a member of
* a speicific group, we can use `@ingroup` command and put the `@ingroup`
* command inside its documentation block.
*
* To avoid putting `@ingroup` commands in the documentation for each member
* you can use `@addtogroup` and group members together by the open marker
* `@{` before the group and the closing marker `@}` after the group.
*
* See
* <a href="https://github.com/RT-Thread/rt-thread/blob/master/documentation/0.doxygen/example/include/groups.h">documentation/0.doxygen/example/include/groups.h</a>
* for example.
*
* More information can be found in the Doxygen manual:
* <a href="https://www.doxygen.nl/manual/grouping.html">Grouping</a>.
*/
/**
* @defgroup group_doxygen_example_sub Sub Group of Doxygen Example
*
* All members of this group will be displayed in one HTML page.
*
* @ingroup group_doxygen_example
*
* @brief Define a sub group of Doxygen Example.
*/
/**
* @brief Brief description of this enumeration
*
* We use `@ingroup` to add this enum to the group_doxygen_example_sub separately.
*
* @ingroup group_doxygen_example_sub
*/
enum doxygen_example_enum_2
{
V1, /**< description for value 1 */
V2, /**< description for value 2 */
};
// This entity is not a member of any group.
#define DOXYGEN_EXAMPLE_CONST_E 300 /**< Description of macro const D */
/**
* @addtogroup group_doxygen_example_sub
*/
/** @{ */
/*
* DOXYGEN_EXAMPLE_CONST_C & DOXYGEN_EXAMPLE_CONST_D are close together, so
* we can use `@addtogroup`, `@{` and `@}` to group them together.
*/
#define DOXYGEN_EXAMPLE_CONST_C 100 /**< Description of macro const C */
#define DOXYGEN_EXAMPLE_CONST_D 200 /**< Description of macro const D */
/** @} */
#endif /* _DOXYGEN_EXAMPLE_GROUPS_H_ */