Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

i2creg, onewirereg, spireg: augment Ref to include the pins #31

Open
maruel opened this issue Sep 20, 2023 · 0 comments
Open

i2creg, onewirereg, spireg: augment Ref to include the pins #31

maruel opened this issue Sep 20, 2023 · 0 comments

Comments

@maruel
Copy link
Member

maruel commented Sep 20, 2023

Ported from google/periph#257.

The goal is to be able to list the pin used by each I²C/1-wire/SPI port/bus without having to open the port/bus, as this is currently the case.

To achieve this, the corresponding Ref needs to be augmented with the corresponding pin names (RX/TX/CS/etc). This in itself isn't so bad and could be not considered a breaking change.

The breaking change is that this information needs to be passed to the Register() function, otherwise the register function would have to open the port/bus itself, which would slow down registration and would potentially cause unintended side effects. So if the Register() function needs to be changed, this is a breaking change.

Ref:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant