[][src]Struct uart_16550::SerialPort

pub struct SerialPort { /* fields omitted */ }

An interface to a serial port that allows sending out individual bytes.

Implementations

impl SerialPort[src]

pub unsafe fn new(base: u16) -> SerialPort[src]

Creates a new serial port interface on the given I/O port.

This function is unsafe because the caller must ensure that the given base address really points to a serial port device.

pub fn init(&mut self)[src]

Initializes the serial port.

The default configuration of 38400/8-N-1 is used.

pub fn send(&mut self, data: u8)[src]

Sends a byte on the serial port.

pub fn receive(&mut self) -> u8[src]

Receives a byte on the serial port.

Trait Implementations

impl Write for SerialPort[src]

Auto Trait Implementations

impl Send for SerialPort

impl Sync for SerialPort

impl Unpin for SerialPort

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.