Struct ps2::ControllerConfigurationByte
source · pub struct ControllerConfigurationByte { /* private fields */ }
Expand description
Configuration values used to enable or disable features of the PS/2 controller.
This type is used with HostToControllerCommand::ReadFromInternalRAMByte0 and HostToControllerCommand::WriteToInternalRAMByte0.
Implementations§
source§impl ControllerConfigurationByte
impl ControllerConfigurationByte
sourcepub const fn into_bytes(self) -> [u8; 1]
pub const fn into_bytes(self) -> [u8; 1]
sourcepub const fn from_bytes(bytes: [u8; 1]) -> Self
pub const fn from_bytes(bytes: [u8; 1]) -> Self
Converts the given bytes directly into the bitfield struct.
source§impl ControllerConfigurationByte
impl ControllerConfigurationByte
sourcepub fn port1_interrupt_enabled(&self) -> <bool as Specifier>::InOut
pub fn port1_interrupt_enabled(&self) -> <bool as Specifier>::InOut
Returns the value of port1_interrupt_enabled.
interrupt on ControllerToHostStatus output_buffer_full
sourcepub fn port1_interrupt_enabled_or_err(
&self
) -> Result<<bool as Specifier>::InOut, InvalidBitPattern<<bool as Specifier>::Bytes>>
pub fn port1_interrupt_enabled_or_err( &self ) -> Result<<bool as Specifier>::InOut, InvalidBitPattern<<bool as Specifier>::Bytes>>
Returns the value of port1_interrupt_enabled.
#Errors
If the returned value contains an invalid bit pattern for port1_interrupt_enabled.
interrupt on ControllerToHostStatus output_buffer_full
sourcepub fn with_port1_interrupt_enabled(
self,
new_val: <bool as Specifier>::InOut
) -> Self
pub fn with_port1_interrupt_enabled( self, new_val: <bool as Specifier>::InOut ) -> Self
Returns a copy of the bitfield with the value of port1_interrupt_enabled set to the given value.
#Panics
If the given value is out of bounds for port1_interrupt_enabled.
interrupt on ControllerToHostStatus output_buffer_full
sourcepub fn with_port1_interrupt_enabled_checked(
self,
new_val: <bool as Specifier>::InOut
) -> Result<Self, OutOfBounds>
pub fn with_port1_interrupt_enabled_checked( self, new_val: <bool as Specifier>::InOut ) -> Result<Self, OutOfBounds>
Returns a copy of the bitfield with the value of port1_interrupt_enabled set to the given value.
#Errors
If the given value is out of bounds for port1_interrupt_enabled.
interrupt on ControllerToHostStatus output_buffer_full
sourcepub fn set_port1_interrupt_enabled(
&mut self,
new_val: <bool as Specifier>::InOut
)
pub fn set_port1_interrupt_enabled( &mut self, new_val: <bool as Specifier>::InOut )
Sets the value of port1_interrupt_enabled to the given value.
#Panics
If the given value is out of bounds for port1_interrupt_enabled.
interrupt on ControllerToHostStatus output_buffer_full
sourcepub fn set_port1_interrupt_enabled_checked(
&mut self,
new_val: <bool as Specifier>::InOut
) -> Result<(), OutOfBounds>
pub fn set_port1_interrupt_enabled_checked( &mut self, new_val: <bool as Specifier>::InOut ) -> Result<(), OutOfBounds>
Sets the value of port1_interrupt_enabled to the given value.
#Errors
If the given value is out of bounds for port1_interrupt_enabled.
interrupt on ControllerToHostStatus output_buffer_full
sourcepub fn port2_interrupt_enabled(&self) -> <bool as Specifier>::InOut
pub fn port2_interrupt_enabled(&self) -> <bool as Specifier>::InOut
Returns the value of port2_interrupt_enabled.
interrupt on ControllerToHostStatus mouse_output_buffer_full
Note: only if 2 PS/2 ports supported
sourcepub fn port2_interrupt_enabled_or_err(
&self
) -> Result<<bool as Specifier>::InOut, InvalidBitPattern<<bool as Specifier>::Bytes>>
pub fn port2_interrupt_enabled_or_err( &self ) -> Result<<bool as Specifier>::InOut, InvalidBitPattern<<bool as Specifier>::Bytes>>
Returns the value of port2_interrupt_enabled.
#Errors
If the returned value contains an invalid bit pattern for port2_interrupt_enabled.
interrupt on ControllerToHostStatus mouse_output_buffer_full
Note: only if 2 PS/2 ports supported
sourcepub fn with_port2_interrupt_enabled(
self,
new_val: <bool as Specifier>::InOut
) -> Self
pub fn with_port2_interrupt_enabled( self, new_val: <bool as Specifier>::InOut ) -> Self
Returns a copy of the bitfield with the value of port2_interrupt_enabled set to the given value.
#Panics
If the given value is out of bounds for port2_interrupt_enabled.
interrupt on ControllerToHostStatus mouse_output_buffer_full
Note: only if 2 PS/2 ports supported
sourcepub fn with_port2_interrupt_enabled_checked(
self,
new_val: <bool as Specifier>::InOut
) -> Result<Self, OutOfBounds>
pub fn with_port2_interrupt_enabled_checked( self, new_val: <bool as Specifier>::InOut ) -> Result<Self, OutOfBounds>
Returns a copy of the bitfield with the value of port2_interrupt_enabled set to the given value.
#Errors
If the given value is out of bounds for port2_interrupt_enabled.
interrupt on ControllerToHostStatus mouse_output_buffer_full
Note: only if 2 PS/2 ports supported
sourcepub fn set_port2_interrupt_enabled(
&mut self,
new_val: <bool as Specifier>::InOut
)
pub fn set_port2_interrupt_enabled( &mut self, new_val: <bool as Specifier>::InOut )
Sets the value of port2_interrupt_enabled to the given value.
#Panics
If the given value is out of bounds for port2_interrupt_enabled.
interrupt on ControllerToHostStatus mouse_output_buffer_full
Note: only if 2 PS/2 ports supported
sourcepub fn set_port2_interrupt_enabled_checked(
&mut self,
new_val: <bool as Specifier>::InOut
) -> Result<(), OutOfBounds>
pub fn set_port2_interrupt_enabled_checked( &mut self, new_val: <bool as Specifier>::InOut ) -> Result<(), OutOfBounds>
Sets the value of port2_interrupt_enabled to the given value.
#Errors
If the given value is out of bounds for port2_interrupt_enabled.
interrupt on ControllerToHostStatus mouse_output_buffer_full
Note: only if 2 PS/2 ports supported
sourcepub fn port1_clock_disabled(&self) -> <bool as Specifier>::InOut
pub fn port1_clock_disabled(&self) -> <bool as Specifier>::InOut
Returns the value of port1_clock_disabled. disables the keyboard
sourcepub fn port1_clock_disabled_or_err(
&self
) -> Result<<bool as Specifier>::InOut, InvalidBitPattern<<bool as Specifier>::Bytes>>
pub fn port1_clock_disabled_or_err( &self ) -> Result<<bool as Specifier>::InOut, InvalidBitPattern<<bool as Specifier>::Bytes>>
Returns the value of port1_clock_disabled.
#Errors
If the returned value contains an invalid bit pattern for port1_clock_disabled. disables the keyboard
sourcepub fn with_port1_clock_disabled(
self,
new_val: <bool as Specifier>::InOut
) -> Self
pub fn with_port1_clock_disabled( self, new_val: <bool as Specifier>::InOut ) -> Self
Returns a copy of the bitfield with the value of port1_clock_disabled set to the given value.
#Panics
If the given value is out of bounds for port1_clock_disabled. disables the keyboard
sourcepub fn with_port1_clock_disabled_checked(
self,
new_val: <bool as Specifier>::InOut
) -> Result<Self, OutOfBounds>
pub fn with_port1_clock_disabled_checked( self, new_val: <bool as Specifier>::InOut ) -> Result<Self, OutOfBounds>
Returns a copy of the bitfield with the value of port1_clock_disabled set to the given value.
#Errors
If the given value is out of bounds for port1_clock_disabled. disables the keyboard
sourcepub fn set_port1_clock_disabled(&mut self, new_val: <bool as Specifier>::InOut)
pub fn set_port1_clock_disabled(&mut self, new_val: <bool as Specifier>::InOut)
Sets the value of port1_clock_disabled to the given value.
#Panics
If the given value is out of bounds for port1_clock_disabled. disables the keyboard
sourcepub fn set_port1_clock_disabled_checked(
&mut self,
new_val: <bool as Specifier>::InOut
) -> Result<(), OutOfBounds>
pub fn set_port1_clock_disabled_checked( &mut self, new_val: <bool as Specifier>::InOut ) -> Result<(), OutOfBounds>
Sets the value of port1_clock_disabled to the given value.
#Errors
If the given value is out of bounds for port1_clock_disabled. disables the keyboard
sourcepub fn port2_clock_disabled(&self) -> <bool as Specifier>::InOut
pub fn port2_clock_disabled(&self) -> <bool as Specifier>::InOut
Returns the value of port2_clock_disabled. disables the auxilary device (mouse)
Note: only if 2 PS/2 ports supported
sourcepub fn port2_clock_disabled_or_err(
&self
) -> Result<<bool as Specifier>::InOut, InvalidBitPattern<<bool as Specifier>::Bytes>>
pub fn port2_clock_disabled_or_err( &self ) -> Result<<bool as Specifier>::InOut, InvalidBitPattern<<bool as Specifier>::Bytes>>
Returns the value of port2_clock_disabled.
#Errors
If the returned value contains an invalid bit pattern for port2_clock_disabled. disables the auxilary device (mouse)
Note: only if 2 PS/2 ports supported
sourcepub fn with_port2_clock_disabled(
self,
new_val: <bool as Specifier>::InOut
) -> Self
pub fn with_port2_clock_disabled( self, new_val: <bool as Specifier>::InOut ) -> Self
Returns a copy of the bitfield with the value of port2_clock_disabled set to the given value.
#Panics
If the given value is out of bounds for port2_clock_disabled. disables the auxilary device (mouse)
Note: only if 2 PS/2 ports supported
sourcepub fn with_port2_clock_disabled_checked(
self,
new_val: <bool as Specifier>::InOut
) -> Result<Self, OutOfBounds>
pub fn with_port2_clock_disabled_checked( self, new_val: <bool as Specifier>::InOut ) -> Result<Self, OutOfBounds>
Returns a copy of the bitfield with the value of port2_clock_disabled set to the given value.
#Errors
If the given value is out of bounds for port2_clock_disabled. disables the auxilary device (mouse)
Note: only if 2 PS/2 ports supported
sourcepub fn set_port2_clock_disabled(&mut self, new_val: <bool as Specifier>::InOut)
pub fn set_port2_clock_disabled(&mut self, new_val: <bool as Specifier>::InOut)
Sets the value of port2_clock_disabled to the given value.
#Panics
If the given value is out of bounds for port2_clock_disabled. disables the auxilary device (mouse)
Note: only if 2 PS/2 ports supported
sourcepub fn set_port2_clock_disabled_checked(
&mut self,
new_val: <bool as Specifier>::InOut
) -> Result<(), OutOfBounds>
pub fn set_port2_clock_disabled_checked( &mut self, new_val: <bool as Specifier>::InOut ) -> Result<(), OutOfBounds>
Sets the value of port2_clock_disabled to the given value.
#Errors
If the given value is out of bounds for port2_clock_disabled. disables the auxilary device (mouse)
Note: only if 2 PS/2 ports supported
sourcepub fn port1_scancode_translation_enabled(&self) -> <bool as Specifier>::InOut
pub fn port1_scancode_translation_enabled(&self) -> <bool as Specifier>::InOut
Returns the value of port1_scancode_translation_enabled. whether IBM scancode translation is enabled (0=AT, 1=PC)
sourcepub fn port1_scancode_translation_enabled_or_err(
&self
) -> Result<<bool as Specifier>::InOut, InvalidBitPattern<<bool as Specifier>::Bytes>>
pub fn port1_scancode_translation_enabled_or_err( &self ) -> Result<<bool as Specifier>::InOut, InvalidBitPattern<<bool as Specifier>::Bytes>>
Returns the value of port1_scancode_translation_enabled.
#Errors
If the returned value contains an invalid bit pattern for port1_scancode_translation_enabled. whether IBM scancode translation is enabled (0=AT, 1=PC)
sourcepub fn with_port1_scancode_translation_enabled(
self,
new_val: <bool as Specifier>::InOut
) -> Self
pub fn with_port1_scancode_translation_enabled( self, new_val: <bool as Specifier>::InOut ) -> Self
Returns a copy of the bitfield with the value of port1_scancode_translation_enabled set to the given value.
#Panics
If the given value is out of bounds for port1_scancode_translation_enabled. whether IBM scancode translation is enabled (0=AT, 1=PC)
sourcepub fn with_port1_scancode_translation_enabled_checked(
self,
new_val: <bool as Specifier>::InOut
) -> Result<Self, OutOfBounds>
pub fn with_port1_scancode_translation_enabled_checked( self, new_val: <bool as Specifier>::InOut ) -> Result<Self, OutOfBounds>
Returns a copy of the bitfield with the value of port1_scancode_translation_enabled set to the given value.
#Errors
If the given value is out of bounds for port1_scancode_translation_enabled. whether IBM scancode translation is enabled (0=AT, 1=PC)
sourcepub fn set_port1_scancode_translation_enabled(
&mut self,
new_val: <bool as Specifier>::InOut
)
pub fn set_port1_scancode_translation_enabled( &mut self, new_val: <bool as Specifier>::InOut )
Sets the value of port1_scancode_translation_enabled to the given value.
#Panics
If the given value is out of bounds for port1_scancode_translation_enabled. whether IBM scancode translation is enabled (0=AT, 1=PC)
sourcepub fn set_port1_scancode_translation_enabled_checked(
&mut self,
new_val: <bool as Specifier>::InOut
) -> Result<(), OutOfBounds>
pub fn set_port1_scancode_translation_enabled_checked( &mut self, new_val: <bool as Specifier>::InOut ) -> Result<(), OutOfBounds>
Sets the value of port1_scancode_translation_enabled to the given value.
#Errors
If the given value is out of bounds for port1_scancode_translation_enabled. whether IBM scancode translation is enabled (0=AT, 1=PC)
Trait Implementations§
source§impl Clone for ControllerConfigurationByte
impl Clone for ControllerConfigurationByte
source§fn clone(&self) -> ControllerConfigurationByte
fn clone(&self) -> ControllerConfigurationByte
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more