Skip to content

Support for multiple devices on same bus? #5

@sjm42

Description

@sjm42

I designed an IO expander card with four PCA9555 chips with optional 8-bit ULN2308 buffers. While exploring the options to share i2c bus with several instances of either pca9535 or port-expander drivers, it struck me.

When I have something like 2 to 8 identical chips with consecutive i2c bus addresses also sharing a common _INT line, why on earth should I use something so elaborate like shared-bus, Mutex and all that?

My idea is to make my own copy of this library and add support for using a whole array of identical IO expander chips with consecutive i2c addresses. I guess it could be done backward compatible so that the array thing is created with a different constructor, new_array() perhaps, and with something like num_chips and i2c_addr_offset as parameters.

How does that sound like? I am making it for my own need anyway, but would it be beneficial to push it up to the mainstream version also?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions