KnIoAttachIrq()

August 2, 2023

ID kn_io_attach_irq

This function is declared in the coresrv/io/irq.h file.

Retcode KnIoAttachIrq(Handle rid, rtl_uint32_t flags, Handle *handle);

This function attaches the calling thread to the interrupt.

Input parameters:

  • rid is the interrupt handle received by using the KnRegisterIrq() call.
  • flags refer to the interrupt flags.

Output parameter handle contains the IPC handle that will be used by the calling thread to wait for the interrupt after making the Recv() call.

If successful, the function returns rcOk, otherwise it returns an error code.

Interrupt flags

  • IRQ_LEVEL_LOW indicates low level generation.
  • IRQ_LEVEL_HIGH indicates high level generation.
  • IRQ_EDGE_RAISE indicates rising edge generation.
  • IRQ_EDGE_FALL indicates falling edge generation.
  • IRQ_SHARED indicates a shared interrupt.
  • IRQ_PRIO_LOW indicates a low-priority interrupt.
  • IRQ_PRIO_NORMAL indicates normal priority.
  • IRQ_PRIO_HIGH indicates high priority.
  • IRQ_PRIO_RT indicates real-time priority.

Did you find this article helpful?
What can we do better?
Thank you for your feedback! You're helping us improve.
Thank you for your feedback! You're helping us improve.