Reputation: 23
I was looking through the firmware codebase for our ATSAME70 based board and came across something like this:
//@{
#define SPI1_MISO_GPIO (PIO_PC26_IDX)
#define SPI1_MISO_FLAGS (PIO_PERIPH_C | PIO_PULLUP)
/** SPI1 MOSI pin definition. */
#define SPI1_MOSI_GPIO (PIO_PC27_IDX)
#define SPI1_MOSI_FLAGS (PIO_PERIPH_C | PIO_PULLUP)
/** SPI1 SPCK pin definition. */
#define SPI1_SPCK_GPIO (PIO_PC24_IDX)
#define SPI1_SPCK_FLAGS (PIO_PERIPH_C | PIO_DEFAULT)
/** SPI1 chip select 0 pin definition. (Only one configuration is possible) */
#define SPI1_NPCS0_GPIO (PIO_PC25_IDX)
#define SPI1_NPCS0_FLAGS (PIO_PERIPH_C | PIO_PULLUP)
//@}
Notice the @{ and @} at the beginning and end respectively. I don't know if it was commented out later or it was like it all along. I am curious as to what it means. Is it just some commenting style or does it have any special meaning in C? I tried asking in my team but no one has any clue why is it there. I don't even know what keywords to search for it. Searching for @{ @} doesn't turn up any useful results. I would appreciate if someone could shed some light on it.
Upvotes: 2
Views: 1219
Reputation: 144740
The @{
and @}
delimiters have always been commented in this code fragment. They are not part of the C language, they are processed by doxygen to create software documentation.
Here is a page with more explanations: http://www.doxygen.nl/manual/grouping.html
Upvotes: 4