Skip to main content
← PSoXide SDK guides and examples · SDK 80d1c329e977 · All Cargo features enabled; check feature gates before use.

Module irq

Module irq 

Source
Expand description

Interrupt controller: pending and enabled sources.

The register addresses and source bit positions live in [psx_hw::irq].

Modules§

source
Moved to [psx_hw::irq::source].

Functions§

ackDeprecated
Renamed to acknowledge.
acknowledge
Acknowledge pending bits by writing !(bits) – the hardware AND-accumulates, so any bit left 1 in the written value is preserved, any bit that was 0 is cleared.
disable_cpu_interrupts⚠
Clear the CPU’s interrupt-enable bit (COP0 SR.IEc) and report whether it was set, so restore_cpu_interrupts can put it back. Sections nest.
keep_enabled_while_polling
Ask the polled drivers that cut I_MASK down to VBlank for the length of a stream (the CD SectorReader) to leave bits enabled. For a source whose handler is installed and works alone through interrupts, such as the pad engine’s IRQ7 and root counter 0: cut from the mask, its transaction never advances for as long as the stream runs, and the engine abandons and faults one transaction per VBlank. Call it from foreground code.
mask
Enabled interrupt sources (the mask register).
pending
Pending interrupt sources, one bit per [psx_hw::irq::source] position.
polling_keep
The sources keep_enabled_while_polling holds enabled.
release_polling_keep
Undo keep_enabled_while_polling for bits.
restore_cpu_interrupts⚠
Put back the interrupt-enable bit disable_cpu_interrupts found.
set_mask
Set the mask register (who can interrupt the CPU).
without_interrupts
Run f with CPU interrupts masked, then restore the previous state.