SerialDevice

Trait SerialDevice 

Source
pub trait SerialDevice {
    // Required methods
    fn send(&mut self) -> u8;
    fn receive(&mut self, byte: u8);
    fn allow_slave(&self) -> bool;
    fn description(&self) -> String;
    fn state(&self) -> String;
}

Required Methods§

Source

fn send(&mut self) -> u8

Sends a byte (u8) to the attached serial connection.

Source

fn receive(&mut self, byte: u8)

Receives a byte (u8) from the attached serial connection, can be either another device or the host.

Source

fn allow_slave(&self) -> bool

Whether the serial device “driver” supports slave mode simulating an external clock source. Or if instead the clock should always be generated by the running device.

Source

fn description(&self) -> String

Returns a short description of the serial device.

Source

fn state(&self) -> String

Returns a string describing the current state of the serial device. Could be used for debugging purposes.

Implementors§