embedded-hal
embedded-hal copied to clipboard
[WIP] Initial proposal for CancellableOneShot
trafficstars
Add a trait that extends OneShot and allows cancellation, along with an incomplete example.
This is a first shot at #123; not ready for review as in "ensure we can merge this", but pushed into a PR to have actual discussion material in #123.
... but does not compile:
122 | pub trait CancellableOneShot<ADC, Word, Pin: Channel<ADC>>: OneShot<ADC, Word, Pin, Channel<ADC>> {
| ^^^^^^^^^^^^ unexpected type argument
Oups, tested without the unproven feature.
Fixed, and cargo +nightly test --features unproven now runs through the test as well after having ironed out the details.