XgInterrupt


Functions

void CallHandler (IRQ_HANDLER *irh)
 Call a registered interrupt handler.
int NutIrqDisable (IRQ_HANDLER *irq)
 Disable a specified interrupt.
int NutIrqEnable (IRQ_HANDLER *irq)
 Enable a specified interrupt.
int NutIrqSetMode (IRQ_HANDLER *irq, int mode)
 Modify the interrupt mode.
int NutIrqSetPriority (IRQ_HANDLER *irq, int level)
 Modify the priority level of an interrupt.
int NutRegisterIrqHandler (IRQ_HANDLER *irq, void(*handler)(void *), void *arg)
 Register an interrupt handler.


Function Documentation

int NutIrqDisable ( IRQ_HANDLER *  irq  ) 

Disable a specified interrupt.

Parameters:
irq Interrupt to disable.
Returns:
0 on success, -1 otherwise.

int NutIrqEnable ( IRQ_HANDLER *  irq  ) 

Enable a specified interrupt.

Parameters:
irq Interrupt to enable.
Returns:
0 on success, -1 otherwise.

int NutIrqSetMode ( IRQ_HANDLER *  irq,
int  mode 
)

Modify the interrupt mode.

The function returns the old mode, which makes it easy to temporarily switch to another mode and later set back the old one.

Note:
Not all targets support all modes. Check the hardware data sheet for valid levels.
Parameters:
irq Interrupt to modify.
mode New priority level.
Returns:
Old mode or -1 in case of an error.

int NutIrqSetPriority ( IRQ_HANDLER *  irq,
int  level 
)

Modify the priority level of an interrupt.

The function returns the old priority, which makes it easy to temporarily switch to another priority and later set back the old one.

Note:
Not all targets support dynamic interrupt prioritization. Check the hardware data sheet for valid levels.
Parameters:
irq Interrupt to modify.
level New priority level.
Returns:
Old priority level or -1 in case of an error.

int NutRegisterIrqHandler ( IRQ_HANDLER *  irq,
void(*)(void *)  handler,
void *  arg 
)

Register an interrupt handler.

This function is typically called by device drivers, but applications may also implement their local interrupt handlers.

Parameters:
irq Interrupt to be associated with this handler.
handler This routine will be called by Nut/OS, when the specified interrupt occurs.
arg Argument to be passed to the interrupt handler.
Returns:
0 on success, -1 otherwise.


Generated on Tue Jan 23 21:12:31 2007 for BTnut System Software by doxygen 1.4.7