The problem with this solution is that then at the struct class element that each attribute is concluded with a ";" character. I end up getting a ";," see example:
/**
* @brief SPI Configuration Structure used to configure the SPI interface
*/
typedef struct SPIConfig
{
SPI_CLK_t clock;, /*< SPI Clock rate*/
SPI_DATASIZE_t datasize;, /*< size of the data to be received and transmitted on SPI*/
SPI_MODE_t mode;, /*< SPI mode*/
} SPIConfig;
/**
* @brief SPI CLK Enum of the Available SPI CLK
*/
typedef enum SPI_CLK_t
{
SPI_CLK_1_0MHz = 0, /*< 1.0 MHz Clock*/,
SPI_CLK_1_2MHz, /*< 1.2 MHz Clock*/,
SPI_CLK_2_0MHz, /*< 2.0 MHz Clock*/,
SPI_CLK_5_3MHz, /*< 5.3 MHz Clock*/,
SPI_CLK_8_0MHz, /*< 8.0 MHz Clock*/,
SPI_CLK_12_0MHz, /*<12.0 MHz Clock*/,
SPI_CLK_19_2MHz, /*<19.2 MHz Clock*/,
SPI_CLK_24_0MHz, /*<24.0 MHz Clock*/,
SPI_CLK_LAST, /*Test comment*/
} SPI_CLK_t;
Also creating an stereotype for the last element everytime, does not seem to me a good option for the SW developer engineers to spend time with.
I see that in the struct element type, the list macro is correctly creating the ";" before the comments:
/**
* @brief SPI Configuration Structure used to configure the SPI interface
*/
typedef struct SPIConfig
{
SPI_CLK_t clock; /*< SPI Clock rate*/
SPI_DATASIZE_t datasize; /*< size of the data to be received and transmitted on SPI*/
SPI_MODE_t mode; /*< SPI mode*/
} SPIConfig;
but not for the enumeration that wait for the comment before setting the ",":
/**
* @brief SPI CLK Enum of the Available SPI CLK
*/
typedef enum SPI_CLK_t
{
SPI_CLK_1_0MHz = 0 /*< 1.0 MHz Clock*/,
SPI_CLK_1_2MHz /*< 1.2 MHz Clock*/,
SPI_CLK_2_0MHz /*< 2.0 MHz Clock*/,
SPI_CLK_5_3MHz /*< 5.3 MHz Clock*/,
SPI_CLK_8_0MHz /*< 8.0 MHz Clock*/,
SPI_CLK_12_0MHz /*<12.0 MHz Clock*/,
SPI_CLK_19_2MHz /*<19.2 MHz Clock*/,
SPI_CLK_24_0MHz /*<24.0 MHz Clock*/,
SPI_CLK_LAST /*Test comment*/
} SPI_CLK_t;
Why is that? Can't it be tweaked somehow to behave like in the struct case?
We have some coding standards in the company that have to be complied with and without these small tweaks... It is difficult to defend EA to the board meeting to buy new licenses.
Can I find some other solution for this maybe? Or trigger some update of the code template editor list MACRO?
Thank you very much and sorry for the inconveniences.
Kind regards,
Ferran.