Skip to content

BindIrq

Delivers a device's interrupt as an event bit.

Number Selector Blocking Since
0x0A SVC_BIND EVENT_IRQ (2) no 2.0
Err BindIrq(Handle ev_handle, Handle dev_handle, uint32_t bit);

Registers: (EVENT_IRQ, event, device, bit) -> r0 status

The kernel masks the interrupt line each time it fires; call IrqRearm() once the device's interrupt source has been cleared.

Parameters

Name Direction Description
ev_handle in Event handle with PERM_CNTL.
dev_handle in Device handle with PERM_MAP whose interrupt to take.
bit in Bit number, 0-30.

Returns

ZUZU_OK, or an error code.

Errors

Error Condition
ERR_BADHANDLE A handle is not live.
ERR_BADTYPE ev_handle is not an event, or dev_handle is not a device.
ERR_NOPERM ev_handle lacks PERM_CNTL, or dev_handle lacks PERM_MAP.
ERR_BADARG The device has no interrupt, or bit is out of range.
ERR_BUSY Another space has already bound the interrupt.
ERR_DEAD The event has been destroyed.