Trying to understand how to apply the Pico Wire (I2C) library

I'm looking at the wire library as found in the mbed_rp2040 libraries folder.

Was wondering how do I include this new wire class in my own library and how to define the I2C SDA / SCL pins etc.

Also how does one then define a 2nd I2C object if I want to use both I2C ports on my pico.

I'm a little confused by this code within the wire.cpp file:

arduino::MbedI2C::MbedI2C(int sda, int scl) : _sda(sda), _scl(scl), usedTxBuffer(0) {}

void arduino::MbedI2C::begin() {
	master = new mbed::I2C((PinName)_sda, (PinName)_scl);
}

This is complete confusing. The standard pins doesn't follow the official hardware docs and there are no pins defined for the second interfaces (I2C, SPI, UART).
See Raspberry Pico SPI and I2C pins · Issue #194 · arduino/ArduinoCore-mbed · GitHub

readme in test Arduino nano boald doesn't read!

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.