EDIT 17/01/2024: Adding that v2.15.0 still fails compilation. Bug was reported shortly after the v2.14.0 release.
Hi,
I am compiling all device driver files into a static library, but one file is failing compilation "fsl_flexio_i2c_master.c"
The following functions are broken if "I2C_RETRY_TIMES" is defined. We define this to prevent getting stuck in an infinite loop.
static bool FLEXIO_I2C_MasterTransferStateMachineSendCommand(FLEXIO_I2C_Type *base,
flexio_i2c_master_handle_t *handle,
uint32_t statusFlags)
static bool FLEXIO_I2C_MasterTransferStateMachineSendData(FLEXIO_I2C_Type *base,
flexio_i2c_master_handle_t *handle,
uint32_t statusFlags)
static bool FLEXIO_I2C_MasterTransferStateMachineReceiveDataBegin(FLEXIO_I2C_Type *base,
flexio_i2c_master_handle_t *handle,
uint32_t statusFlags)
static status_t FLEXIO_I2C_MasterTransferStateMachineReceiveData(FLEXIO_I2C_Type *base,
flexio_i2c_master_handle_t *handle,
uint32_t statusFlags)
To fix, within each block, please initialise the `waitTimes` variable as follows:
#if I2C_RETRY_TIMES
uint32_t waitTimes = I2C_RETRY_TIMES;
...