nrf-rs / nrf-hal

A Rust HAL for the nRF family of devices
Apache License 2.0
503 stars 139 forks source link

GPIO: Don't rely on embedded-hal-traits #349

Open David-OConnor opened 3 years ago

David-OConnor commented 3 years ago

Ie, remove unwrap() requirement when setting pins in both internal and external code. Note how other peripheral modules like SPIM and TWIM add the embedded-hal impls as add-ons, vice primary API.

I'll submit a PR if you agree.

jonas-schievink commented 3 years ago

Yeah, we can probably add inherent methods for controlling the pins. Note that there's also a pending redesign of the whole GPIO module in https://github.com/nrf-rs/nrf-hal/pull/301.