Struct framed_serial::SerialWrap [] [src]

pub struct SerialWrap<T> where
    T: SerialPort
{ /* fields omitted */ }

Implment the traits required for a FramedConnection based on a serial::SerialPort.

Note that the async processing of FramedConnection depends on a short timeout being set. At the time of writing, serial::open() returned a SerialPort with a default of 100 msec.

Methods

impl<T> SerialWrap<T> where
    T: SerialPort
[src]

Constructor

Trait Implementations

impl<T> NonBlockingRx for SerialWrap<T> where
    T: SerialPort
[src]

The error type returned if getc fails.

Attempt to read a single octet from the port's receiver; if the buffer is empty return None. Read more

Read a specified number of octets into the given buffer, or until the data runs out. Read more

impl<T> NonBlockingTx for SerialWrap<T> where
    T: SerialPort
[src]

The error type returned if function fails.

Try and write a single octet to the port's transmitter. Will return Ok(None) if the FIFO/buffer was full and the octet couldn't be stored or Ok(Some(ch)) if it was stored OK.

In some implementations, this can result in an Error. If not, use type Error = !.

Write as much of a complete string to the UART as possible. Returns the number of octets sent, plus the result from the last putc call. Aborts early if putc fails in any way. Read more