AnsweredAssumed Answered

What does FE_MOD do?

Question asked by Juan Abelaira on Jul 28, 2017
Latest reply on Aug 2, 2017 by Kerry Zhou

I copied some SPI functions from a project to another. I got a warning related to type mismatch that brought me to the below declaration in spi_15xx.h. Indeed, pTx and pRx are pointers to either 8 or 16-bit data. As the 'source' project had the FE_MOD symbol defined, I just defined it in the current one. I'm just wondering (as I couldn't find any documentation) what other things could this affect.

 

#ifndef FE_MOD
typedef struct {
uint16_t *pTx; /**< Pointer to data buffer*/
uint32_t TxCnt;/* Transmit Counter */
uint16_t *pRx; /**< Pointer to data buffer*/
uint32_t RxCnt;/* Transmit Counter */
uint32_t Length; /**< Data Length*/
uint32_t ssel; /**< Slave select bits */
uint16_t DataSize; /** < The size of a frame (1-16)*/
} SPI_DATA_SETUP_T;
#else // FE_MOD
typedef struct {
uint8_t *pTx; /**< Pointer to data buffer*/
uint32_t TxCnt;/* Transmit Counter */
uint8_t *pRx; /**< Pointer to data buffer*/
uint32_t RxCnt;/* Transmit Counter */
uint32_t Length; /**< Data Length*/
uint32_t ssel; /**< Slave select bits */
uint16_t DataSize; /** < The size of a frame (1-16)*/
} SPI_DATA_SETUP_T;
#endif // FE_MOD

Outcomes