Struct avr_tester::Uart
source · [−]pub struct Uart<'a> { /* private fields */ }
Implementations
sourceimpl<'a> Uart<'a>
impl<'a> Uart<'a>
sourcepub fn send_byte(&mut self, value: u8)
pub fn send_byte(&mut self, value: u8)
Transmits a byte to AVR.
Note that you don’t have to worry about AVR’s UART’s buffer limits - if transmitting this byte would overflow that buffer, AvrTester will automatically re-schedule it to be sent at the nearest opportunity.
See also: Self::send()
.
sourcepub fn recv_byte(&mut self) -> Option<u8>
pub fn recv_byte(&mut self) -> Option<u8>
Retrieves a byte from AVR.
Returns None
if there are no more bytes in the buffer, in which case
no more bytes will appear at least until the next AvrTester::run()
.
See also: Self::recv()
.
Auto Trait Implementations
impl<'a> !RefUnwindSafe for Uart<'a>
impl<'a> !Send for Uart<'a>
impl<'a> !Sync for Uart<'a>
impl<'a> Unpin for Uart<'a>
impl<'a> !UnwindSafe for Uart<'a>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more