Lines Matching refs:irq
175 pub fn service_irq(&mut self, irq: u8, level: bool) -> bool { in service_irq()
176 assert!(irq <= 15, "Unexpectedly high value irq: {} vs 15", irq); in service_irq()
178 let pic = if irq <= PRIMARY_PIC_MAX_IRQ { in service_irq()
183 Pic::set_irq_internal(&mut self.pics[pic as usize], irq & 7, level); in service_irq()
218 let irq_secondary = if let Some(irq) = self.get_irq(PicSelect::Secondary) { in get_external_interrupt()
219 self.interrupt_ack(PicSelect::Secondary, irq); in get_external_interrupt()
220 irq in get_external_interrupt()
324 for irq in 0..8 { in reset_pic()
325 if edge_irr & (1 << irq) != 0 { in reset_pic()
326 self.clear_isr(pic_type, irq); in reset_pic()
333 if let Some(irq) = self.get_irq(pic_type) { in poll_read()
338 self.pics[pic_type as usize].irr &= !(1 << irq); in poll_read()
339 self.clear_isr(pic_type, irq); in poll_read()
341 pic_type == PicSelect::Secondary && irq != PRIMARY_PIC_CASCADE_PIN; in poll_read()
342 (irq, update_irq_needed) in poll_read()
369 fn clear_isr(&mut self, pic_type: PicSelect, irq: u8) { in clear_isr()
372 assert!(irq <= 7, "Unexpectedly high value for irq: {} vs 7", irq); in clear_isr()
373 pic.isr &= !(1 << irq); in clear_isr()
374 Pic::set_irq_internal(pic, irq, false); in clear_isr()
375 let irq = if pic_type == PicSelect::Primary { in clear_isr() localVariable
376 irq in clear_isr()
378 irq + 8 in clear_isr()
380 if let Some(resample_events) = self.resample_events.get(irq as usize) { in clear_isr()
413 fn set_irq_internal(pic: &mut PicState, irq: u8, level: bool) { in set_irq_internal()
414 assert!(irq <= 7, "Unexpectedly high value for irq: {} vs 7", irq); in set_irq_internal()
415 let irq_bitmap = 1 << irq; in set_irq_internal()
459 fn interrupt_ack(&mut self, pic_type: PicSelect, irq: u8) { in interrupt_ack()
462 assert!(irq <= 7, "Unexpectedly high value for irq: {} vs 7", irq); in interrupt_ack()
464 let irq_bitmap = 1 << irq; in interrupt_ack()
473 pic.priority_add = (irq + 1) & 7; in interrupt_ack()
475 self.clear_isr(pic_type, irq); in interrupt_ack()
492 let mut irq = value & OCW2_IRQ_MASK; in operation_command_word_2() localVariable
502 irq = (priority + self.pics[pic_type as usize].priority_add) & 7; in operation_command_word_2()
504 self.pics[pic_type as usize].priority_add = (irq + 1) & 7; in operation_command_word_2()
506 self.clear_isr(pic_type, irq); in operation_command_word_2()
511 self.clear_isr(pic_type, irq); in operation_command_word_2()
515 self.pics[pic_type as usize].priority_add = (irq + 1) & 7; in operation_command_word_2()
519 self.pics[pic_type as usize].priority_add = (irq + 1) & 7; in operation_command_word_2()
520 self.clear_isr(pic_type, irq); in operation_command_word_2()