/// A helper function handling PIO write command during VM exit.
/// The virtual device itself provides mutable ability and thead-safe protection.
///
/// Return error if failed to get the device.
A helper function handling PIO write command during VM exit.
The virtual device itself provides mutable ability and thead-safe protection.

Return error if failed to get the device.
A helper function handling PIO write command during VM exit . The virtual device itself provides mutable ability and thead - safe protection . Return error if failed to get the device .
pub fn pio_write(&self, addr: u16, data: &[u8]) -> Result<()> {
        if let Some((device, base)) = self.get_device(IoAddress::Pio(addr)) {
            device.write(base, IoAddress::Pio(addr - (base.raw_value() as u16)), data);
            Ok(())
        } else {
            Err(Error::NoDevice)
        }
    }
pub fn pio_write ( & self , addr : u16 , data : & [ u8 ] ) -> Result < ( ) > { if let Some ( ( device , base ) ) = self . get_device ( IoAddress :: Pio ( addr ) ) { device . write ( base , IoAddress :: Pio ( addr - ( base . raw_value ( ) as u16 ) ) , data ) ; Ok ( ( ) ) } else { Err ( Error :: NoDevice ) } }
A helper function handling PIO write command during VM exit.
A helper function handling PIO write command during VM exit .
&self
addr
u16
data
&[u8]