BL4S200 User’s Manual
105
addISR_H
int addISR_H(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 high-current output pin. The interrupt service routine (ISR)
is always 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
high-current output channel to bind to ISR, 0–7
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
addISR, tickISR, enableISR, setIER