pub fn take_serial_port(
    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.

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