Wire library - SetClock and I2C lockups

Hello,

I'm working with NodeMcu and 2 devices communicating by I2C: I/O expander MCP23017 and OLED display SSD1306.
If I use Wire.SetClock() to modify the clock frequency for I2C communication it will modify the frequency for both devices?

I was reading that the Wire library had some problems that if some error occured it could block the code and cause I2C lockups. Anyone knows if this problem was corrected? Because I'm having problems with I2C lockups and I don't know if it's a hardware or a firmware problem.

Thanks

I was reading that the Wire library had some problems that if some error occured it could block the code and cause I2C lockups.

That was for the AVR version of the library and it happened only if you had a hardware problem.
If you experience I2C lockups chances are high that you have a hardware problem. Post a complete wiring diagram.

If I use Wire.SetClock() to modify the clock frequency for I2C communication it will modify the frequency for both devices?

Post links to the libraries you use. If the libraries don't use Wire.SetClock() themselves it should modify the clock for both devices.

As for the I2C lockups I found a hardware problem and I think that I solved it.

About the libraries, for the display I'm using the esp8266-oled-ssd1306 library:

I saw that this library uses:
// Let's use ~700khz if ESP8266 is in 160Mhz mode
// this will be limited to ~400khz if the ESP8266 in 80Mhz mode.
Wire.setClock(700000);

So I understand that the rate of the display is 400kHz.

And for MCP23017 I'm using Adafruit-MCP23017-Arduino-Library:

And it didn't use setClock so I understand that in this case the i2c rate is 100kHz which is the default rate of Wire.h.

In this case, if I use Wire.SetClock() after the inicialization of the libraries what will happen?

And it didn't use setClock so I understand that in this case the i2c rate is 100kHz which is the default rate of Wire.h.

No, in this case it uses the same value as the other library as both use the same instance of the Wire library.

Ok, I understood.
Thanks @pylon