Struct teensy4_bsp::usb::Writer [−][src]
pub struct Writer(_);
usb-logging
only.Expand description
A type that can send data to a USB serial host
Use Writer::write
to write byte
buffers. Or, use the standard write!()
macro to serialize data to
the writer.
Implementations
Writes raw bytes to the USB serial host
write
may return a size smaller than buffer
. This indicates that
the driver could only write that many elements from the buffer. If it’s
important that you write a complete message, you’ll need to retry the
call with the rest of the data.
Flush the written USB data
flush
may schedule an additional USB transfer to write USB
data. However, it will not make your USB data appear to the host
faster. You should not call flush
in a tight USB writing loop,
since the driver will attempt to pack multiple writes into a
single USB transfer.
Trait Implementations
Writes a string slice into this writer, returning whether the write succeeded. Read more