pub fn new(port: P, family: Family) -> io::Result<Self> {
        let mut device = Device { port, family };

        device.init_communications()?;

        Ok(device)
    }
/// Create a new `Device` from an already opened port.
///
/// This will synchronize the baudrate with the device.
///
/// # Note
///
/// This functions expects the device to be already in bootloader mode,
/// to enter bootloader please reset the device into this mode or use
/// [`invoke_bootloader`] function to enter the bootloader on the device
/// (on supported boards).
Create a new `Device` from an already opened port.
This will synchronize the baudrate with the device.
Create a new ` Device ` from an already opened port . This will synchronize the baudrate with the device .
pub fn new(port: P, family: Family) -> io::Result<Self> {
        let mut device = Device { port, family };
        device.init_communications()?;
        Ok(device)
    }
pub fn new ( port : P , family : Family ) -> io :: Result < Self > { let mut device = Device { port , family } ; device . init_communications ( ) ? ; Ok ( device ) }
Create a new `Device` from an already opened port.
Create a new ` Device ` from an already opened port .
port
P
family
Family
port
P
family
Family
note
This functions expects the device to be already in bootloader mode,
to enter bootloader please reset the device into this mode or use
[`invoke_bootloader`] function to enter the bootloader on the device
(on supported boards).
This functions expects the device to be already in bootloader mode to enter bootloader please reset the device into this mode or use [ ` invoke_bootloader ` ] function to enter the bootloader on the device ( on supported boards ) .