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.

More info

Implementations§

source§

impl ControllerConfigurationByte

source

pub const fn new() -> Self

Returns an instance with zero initialized data.

source§

impl ControllerConfigurationByte

source

pub const fn into_bytes(self) -> [u8; 1]

Returns the underlying bits.

Layout

The returned byte array is layed out in the same way as described here.

source

pub const fn from_bytes(bytes: [u8; 1]) -> Self

Converts the given bytes directly into the bitfield struct.

source§

impl ControllerConfigurationByte

source

pub fn port1_interrupt_enabled(&self) -> <bool as Specifier>::InOut

Returns the value of port1_interrupt_enabled. interrupt on ControllerToHostStatus output_buffer_full

source

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

source

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

source

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

source

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

source

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

source

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

source

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

source

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

source

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

source

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

source

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

source

pub fn port1_clock_disabled(&self) -> <bool as Specifier>::InOut

Returns the value of port1_clock_disabled. disables the keyboard

source

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

source

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

source

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

source

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

source

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

source

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

source

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

source

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

source

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

source

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

source

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

source

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)

source

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)

source

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)

source

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)

source

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)

source

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 CheckFillsUnalignedBits for ControllerConfigurationByte

§

type CheckType = [(); 1]

source§

impl Clone for ControllerConfigurationByte

source§

fn clone(&self) -> ControllerConfigurationByte

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for ControllerConfigurationByte

source§

fn fmt(&self, __bf_f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Copy for ControllerConfigurationByte

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.