Closed
Description
I'm migrating one of my crates to use the new v2 traits in this PR. Before, I had a few trait bounds on OutputPin
. Is it enough to just change these to OutputPin<Error = ()>
?
Before, I had:
use hal::digital::v2::OutputPin;
impl<SPI, DC, CS> SpiInterface<SPI, DC, CS>
where
SPI: hal::blocking::spi::Write<u8>,
DC: OutputPin,
CS: OutputPin,
{
// ...
}
Which now becomes:
use hal::digital::v2::OutputPin;
impl<SPI, DC, CS> SpiInterface<SPI, DC, CS>
where
SPI: hal::blocking::spi::Write<u8>,
DC: OutputPin<Error = ()>,
CS: OutputPin<Error = ()>,
{
// ...
}
I don't really care what the error type is for these pins so ()
is enough for this crate's purposes I think, but that's another assumption that might be incorrect. Am I on the right track here?
Metadata
Metadata
Assignees
Labels
No labels