User`s manual

BL4S100 Users Manual 76
addISROut
int addISROut(int channel, int ier, void (*handler)());
FUNCTION DESCRIPTION
Adds an interrupt handler for the interrupts specified in the ier parameter for the given
RIO block hosting the given digital output pin. The interrupt service routine (ISR) is al-
ways disabled when created. Call
enableISR() to enable the ISR. The ISR handler
given is responsible for clearing the interrupt(s) within the hosting RIO block.
PARAMETERS
channel digital output channel to bind to ISR, 0–7 (OUT0–OUT7)
ier bit mask of interrupt(s) this handler services:
BL_IER_DQE — decrement/quadrature/end
BL_IER_IIB — increment/inphase/begin
BL_IER_ROLL_D — counter rollover on decrement
BL_IER_ROLL_I — counter rollover on increment
BL_IER_MATCH3 — Match 3 condition
BL_IER_MATCH2 — Match 2 condition
BL_IER_MATCH1 — Match 1 condition
BL_IER_MATCH0 — Match 0 condition
handler pointer to the interrupt service function
RETURN VALUE
Success — returns the handler ID number (0..RSB_MAX_ISR-1).
-EINVAL— Invalid parameter given.
-ENOSPC — No more room in ISR table (increase RSB_MAX_ISR).
SEE ALSO
addISRIn, tickISR, enableISR, setIER