embedded-hal-mock icon indicating copy to clipboard operation
embedded-hal-mock copied to clipboard

Feature Request: IoPin mocks

Open rhempel opened this issue 2 years ago • 2 comments

I'm just getting started with Embedded Rust (40 years of embedded C though) and find the best way is to dig in to a relevant project and see what happens.

For something I'm working on, I need the IoPin functionality and I also want to do it "right" using TDD from the start. This is something I am passionate about for the last 5 years :-)

I'll try and build the mocks for the IoPin functionality and issue a pull request - but I have opened this feature request just in case you already have it ready to go and want some testers :-)

rhempel avatar Nov 01 '22 09:11 rhempel

just FYI: in embedded-hal 1.0 IoPin has been removed and it's unclear if it'll be added again. see the discussion in https://github.com/rust-embedded/embedded-hal/issues/340

but i guess that wouldn't prevent @dbrgn from accepting a PR adding the mock for 0.x; this is more for your information depending on what you plan on building.

rursprung avatar Jan 06 '23 18:01 rursprung

but i guess that wouldn't prevent @dbrgn from accepting a PR adding the mock for 0.x; this is more for your information depending on what you plan on building.

Correct 🙂

dbrgn avatar Jan 06 '23 22:01 dbrgn

I'll close this for now, since - as discussed above - the IoPin trait was removed from embedded-hal 1.

Regarding my statement in the comment above: Since embedded-hal 1 is now stable, I would only reluctantly accept a PR for embedded-hal 0.x, and only if it were very simple to review. I think it makes more sense to treat embedded-hal 0.x support as deprecated, and focus on 1.x instead.

dbrgn avatar May 30 '24 20:05 dbrgn