example and using latest visualgdb version and using VS2022 selecting the STM32H7A3Zx and the latest STM32 toolschain.
The project fails to compile with the following errors when trying both the i2c Master and Slave code:
Error ‘struct I2C_InitTypeDef’ has no member named ‘ClockSpeed’
Error ‘struct I2C_InitTypeDef’ has no member named ‘DutyCycle’
Error ‘I2C_DUTYCYCLE_2’ was not declared in this scope
This is to be expected, as our tutorial is for the STM32F407VG device. Copying device-specific code into a project targeting a different device will indeed most likely result in various errors.
That said, different STM32 families use fairly similar APIs, so porting the code between them should be fairly easy, as long as you understand the differences between them. Looking through ST documentation/samples could be a good starting point.