BL4S100 User’s Manual
75
4.4.3 Rabbit RIO Interrupt Handlers
addISRIn
int addISRIn(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 configurable I/O pin. The interrupt service routine (ISR) is
always disabled when created. Call
enableISR()
to enable the interrupt service
routine. The ISR handler function is responsible for clearing the interrupt(s) within the
hosting RIO block when called.
PARAMETERS
channel
digital input channel to bind to ISR, 0–11 (IN0–IN11)
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
addISROut, tickISR, enableISR, setIER