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

PIO: open-drain/multi-driver support #32

Draft
wants to merge 1 commit into
base: development
Choose a base branch
from

Conversation

tmplt
Copy link
Member

@tmplt tmplt commented Sep 17, 2022

Copied from an internal Gitlab instance. By @axel-grepit:

This patch implements the open drain ("multi-driver") mode with pull-up and pull-down for each pin.

I could not find any information indicating that the modes are not supported for any specific pins and have as such followed the same patterns of implementation as for the other pin modes.

Additionally, the InputPin and OutputPin traits are implemented for OpenDrain pins. This permits using crates like onewire to quickly implement software 1-wire support for Dallas-style sensors (ds18b20 for instance).

WIP: InputPin/OutputPin needs additional testing before merging. Feel free to split the MR and commit the relevant OD-parts if that is needed before the relevant tests may be carried out.

@tmplt tmplt changed the title Feat/opendrain PIO: open-drain/multi-driver support Sep 17, 2022
@michalfita
Copy link
Collaborator

@tmplt this PR is a draft that doesn't even pass CI. Any chance this could be finished?

@tmplt
Copy link
Member Author

tmplt commented Jul 30, 2023

I'll see about alloting some time for a fixup the coming weeks.

@tmplt tmplt marked this pull request as ready for review August 6, 2023 11:20
@tmplt
Copy link
Member Author

tmplt commented Aug 6, 2023

CI passes, but I don't have hardware access at the moment for a test, at the time.

This patch implements the open drain ("multi-driver") mode with
pull-up and pull-down for each pin.

I could not find any information indicating that the modes are not
supported for any specific pins and have as such followed the same
patterns of implementation as for the other pin modes.

Additionally, the InputPin and OutputPin traits are implemented for
OpenDrain pins. This permits using crates like onewire to quickly
implement software 1-wire support for Dallas-style sensors (ds18b20
for instance).
@tmplt
Copy link
Member Author

tmplt commented Aug 6, 2023

Commits cleaned up.

@tmplt
Copy link
Member Author

tmplt commented Sep 15, 2023

@martinmortsell, are you able to test this? If not, objections to merging as-is to evade eventual stagnation? CC @michalfita

@sundbom-grepit
Copy link
Contributor

IIRC: this didn't work as expected when we started trying it out, so you definitely want to test/fix this before merging.

@tmplt tmplt marked this pull request as draft September 15, 2023 19:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants