esp-rs / esp32-hal

A hardware abstraction layer for the esp32 written in Rust.
Apache License 2.0
192 stars 28 forks source link

Fix `StatefulOutputPin` implementation, simplify `ToggleableOutputPin` implementation #76

Closed jessebraham closed 2 years ago

jessebraham commented 2 years ago

Fixes #75.

Also replaced the implementation of the ToggleableOutputPin trait with toggleable::Default, as they're identical.

MabezDev commented 2 years ago

LGTM! I tested with the blinky example, switching out the explicit set_{low|high} for toggle and it works beautifully :).

Thanks!