RT-Thread RTOS
An open source embedded real-time operating system
How to write doxygen documentation for structure.

We recommend the following approach:

A comment block before the structure definition is recommended to describe the general information of the structure type. In the comment block, a @brief is required, other commands (such as @note) are optional.

If you feel that the description of @brief is not enough, you can add a detailed description part, which is also optional.

Put member comments inside the structure definition and after every member. See struct dogygen_example_struct for example.

If the structure member is too long (this often happens when the structure member is a callback function), when the comment is written after the member, it will make the code line too long. In this case, we can also put the comment before the member. See struct dogygen_example_struct_another for example.

Going a step further, for this kind of structure whose members are callback functions, we can describe the members in style for functions, it is more complicated and contains more content. It is useful when we want to describe the parameters and return values ​​of the callback function in more detail. See struct dogygen_example_struct_another2 for example.

See documentation/0.doxygen/example/include/struct.h for code example.

See Doxygen Example of Structure for html output.