pub struct WriteTransfer<I2CX, SDA, SCL>where
I2CX: Instance,{ /* private fields */ }Expand description
A write driven by interrupts, owning the peripheral and the buffer.
Built by I2c::start_write. The handler for both I²C vectors calls
on_interrupt; the transfer is over once
is_done says so, and release takes it
apart.
Implementations§
Source§impl<I2CX, SDA, SCL> WriteTransfer<I2CX, SDA, SCL>where
I2CX: Instance,
impl<I2CX, SDA, SCL> WriteTransfer<I2CX, SDA, SCL>where
I2CX: Instance,
Sourcepub fn on_interrupt(&mut self)
pub fn on_interrupt(&mut self)
Advances the transfer by one step. Call from both I²C interrupt handlers.
Reads the flags itself rather than trusting which vector it was entered from, so a wakeup this step has nothing to do with is simply ignored.
Trait Implementations§
Source§impl<I2CX, SDA, SCL> Drop for WriteTransfer<I2CX, SDA, SCL>where
I2CX: Instance,
impl<I2CX, SDA, SCL> Drop for WriteTransfer<I2CX, SDA, SCL>where
I2CX: Instance,
Auto Trait Implementations§
impl<I2CX, SDA, SCL> Freeze for WriteTransfer<I2CX, SDA, SCL>
impl<I2CX, SDA, SCL> RefUnwindSafe for WriteTransfer<I2CX, SDA, SCL>where
I2c<I2CX, SDA, SCL>: RefUnwindSafe,
impl<I2CX, SDA, SCL> Send for WriteTransfer<I2CX, SDA, SCL>
impl<I2CX, SDA, SCL> Sync for WriteTransfer<I2CX, SDA, SCL>
impl<I2CX, SDA, SCL> Unpin for WriteTransfer<I2CX, SDA, SCL>
impl<I2CX, SDA, SCL> UnsafeUnpin for WriteTransfer<I2CX, SDA, SCL>where
I2c<I2CX, SDA, SCL>: UnsafeUnpin,
impl<I2CX, SDA, SCL> UnwindSafe for WriteTransfer<I2CX, SDA, SCL>where
I2c<I2CX, SDA, SCL>: UnwindSafe,
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