libDaisy
libDaisy copied to clipboard
I2C: AF number hard coded for AF4 (only I2C1)
This should be an easy fix, but it should be noted that I2C1 and I2C4 are both interchangeable. Each pair of pins can use either peripheral.
Both pairs use the AF4 alternate function for I2C1, while they both use AF6 for I2C4.
if you change line 443 of i2c.cpp from : GPIO_InitStruct.Alternate = GPIO_AF4_I2C4; to GPIO_InitStruct.Alternate = GPIO_AF6_I2C4; then both i2c work on advertised pin