pub trait I2cBusMapping<SDA, SCL> {
type Error;
type Bus: I2cRead<Error = Self::Error> + I2cWrite<Error = Self::Error>;
// Required method
fn poll_initialize(
self: Pin<&mut Self>,
cx: &mut Context<'_>,
sda: &mut SDA,
scl: &mut SCL,
) -> Poll<Result<Self::Bus, Self::Error>>
where Self: Sized;
}Expand description
Defines a mapping for two GPIO pins that can be used to create an I²C bus.
Required Associated Types§
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".