You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In #4 I showed that it's a very simple code change to support the PCF8574 and other 8-bit expanders in the same module.
Therefore, it doesn't seem necessary to maintain two separate repos when the functionality is effectively identical. Fixes and improvements need to be submitted to both, for example #3 also applies to the Adafruit_CircuitPython_PCF8574 repo.
I can see from comparing the two that there are a lot of (mostly minor) differences between them, including inconsistent copyright/license, and at least one bug:
Unifying these into adafruit_pcf857x module with backwards-compatible stubs for adafruit_pcf8574 and adafruit_pcf8575 would reduce the maintenance burden and likely result in a minor decrease in size for the CircuitPython library bundle. For example:
# in adafruit_pcf8574.pyclassPCF8574(PCF857x):
def__init__(
self, i2c_bus: busio.I2C, address: int=PCF8574_I2CADDR_DEFAULT
) ->None:
super().__init__(i2c_bus, address, gpios=8)
# in adafruit_pcf8575.pyclassPCF8575(PCF857x):
def__init__(
self, i2c_bus: busio.I2C, address: int=PCF8575_I2CADDR_DEFAULT
) ->None:
super().__init__(i2c_bus, address, gpios=16)
# in adafruit_pcf857x.pyclassPCF857x:
# As in #4. Maybe remove default values for constructor args.pass
pcf857x is/was the name used in the Linux kernel to cover a lot of devices, listed in this document.
The text was updated successfully, but these errors were encountered:
Generally we have separate libraries for separate chips to make it clear what works with what chip. It is interesting that Linux has about a dozen chips under one driver though.
Right, those "frontend" packages could still exist for clarity, but use a common backend module since the wire protocol is the same, and then you spare yourself the code duplication and maintenance overhead.
In #4 I showed that it's a very simple code change to support the PCF8574 and other 8-bit expanders in the same module.
Therefore, it doesn't seem necessary to maintain two separate repos when the functionality is effectively identical. Fixes and improvements need to be submitted to both, for example #3 also applies to the Adafruit_CircuitPython_PCF8574 repo.
I can see from comparing the two that there are a lot of (mostly minor) differences between them, including inconsistent copyright/license, and at least one bug:
Unifying these into
adafruit_pcf857x
module with backwards-compatible stubs foradafruit_pcf8574
andadafruit_pcf8575
would reduce the maintenance burden and likely result in a minor decrease in size for the CircuitPython library bundle. For example:pcf857x
is/was the name used in the Linux kernel to cover a lot of devices, listed in this document.The text was updated successfully, but these errors were encountered: