void pc_fdc_family_device::check_irq() { bool pirq = irq; irq = fdc_irq && (dor & 4) && (dor & 8); if(irq != pirq && !intrq_cb.isnull()) { logerror("%s: pc_irq = %d\n", tag(), irq); intrq_cb(irq); } }
void pc_fdc_family_device::check_irq() { bool pirq = irq; irq = fdc_irq && (dor & 4) && (dor & 8); if(irq != pirq && !intrq_cb.isnull()) { LOG("pc_irq = %d\n", irq); intrq_cb(irq); } }
void scc8530_t::updateirqs() { int irqstat; irqstat = 0; if (MasterIRQEnable) { if ((channel[0].txIRQEnable) && (channel[0].txIRQPending)) { IRQType = IRQ_B_TX; irqstat = 1; } else if ((channel[1].txIRQEnable) && (channel[1].txIRQPending)) { IRQType = IRQ_A_TX; irqstat = 1; } else if ((channel[0].extIRQEnable) && (channel[0].extIRQPending)) { IRQType = IRQ_B_EXT; irqstat = 1; } else if ((channel[1].extIRQEnable) && (channel[1].extIRQPending)) { IRQType = IRQ_A_EXT; irqstat = 1; } } else { IRQType = IRQ_NONE; } // printf("SCC: irqstat %d, last %d\n", irqstat, lastIRQStat); // printf("ch0: en %d pd %d ch1: en %d pd %d\n", channel[0].txIRQEnable, channel[0].txIRQPending, channel[1].txIRQEnable, channel[1].txIRQPending); // don't spam the driver with unnecessary transitions if (irqstat != lastIRQStat) { lastIRQStat = irqstat; // tell the driver the new IRQ line status if possible #if LOG_SCC printf("SCC8530 IRQ status => %d\n", irqstat); #endif if(!intrq_cb.isnull()) intrq_cb(irqstat); } }
void scc8530_t::acknowledge() { if(!intrq_cb.isnull()) intrq_cb(0); }