rust-embedded / embedded-hal

A Hardware Abstraction Layer (HAL) for embedded systems
Apache License 2.0
2.01k stars 202 forks source link

SpiDevice: add guidelines for behaviour of CS pin upon bus failures #399

Closed newAM closed 2 years ago

newAM commented 2 years ago

Currently the SpiDevice trait does not define the sequence of actions that occur after a bus error.

I discussed this with @Dirbaio in the matrix chat and the conclusion we reached was that this should be added to the documentation as a guideline to match what already exists for ExclusiveDevice. The rationale for a guideline instead of a requirement is that SPI error recovery is implementation specific.

rust-highfive commented 2 years ago

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @eldruin (or someone else) soon.

Please see the contribution instructions for more information.

Dirbaio commented 2 years ago

LGTM, could you do the same change to async's docs ?

newAM commented 2 years ago

LGTM, could you do the same change to async's docs ?

Good call. Made the change & rebased.

newAM commented 2 years ago

Should I add a changelog entry for this? I wasn't sure because it doesn't change anyone's impl.

Dirbaio commented 2 years ago

IMO it's small enough that no changelog is fine, but feel free to add it if you want.

bors[bot] commented 2 years ago

Build succeeded: