Does STM32CubeMX/HAL have the ability to configure the I2C_CR1's ACK bit on the STM32L151xx?
I am currently attempting to port a product's older firmware that used the Standard Peripheral Driver libraries over to using the HAL libraries for greater portability between different MCUs. I a currently using the STM32L151QEHx.
In the older firmware the I2C is initialized using the following initialization structure:
/* Configure I2C settings within custom init function */
I2cConfig.I2C_ClockSpeed = I2cClockSpeed; //passed into init function
I2cConfig.I2C_Mode = I2C_Mode_I2C;
I2cConfig.I2C_DutyCycle = I2C_DutyCycle_2;
I2cConfig.I2C_OwnAddress1 = 0;
I2cConfig.I2C_Ack = I2C_Ack_Enable;
I2cConfig.I2C_AcknowledgedAddress = I2C_AcknowledgedAddress_7bit;Of interest is the code on line 6 where the I2C_Ack value is set. The ability to set this option does not appear to be available in STM32CubeMX or in the HAL libraries, but something similar does appear in the LL drivers included with the HAL libraries.
Am I missing a HAL defined way to set the I2C_CR1 ACK bit, or is this simply not available via HAL APIs?
Thank you for your time,
Brian C.
