ryankurte / embedded-hal-compat

Rust embedded-hal inter-version compatibility layer
MIT License
15 stars 11 forks source link

wip: Update to embedded-hal v1.0 #32

Closed Dirbaio closed 7 months ago

Dirbaio commented 11 months ago

I'm not sure how to handle Reverse for InputPin: the 0.2 traits only give us &self, but the 1.0 traits require &mut self.

Maybe we can not implement InputPin on Reverse<T>, and and add a second set of mpls on Reverse<RefCell<T>> which does impl InputPin??

MabezDev commented 9 months ago

Maybe we can not implement InputPin on Reverse, and and add a second set of mpls on Reverse<RefCell> which does impl InputPin??

Hmm, this seems like the only way. At least I can't think of another. The trait has changed in a fundamentally breaking way, so we can only resort to interior mutability now.

dimpolo commented 8 months ago

Would be nice to get this :)

blaine commented 7 months ago

Seconding! 😊 I'm trying to use a 0.2.x driver that's not likely to get 1.0 compat soon, and I would extremely love to not have to add that support right now. :D

Dirbaio commented 7 months ago

closing in favor of #34