Struct esp32c3_hal::i2c::I2C
source · pub struct I2C<'d, T> { /* private fields */ }
Expand description
I2C peripheral container (I2C)
Implementations§
source§impl<'d, T> I2C<'d, T>where
T: Instance,
impl<'d, T> I2C<'d, T>where T: Instance,
sourcepub fn new<SDA, SCL>(
i2c: impl Peripheral<P = T> + 'd,
sda: impl Peripheral<P = SDA> + 'd,
scl: impl Peripheral<P = SCL> + 'd,
frequency: Rate<u32, 1, 1>,
clocks: &Clocks<'_>
) -> I2C<'d, T>where
SDA: OutputPin + InputPin,
SCL: OutputPin + InputPin,
pub fn new<SDA, SCL>( i2c: impl Peripheral<P = T> + 'd, sda: impl Peripheral<P = SDA> + 'd, scl: impl Peripheral<P = SCL> + 'd, frequency: Rate<u32, 1, 1>, clocks: &Clocks<'_> ) -> I2C<'d, T>where SDA: OutputPin + InputPin, SCL: OutputPin + InputPin,
Create a new I2C instance This will enable the peripheral but the peripheral won’t get automatically disabled when this gets dropped.
Trait Implementations§
Auto Trait Implementations§
impl<'d, T> RefUnwindSafe for I2C<'d, T>where T: RefUnwindSafe,
impl<'d, T> Send for I2C<'d, T>where T: Send,
impl<'d, T> Sync for I2C<'d, T>where T: Sync,
impl<'d, T> Unpin for I2C<'d, T>where T: Unpin,
impl<'d, T> !UnwindSafe for I2C<'d, T>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more