pub fn take_serial_port_basic(
    serial_port_address: SerialPortAddress
) -> Option<SerialPort>
Expand description

Takes ownership of the SerialPort specified by the given SerialPortAddress.

This function initializes the given serial port if it has not yet been initialized. If the serial port has already been initialized and taken by another crate, this returns None.

On aarch64, initializing a serial port includes mapping memory pages; Make sure to have called memory::init() ahead of calling this function.

The returned SerialPort will be restored to this crate upon being dropped.