### ChainedPics Struct Source: https://docs.rs/pic8259/0.11.0/pic8259/struct.ChainedPics.html Represents a pair of chained PICs, the standard setup on x86. ```APIDOC ## Struct ChainedPics ### Description A pair of chained PICs. This is the standard setup on x86. ### Fields (private fields) ``` -------------------------------- ### ChainedPics::new_contiguous Source: https://docs.rs/pic8259/0.11.0/pic8259/struct.ChainedPics.html Creates a new `ChainedPics` interface that will map the PICs contiguously starting at the given interrupt offset. ```APIDOC ## pub const unsafe fn new_contiguous(primary_offset: u8) -> ChainedPics ### Description Create a new `ChainedPics` interface that will map the PICs contiguously starting at the given interrupt offset. This function is equivalent to `Self::new(primary_offset, primary_offset + 8)`. ### Parameters - **primary_offset** (u8) - Required - The starting interrupt offset for the primary PIC. ``` -------------------------------- ### ChainedPics::initialize Source: https://docs.rs/pic8259/0.11.0/pic8259/struct.ChainedPics.html Initializes both PICs together. ```APIDOC ## pub unsafe fn initialize(&mut self) ### Description Initialize both our PICs. We initialize them together, at the same time, because it’s traditional to do so, and because I/O operations might not be instantaneous on older processors. ``` -------------------------------- ### ChainedPics::new Source: https://docs.rs/pic8259/0.11.0/pic8259/struct.ChainedPics.html Creates a new interface for the standard PIC1 and PIC2, specifying the desired interrupt offsets. ```APIDOC ## pub const unsafe fn new(offset1: u8, offset2: u8) -> ChainedPics ### Description Create a new interface for the standard PIC1 and PIC2, specifying the desired interrupt offsets. ### Parameters - **offset1** (u8) - Required - The interrupt offset for the primary PIC. - **offset2** (u8) - Required - The interrupt offset for the secondary PIC. ``` -------------------------------- ### ChainedPics::disable Source: https://docs.rs/pic8259/0.11.0/pic8259/struct.ChainedPics.html Disables both PICs by masking all interrupts. ```APIDOC ## pub unsafe fn disable(&mut self) ### Description Disables both PICs by masking all interrupts. ``` -------------------------------- ### Define ChainedPics struct Source: https://docs.rs/pic8259/0.11.0/pic8259/struct.ChainedPics.html The internal structure definition for the chained PIC interface. ```rust pub struct ChainedPics { /* private fields */ } ``` -------------------------------- ### ChainedPics::write_masks Source: https://docs.rs/pic8259/0.11.0/pic8259/struct.ChainedPics.html Writes the interrupt masks of both PICs. ```APIDOC ## pub unsafe fn write_masks(&mut self, mask1: u8, mask2: u8) ### Description Writes the interrupt masks of both PICs. ### Parameters - **mask1** (u8) - Required - The mask for the primary PIC. - **mask2** (u8) - Required - The mask for the secondary PIC. ``` -------------------------------- ### ChainedPics::read_masks Source: https://docs.rs/pic8259/0.11.0/pic8259/struct.ChainedPics.html Reads the interrupt masks of both PICs. ```APIDOC ## pub unsafe fn read_masks(&mut self) -> [u8; 2] ### Description Reads the interrupt masks of both PICs. ### Returns - `[u8; 2]` - An array containing the masks for PIC1 and PIC2. ``` -------------------------------- ### ChainedPics::handles_interrupt Source: https://docs.rs/pic8259/0.11.0/pic8259/struct.ChainedPics.html Checks if the `ChainedPics` instance handles a given interrupt ID. ```APIDOC ## pub fn handles_interrupt(&self, interrupt_id: u8) -> bool ### Description Do we handle this interrupt? ### Parameters - **interrupt_id** (u8) - Required - The interrupt ID to check. ### Returns - `bool` - True if the interrupt is handled, false otherwise. ``` -------------------------------- ### ChainedPics::notify_end_of_interrupt Source: https://docs.rs/pic8259/0.11.0/pic8259/struct.ChainedPics.html Notifies the PICs that an interrupt has ended. ```APIDOC ## pub unsafe fn notify_end_of_interrupt(&mut self, interrupt_id: u8) ### Description Figure out which (if any) PICs in our chain need to know about this interrupt. This is tricky, because all interrupts from `pics[1]` get chained through `pics[0]`. ### Parameters - **interrupt_id** (u8) - Required - The ID of the interrupt that has ended. ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.