Closed RicoGit closed 11 months ago
I am guessing the Peripheral
trait is a trait provided by your device HAL and can thus not be implemented by a generic driver.
Please feel free to add a DerefMut
implementation to the pin structs here and send a PR. It should be fairly easy to do, you just need to get the generic parameters right.
HI, looks like DerefMut
doesn't make sense for pins, what should I deference?
impl <'a, S, E> core::ops::Deref for $PX<'a, S, E> {
type Target = Self; // self or may be I2C? Both look strange.
fn deref(&self) -> &Self::Target {
self
}
}
I think there is no need to do something like this. Sorry for this issue)
p.s. Peripheral
comes from esp-idf-hal
is a tricky stuff for for HAL authors and .
Looks like there is a lack of impl DerefMut for pins. Example:
Error: