Struct rstubs::arch::int::pic::PicPort

source ·
#[repr(transparent)]
pub struct PicPort(u16);
Expand description

Interrupt ports of the PIC

Tuple Fields§

§0: u16

Implementations§

source§

impl PicPort

source

pub const fn new() -> Self

Creates a new default initialized bitfield.

source

pub const fn from_bits(bits: u16) -> Self

Convert from bits.

source

pub const fn into_bits(self) -> u16

Convert into bits.

source

const TIMER_BITS: usize = 1usize

source

const TIMER_OFFSET: usize = 0usize

source

pub const fn timer(&self) -> bool

Bits: 0..1

source

pub const fn with_timer(self, value: bool) -> Self

Bits: 0..1

source

pub fn set_timer(&mut self, value: bool)

Bits: 0..1

source

const KEYBOARD_BITS: usize = 1usize

source

const KEYBOARD_OFFSET: usize = 1usize

source

pub const fn keyboard(&self) -> bool

Bits: 1..2

source

pub const fn with_keyboard(self, value: bool) -> Self

Bits: 1..2

source

pub fn set_keyboard(&mut self, value: bool)

Bits: 1..2

source

const CHAIN_BITS: usize = 1usize

source

const CHAIN_OFFSET: usize = 2usize

source

const fn chain(&self) -> bool

Bits: 2..3

source

const fn with_chain(self, value: bool) -> Self

Bits: 2..3

source

fn set_chain(&mut self, value: bool)

Bits: 2..3

source

const SERIAL1_BITS: usize = 1usize

source

const SERIAL1_OFFSET: usize = 3usize

source

pub const fn serial1(&self) -> bool

Bits: 3..4

source

pub const fn with_serial1(self, value: bool) -> Self

Bits: 3..4

source

pub fn set_serial1(&mut self, value: bool)

Bits: 3..4

source

const SERIAL2_BITS: usize = 1usize

source

const SERIAL2_OFFSET: usize = 4usize

source

pub const fn serial2(&self) -> bool

Bits: 4..5

source

pub const fn with_serial2(self, value: bool) -> Self

Bits: 4..5

source

pub fn set_serial2(&mut self, value: bool)

Bits: 4..5

source

const PARALLEL23_BITS: usize = 1usize

source

const PARALLEL23_OFFSET: usize = 5usize

source

pub const fn parallel23(&self) -> bool

Bits: 5..6

source

pub const fn with_parallel23(self, value: bool) -> Self

Bits: 5..6

source

pub fn set_parallel23(&mut self, value: bool)

Bits: 5..6

source

const FLOPPY_BITS: usize = 1usize

source

const FLOPPY_OFFSET: usize = 6usize

source

pub const fn floppy(&self) -> bool

Bits: 6..7

source

pub const fn with_floppy(self, value: bool) -> Self

Bits: 6..7

source

pub fn set_floppy(&mut self, value: bool)

Bits: 6..7

source

const PARALLEL1_BITS: usize = 1usize

source

const PARALLEL1_OFFSET: usize = 7usize

source

pub const fn parallel1(&self) -> bool

Bits: 7..8

source

pub const fn with_parallel1(self, value: bool) -> Self

Bits: 7..8

source

pub fn set_parallel1(&mut self, value: bool)

Bits: 7..8

source

const RTC_BITS: usize = 1usize

source

const RTC_OFFSET: usize = 8usize

source

pub const fn rtc(&self) -> bool

Bits: 8..9

source

pub const fn with_rtc(self, value: bool) -> Self

Bits: 8..9

source

pub fn set_rtc(&mut self, value: bool)

Bits: 8..9

source

const ACPI_BITS: usize = 1usize

source

const ACPI_OFFSET: usize = 9usize

source

pub const fn acpi(&self) -> bool

Bits: 9..10

source

pub const fn with_acpi(self, value: bool) -> Self

Bits: 9..10

source

pub fn set_acpi(&mut self, value: bool)

Bits: 9..10

source

const P10_BITS: usize = 1usize

source

const P10_OFFSET: usize = 10usize

source

pub const fn p10(&self) -> bool

Bits: 10..11

source

pub const fn with_p10(self, value: bool) -> Self

Bits: 10..11

source

pub fn set_p10(&mut self, value: bool)

Bits: 10..11

source

const P11_BITS: usize = 1usize

source

const P11_OFFSET: usize = 11usize

source

pub const fn p11(&self) -> bool

Bits: 11..12

source

pub const fn with_p11(self, value: bool) -> Self

Bits: 11..12

source

pub fn set_p11(&mut self, value: bool)

Bits: 11..12

source

const MOUSE_BITS: usize = 1usize

source

const MOUSE_OFFSET: usize = 12usize

source

pub const fn mouse(&self) -> bool

Bits: 12..13

source

pub const fn with_mouse(self, value: bool) -> Self

Bits: 12..13

source

pub fn set_mouse(&mut self, value: bool)

Bits: 12..13

source

const CO_PROCESSOR_BITS: usize = 1usize

source

const CO_PROCESSOR_OFFSET: usize = 13usize

source

pub const fn co_processor(&self) -> bool

Bits: 13..14

source

pub const fn with_co_processor(self, value: bool) -> Self

Bits: 13..14

source

pub fn set_co_processor(&mut self, value: bool)

Bits: 13..14

source

const PRIMART_ATA_BITS: usize = 1usize

source

const PRIMART_ATA_OFFSET: usize = 14usize

source

pub const fn primart_ata(&self) -> bool

Bits: 14..15

source

pub const fn with_primart_ata(self, value: bool) -> Self

Bits: 14..15

source

pub fn set_primart_ata(&mut self, value: bool)

Bits: 14..15

source

const SECONDARY_ATA_BITS: usize = 1usize

source

const SECONDARY_ATA_OFFSET: usize = 15usize

source

pub const fn secondary_ata(&self) -> bool

Bits: 15..16

source

pub const fn with_secondary_ata(self, value: bool) -> Self

Bits: 15..16

source

pub fn set_secondary_ata(&mut self, value: bool)

Bits: 15..16

Trait Implementations§

source§

impl Clone for PicPort

source§

fn clone(&self) -> PicPort

Returns a copy of the value. Read more
1.0.0§

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

Performs copy-assignment from source. Read more
source§

impl Debug for PicPort

source§

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

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

impl Default for PicPort

source§

fn default() -> Self

Returns the “default value” for a type. Read more
source§

impl From<PicPort> for u16

source§

fn from(v: PicPort) -> u16

Converts to this type from the input type.
source§

impl From<u16> for PicPort

source§

fn from(v: u16) -> Self

Converts to this type from the input type.
source§

impl Copy for PicPort

Auto Trait Implementations§

§

impl Freeze for PicPort

§

impl RefUnwindSafe for PicPort

§

impl Send for PicPort

§

impl Sync for PicPort

§

impl Unpin for PicPort

§

impl UnwindSafe for PicPort

Blanket Implementations§

§

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

§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Az for T

source§

fn az<Dst>(self) -> Dst
where T: Cast<Dst>,

Casts the value.
§

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

§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
§

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

§

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

Mutably borrows from an owned value. Read more
source§

impl<Src, Dst> CastFrom<Src> for Dst
where Src: Cast<Dst>,

source§

fn cast_from(src: Src) -> Dst

Casts the value.
source§

impl<T> CheckedAs for T

source§

fn checked_as<Dst>(self) -> Option<Dst>
where T: CheckedCast<Dst>,

Casts the value.
source§

impl<Src, Dst> CheckedCastFrom<Src> for Dst
where Src: CheckedCast<Dst>,

source§

fn checked_cast_from(src: Src) -> Option<Dst>

Casts the value.
§

impl<T> From<T> for T

§

fn from(t: T) -> T

Returns the argument unchanged.

§

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

§

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> OverflowingAs for T

source§

fn overflowing_as<Dst>(self) -> (Dst, bool)
where T: OverflowingCast<Dst>,

Casts the value.
source§

impl<Src, Dst> OverflowingCastFrom<Src> for Dst
where Src: OverflowingCast<Dst>,

source§

fn overflowing_cast_from(src: Src) -> (Dst, bool)

Casts the value.
source§

impl<T> SaturatingAs for T

source§

fn saturating_as<Dst>(self) -> Dst
where T: SaturatingCast<Dst>,

Casts the value.
source§

impl<Src, Dst> SaturatingCastFrom<Src> for Dst
where Src: SaturatingCast<Dst>,

source§

fn saturating_cast_from(src: Src) -> Dst

Casts the value.
§

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

§

type Error = Infallible

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

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

Performs the conversion.
§

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

§

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

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

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

Performs the conversion.
source§

impl<T> UnwrappedAs for T

source§

fn unwrapped_as<Dst>(self) -> Dst
where T: UnwrappedCast<Dst>,

Casts the value.
source§

impl<Src, Dst> UnwrappedCastFrom<Src> for Dst
where Src: UnwrappedCast<Dst>,

source§

fn unwrapped_cast_from(src: Src) -> Dst

Casts the value.
source§

impl<T> WrappingAs for T

source§

fn wrapping_as<Dst>(self) -> Dst
where T: WrappingCast<Dst>,

Casts the value.
source§

impl<Src, Dst> WrappingCastFrom<Src> for Dst
where Src: WrappingCast<Dst>,

source§

fn wrapping_cast_from(src: Src) -> Dst

Casts the value.