Dear Sparx admin,
I realized that with the CTF templates I have now, the #define statements are generated at the end after other inner classes like enumerations or struct in C.
See the following code:
/****************************************************
* SPIDefinitions.h
* Created on: 13-Nov-2019 5:23:12 PM
* Implementation of the Class SPIDefinitions
* Original author: ferran.casanovas
****************************************************/
#ifndef SPIDEFINITIONS_H_
#define SPIDEFINITIONS_H_
#ifdef __cplusplus
extern "C" {
#endif
#include "TypeDefinitions.h"
/**
* @brief SPI DATASIZE Enum of SPI available sData Size
*/
typedef enum SPI_DATASIZE_t
{
SPI_DATASIZE_1 /*< Data size equals to 1 bit*/,
SPI_DATASIZE_2 /*< Data size equals to 2 bits*/,
SPI_DATASIZE_3 /*< Data size equals to 3 bits*/,
SPI_DATASIZE_4 /*< Data size equals to 4 bits*/,
SPI_DATASIZE_5 /*< Data size equals to 5 bits*/,
SPI_DATASIZE_6 /*< Data size equals to 6 bits*/,
SPI_DATASIZE_7 /*< Data size equals to 7 bits*/,
SPI_DATASIZE_8 /*< Data size equals to 8 bits*/,
SPI_DATASIZE_9 /*< Data size equals to 9 bits*/,
SPI_DATASIZE_10 /*< Data size equals to 10 bits*/,
SPI_DATASIZE_11 /*< Data size equals to 11 bits*/,
SPI_DATASIZE_12 /*< Data size equals to 12 bits*/,
SPI_DATASIZE_13 /*< Data size equals to 13 bits*/,
SPI_DATASIZE_14 /*< Data size equals to 14 bits*/,
SPI_DATASIZE_15 /*< Data size equals to 15 bits*/,
SPI_DATASIZE_16 /*< Data size equals to 16 bits*/
} SPI_DATASIZE_t;
typedef enum SPI_MODE_t
{
SPI_MODE_0 /*clock polarity = 0 clock phase = 0*/,
SPI_MODE_1 /*clock polarity = 0 clock phase = 1*/,
SPI_MODE_2 /*clock polarity = 1 clock phase = 0*/,
SPI_MODE_3 /*clock polarity = 1 clock phase = 1*/
} SPI_MODE_t;
#define SPI1SLAVESNUM 4
#define SPICHANNELSNUM 5
#ifdef __cplusplus
}
#endif
#endif /* SPIDEFINITIONS_H_ */
I guess that this is controlled by a LIST MACRO. Is it possible to alter the generated order, so I can have the #define statements generated at the beginning of the .h file?
Kind regards,
Ferran.