====== cpunum_set_irq_callback() ====== Install a driver callback for IRQ acknowledge. This callback is used to get a vector for an IRQ line. ===== Syntax ===== ==== Declaration ==== Declared in ''src/emu/cpuint.h'' as void cpunum_set_irq_callback(int cpunum, int (*callback)(int irqline)); ==== Parameters ==== * ''cpunum'' -- Index to the CPU * ''*callback'' -- Pointer to a function that will be called when this IRQ is fired. ==== Returns ==== Nothing. ===== Example ===== static int irq_callback(int irq) { return vectors[current_vector]; } cpunum_set_irq_callback(0, irq_callback); Function ''irq_callback'' will be called when the first CPU acknowledges an interrupt. As vector the CPU will receive a value from the array ''vectors''. ===== See also ===== {{topic>reference +cpu +irq&list&nodate&nodesc&nouser¬ags}} {{tag>reference mame cpu irq}}