[−][src]Struct sunrise_kernel::devices::pic::Pic
A master/slave PIC setup, as commonly found on IBM PCs.
Fields
master: SpinLockIRQ<InternalPic>
The master PIC.
slave: SpinLockIRQ<InternalPic>
The slave PIC, cascaded on line 2 of .master
Implementations
impl Pic
[src]
unsafe fn new() -> Pic
[src]
Creates a new PIC, and initializes it.
Interrupts will be mapped to IRQ [32..48]
Safety
This should only be called once! If called more than once, then both Pics instances will share the same underlying Pios, but different mutexes protecting them!
pub fn mask(&self, irq: u8)
[src]
Mask the given IRQ number. Will redirect the call to the right Pic device.
pub fn unmask(&self, irq: u8)
[src]
Unmask the given IRQ number. Will redirect the call to the right Pic device.
pub fn get_mask(&self) -> u16
[src]
Reads the PIC interrupt mask. Used for debug purposes.
LSB is irq 0, MSB is irq 15.
pub fn acknowledge(&self, irq: u8)
[src]
Acknowledges an IRQ, allowing the PIC to send a new IRQ on the next cycle.
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for Pic
impl Send for Pic
impl Sync for Pic
impl Unpin for Pic
impl UnwindSafe for Pic
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,
fn borrow_mut(&mut self) -> &mut T
[src]
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>,
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>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,