Xenomai API  2.6.5
Interrupt management services
Collaboration diagram for Interrupt management services:

Functions

unsigned int a4l_get_irq (a4l_dev_t *dev)
 Get the interrupt number in use for a specific device. More...
 
int a4l_request_irq (a4l_dev_t *dev, unsigned int irq, a4l_irq_hdlr_t handler, unsigned long flags, void *cookie)
 Register an interrupt handler for a specific device. More...
 
int a4l_free_irq (a4l_dev_t *dev, unsigned int irq)
 Release an interrupt handler for a specific device. More...
 

Detailed Description

Function Documentation

int a4l_free_irq ( a4l_dev_t *  dev,
unsigned int  irq 
)

Release an interrupt handler for a specific device.

Parameters
[in]devDevice descriptor structure
[in]irqLine number of the addressed IRQ
Returns
0 on success, otherwise negative error code.
unsigned int a4l_get_irq ( a4l_dev_t *  dev)

Get the interrupt number in use for a specific device.

Parameters
[in]devDevice descriptor structure
Returns
the line number used or A4L_IRQ_UNUSED if no interrupt is registered.
int a4l_request_irq ( a4l_dev_t *  dev,
unsigned int  irq,
a4l_irq_hdlr_t  handler,
unsigned long  flags,
void *  cookie 
)

Register an interrupt handler for a specific device.

Parameters
[in]devDevice descriptor structure
[in]irqLine number of the addressed IRQ
[in]handlerInterrupt handler
[in]flagsRegistration flags:
  • A4L_IRQ_SHARED: enable IRQ-sharing with other drivers (Warning: real-time drivers and non-real-time drivers cannot share an interrupt line).
  • A4L_IRQ_EDGE: mark IRQ as edge-triggered (Warning: this flag is meaningless in RTDM-less context).
  • A4L_IRQ_DISABLED: keep IRQ disabled when calling the action handler (Warning: this flag is ignored in RTDM-enabled configuration).
[in]cookiePointer to be passed to the interrupt handler on invocation
Returns
0 on success, otherwise negative error code.