Pi4J / pi4j-v1

DEPRECATED Java I/O library for Raspberry Pi (GPIO, I2C, SPI, UART)
http://www.pi4j.com
Apache License 2.0
1.31k stars 447 forks source link

Shouldn't I2CDeviceImpl be using the I2CBus not the I2CBusImpl? #428

Closed salamanders closed 3 years ago

salamanders commented 6 years ago

I think there is a mismatch, wouldn't it use the interface not a specific Impl? Also, when trying to instantiate, I2CProviderImpl().getBus returns a I2CBus, which can't be passed to the constructor.

... or am I constructing a I2C device completely wrong?

savageautomate commented 3 years ago

Closed. (I realize this is an old ticket, just cleaning house.)

You should not have to instantiate the **Impl classes directly. Use the factory methods to create I2C bus instances.

I2CBus bus = I2CFactory.getInstance(I2CBus.BUS_0);