Xenomai  3.0.5
Interrupt management services
Collaboration diagram for Interrupt management services:

Functions

unsigned int a4l_get_irq (struct a4l_device *dev)
 Get the interrupt number in use for a specific device. More...
 
int a4l_request_irq (struct a4l_device *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 (struct a4l_device *dev, unsigned int irq)
 Release an interrupt handler for a specific device. More...
 

Detailed Description

Function Documentation

◆ a4l_free_irq()

int a4l_free_irq ( struct a4l_device *  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.

◆ a4l_get_irq()

unsigned int a4l_get_irq ( struct a4l_device *  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.

References A4L_SUBD_AI, A4L_SUBD_AO, A4L_SUBD_CALIB, A4L_SUBD_COUNTER, A4L_SUBD_DI, A4L_SUBD_DIO, A4L_SUBD_DO, A4L_SUBD_MEMORY, A4L_SUBD_PROC, A4L_SUBD_SERIAL, A4L_SUBD_TIMER, A4L_SUBD_TYPES, and A4L_SUBD_UNUSED.

◆ a4l_request_irq()

int a4l_request_irq ( struct a4l_device *  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:
  • RTDM_IRQTYPE_SHARED: enable IRQ-sharing with other drivers (Warning: real-time drivers and non-real-time drivers cannot share an interrupt line).
  • RTDM_IRQTYPE_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.