ado_attach_interrupt
![]() |
![]() |
![]() |
![]() |
ado_attach_interrupt()
Attach a handler function to an interrupt
Synopsis:
#include <audio_driver.h>
int32_t ado_attach_interrupt (
ado_card_t *card,
int32_t irq,
void (*handler) (
HW_CONTEXT_T *hw_context,
int32_t irqnum ),
HW_CONTEXT_T *hw_context );
Arguments:
- card
- The card argument that io-audio passed to your Audio HW DLL's ctrl_init() function (see the Organization of a Driver chapter).
- irq
- The interrupt request number.
- handler
- The handler function. When the handler is invoked, the hw_context and the IRQ number are passed in as arguments.
- hw_context
- A pointer to your Audio HW DLL's context-specific data, which you created in the ctrl_init() function.
Description:
The ado_attach_interrupt() function attaches a handler function to an interrupt.
The io-audio manager automatically detaches any interrupt handlers when your Audio HW DLL is unmounted.
Returns:
0 on success, or a negative number if an error occurred (errno is set).
Errors:
- EAGAIN
- Insufficient system resources to create a thread.
Classification:
QNX Neutrino
| Safety: | |
|---|---|
| Cancellation point | No |
| Interrupt handler | No |
| Signal handler | No |
| Thread | No |
![]() |
![]() |
![]() |
![]() |
![[Previous]](../prev.gif)
![[Contents]](../contents.gif)
![[Index]](../keyword_index.gif)
![[Next]](../next.gif)