pub struct ReadTransfer<I2CX, SDA, SCL>where
I2CX: Instance,{ /* private fields */ }Expand description
A read driven by interrupts, owning the peripheral and the buffer.
Built by I2c::start_read. 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> ReadTransfer<I2CX, SDA, SCL>where
I2CX: Instance,
impl<I2CX, SDA, SCL> ReadTransfer<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 ReadTransfer<I2CX, SDA, SCL>where
I2CX: Instance,
impl<I2CX, SDA, SCL> Drop for ReadTransfer<I2CX, SDA, SCL>where
I2CX: Instance,
Auto Trait Implementations§
impl<I2CX, SDA, SCL> !UnwindSafe for ReadTransfer<I2CX, SDA, SCL>
impl<I2CX, SDA, SCL> Freeze for ReadTransfer<I2CX, SDA, SCL>
impl<I2CX, SDA, SCL> RefUnwindSafe for ReadTransfer<I2CX, SDA, SCL>where
I2c<I2CX, SDA, SCL>: RefUnwindSafe,
impl<I2CX, SDA, SCL> Send for ReadTransfer<I2CX, SDA, SCL>
impl<I2CX, SDA, SCL> Sync for ReadTransfer<I2CX, SDA, SCL>
impl<I2CX, SDA, SCL> Unpin for ReadTransfer<I2CX, SDA, SCL>
impl<I2CX, SDA, SCL> UnsafeUnpin for ReadTransfer<I2CX, SDA, SCL>where
I2c<I2CX, SDA, SCL>: UnsafeUnpin,
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