[−][src]Struct sunrise_kernel::devices::pic::InternalPic
A single PIC8259 device.
Fields
port_cmd: Pio<u8>
The PIC's COMMAND IO port.
port_data: Pio<u8>
The PIC's DATA IO port.
Implementations
impl InternalPic
[src][−]
unsafe fn new(port_base: u16, is_master: bool, vector_offset: u8) -> InternalPic
[src][−]
Setup the 8259 pic. Redirect the IRQ to the chosen interrupt vector.
Safety
The port should map to a proper PIC device. Sending invalid data to a random device can lead to memory unsafety. Furthermore, care should be taken not to share the underlying Pio.
pub fn acknowledge(&mut self)
[src][−]
Acknowledges an IRQ, allowing the PIC to send a new IRQ on the next cycle.
pub fn mask(&mut self, irq: u8)
[src][−]
Mask the given IRQ
pub fn unmask(&mut self, irq: u8)
[src][−]
Unmask the given IRQ
pub fn get_mask(&self) -> u8
[src][−]
Read the IRQ mask. Used mostly for debug purposes.
Trait Implementations
impl Debug for InternalPic
[src][+]
Auto Trait Implementations
impl RefUnwindSafe for InternalPic
impl Send for InternalPic
impl Sync for InternalPic
impl Unpin for InternalPic
impl UnwindSafe for InternalPic
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src][+]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src][+]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src][+]
T: ?Sized,
impl<T> From<T> for T
[src][+]
impl<T, U> Into<U> for T where
U: From<T>,
[src][+]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src][+]
U: Into<T>,
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src][+]
U: TryFrom<T>,