Lines Matching refs:irq

163     pub fn service_irq(&mut self, irq: u8, level: bool) -> bool {  in service_irq()
164 assert!(irq <= 15, "Unexpectedly high value irq: {} vs 15", irq); in service_irq()
166 let pic = if irq <= PRIMARY_PIC_MAX_IRQ { in service_irq()
171 Pic::set_irq_internal(&mut self.pics[pic as usize], irq & 7, level); in service_irq()
194 let irq_primary = if let Some(irq) = self.get_irq(PicSelect::Primary) { in get_external_interrupt()
195 irq in get_external_interrupt()
209 let irq_secondary = if let Some(irq) = self.get_irq(PicSelect::Secondary) { in get_external_interrupt()
210 self.interrupt_ack(PicSelect::Secondary, irq); in get_external_interrupt()
211 irq in get_external_interrupt()
315 for irq in 0..8 { in reset_pic()
316 if edge_irr & (1 << irq) != 0 { in reset_pic()
317 self.clear_isr(pic_type, irq); in reset_pic()
324 if let Some(irq) = self.get_irq(pic_type) { in poll_read()
329 self.pics[pic_type as usize].irr &= !(1 << irq); in poll_read()
330 self.clear_isr(pic_type, irq); in poll_read()
332 pic_type == PicSelect::Secondary && irq != PRIMARY_PIC_CASCADE_PIN; in poll_read()
333 (irq, update_irq_needed) in poll_read()
360 fn clear_isr(&mut self, pic_type: PicSelect, irq: u8) { in clear_isr()
363 assert!(irq <= 7, "Unexpectedly high value for irq: {} vs 7", irq); in clear_isr()
364 pic.isr &= !(1 << irq); in clear_isr()
365 Pic::set_irq_internal(pic, irq, false); in clear_isr()
366 let irq = if pic_type == PicSelect::Primary { in clear_isr() localVariable
367 irq in clear_isr()
369 irq + 8 in clear_isr()
371 if let Some(resample_events) = self.resample_events.get(irq as usize) { in clear_isr()
404 fn set_irq_internal(pic: &mut PicState, irq: u8, level: bool) { in set_irq_internal()
405 assert!(irq <= 7, "Unexpectedly high value for irq: {} vs 7", irq); in set_irq_internal()
406 let irq_bitmap = 1 << irq; in set_irq_internal()
450 fn interrupt_ack(&mut self, pic_type: PicSelect, irq: u8) { in interrupt_ack()
453 assert!(irq <= 7, "Unexpectedly high value for irq: {} vs 7", irq); in interrupt_ack()
455 let irq_bitmap = 1 << irq; in interrupt_ack()
464 pic.priority_add = (irq + 1) & 7; in interrupt_ack()
466 self.clear_isr(pic_type, irq); in interrupt_ack()
483 let mut irq = value & OCW2_IRQ_MASK; in operation_command_word_2() localVariable
493 irq = (priority + self.pics[pic_type as usize].priority_add) & 7; in operation_command_word_2()
495 self.pics[pic_type as usize].priority_add = (irq + 1) & 7; in operation_command_word_2()
497 self.clear_isr(pic_type, irq); in operation_command_word_2()
502 self.clear_isr(pic_type, irq); in operation_command_word_2()
506 self.pics[pic_type as usize].priority_add = (irq + 1) & 7; in operation_command_word_2()
510 self.pics[pic_type as usize].priority_add = (irq + 1) & 7; in operation_command_word_2()
511 self.clear_isr(pic_type, irq); in operation_command_word_2()