Struct uart_16550::SerialPort [−][src]
pub struct SerialPort { /* fields omitted */ }
An interface to a serial port that allows sending out individual bytes.
Implementations
impl SerialPort
[src]
impl SerialPort
[src]pub const 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.