atsamx7x-rust icon indicating copy to clipboard operation
atsamx7x-rust copied to clipboard

PIO: open-drain/multi-driver support

Open tmplt opened this issue 1 year ago • 6 comments

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 avatar Sep 17 '22 11:09 tmplt