RT-Thread RTOS
An open source embedded real-time operating system
Loading...
Searching...
No Matches
How to write doxygen documentation for typedef.

It is recommended to use separate typedef statements rather than a combination. That is:

Recommended:

struct S { ... };
typedef struct S S_t;

Not recommended:

typedef struct S { ... } S_t;

The reason is we found that the former is more readable, and when we write comment block with @typedef, the latter may cause unexpceted behaviour for doxygen (as of version 1.9.1).

See documentation/0.doxygen/example/include/typedef.h for example.