Software Library API naibrd 1.62
See all documentation at naii.docs.com
Interrupt Functions

Functions

NAIBRDFUNC nai_status_t NAIAPI naibrd_DirectInterrupts (int32_t cardIndex, nai_intf_t intf)
 Specified to which interface the card should direct interrupts.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_SetVMEInterruptLevel (int32_t cardIndex, uint8_t level)
 Sets the VME interrupt level of the card.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_GetVMEInterruptLevel (int32_t cardIndex, uint8_t *level)
 Gets the VME interrupt level of the card.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_InstallISR (int32_t cardIndex, naibrd_irq_id_t irq_id, nai_isr_t isr, void *param)
 Handles associating the Interrupt Service Routine for PCI and Ethernet communication.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_HookVector (int32_t cardIndex, uint32_t vector)
 Handles associating the interrupt vector to an interrupt driven Ethernet message.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_UninstallISR (int32_t cardIndex)
 Handles removing the interrupt associations (Interrupt Service Routine or Interrupt Driven Ethernet Messages).
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_GetOffboardInterruptVector (int32_t cardIndex, uint32_t *unVector)
 Handles retrieving the interrupt vector over the backplane.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_ClearOffboardInterrupt (int32_t cardIndex)
 Handles clearing an interrupt over the backplane.
 

Detailed Description


Function Documentation

◆ naibrd_ClearOffboardInterrupt()

NAIBRDFUNC nai_status_t NAIAPI naibrd_ClearOffboardInterrupt ( int32_t cardIndex)

Handles clearing an interrupt over the backplane.

Parameters
cardIndex: (Input) Logical Card Index assigned to connection with the NAI_BOARD (0 - NAI_MAX_CARDS-1).
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_NOT_OPEN when handle to board is invalid.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported or the interrupt level address is invalid.

◆ naibrd_DirectInterrupts()

NAIBRDFUNC nai_status_t NAIAPI naibrd_DirectInterrupts ( int32_t cardIndex,
nai_intf_t intf )

Specified to which interface the card should direct interrupts.

Parameters
cardIndex: (Input) Logical Card Index assigned to connection with the NAI_BOARD (0 - NAI_MAX_CARDS-1).
intf: (Input) The interface to send interrupts.
Returns
  • NAI_SUCCESS when the board is ready.
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_INVALID_VALUE when the interface is invalid.
  • NAI_ERROR_NOT_SUPPORTED if naibrd does not support directing interrupts for that card.
  • An error returned by the dirIntFnc specified by naibrd_SetDirectInterruptFnc.

◆ naibrd_GetOffboardInterruptVector()

NAIBRDFUNC nai_status_t NAIAPI naibrd_GetOffboardInterruptVector ( int32_t cardIndex,
uint32_t * unVector )

Handles retrieving the interrupt vector over the backplane.

Parameters
cardIndex: (Input) Logical Card Index assigned to connection with the NAI_BOARD (0 - NAI_MAX_CARDS-1).
unVector: (Output) The interrupt vector.
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_NOT_OPEN when handle to board is invalid.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported or the interrupt level address is invalid.

◆ naibrd_GetVMEInterruptLevel()

NAIBRDFUNC nai_status_t NAIAPI naibrd_GetVMEInterruptLevel ( int32_t cardIndex,
uint8_t * level )

Gets the VME interrupt level of the card.

Parameters
cardIndex: (Input) Logical Card Index assigned to connection with the NAI_BOARD (0 - NAI_MAX_CARDS-1).
level: (Output) The VME interrupt level.
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_NOT_OPEN when handle to board is invalid.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported or the interrupt level address is invalid.

◆ naibrd_HookVector()

NAIBRDFUNC nai_status_t NAIAPI naibrd_HookVector ( int32_t cardIndex,
uint32_t vector )

Handles associating the interrupt vector to an interrupt driven Ethernet message.

Parameters
cardIndex: (Input) Logical Card Index assigned to connection with the NAI_BOARD (0 - NAI_MAX_CARDS-1).
vector: (Input) Interrupt vector.
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_NOT_OPEN when handle to board is invalid.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported or the interrupt level address is invalid.

◆ naibrd_InstallISR()

NAIBRDFUNC nai_status_t NAIAPI naibrd_InstallISR ( int32_t cardIndex,
naibrd_irq_id_t irq_id,
nai_isr_t isr,
void * param )

Handles associating the Interrupt Service Routine for PCI and Ethernet communication.

Parameters
cardIndex: (Input) Logical Card Index assigned to connection with the NAI_BOARD (0 - NAI_MAX_CARDS-1).
irq_id: (Input) Interrupt Request identification refer to naibrd_irq_id definition.
isr: (Input) Interrupt Service Routine.
param: (Input) parameters used by the interrupt service routine.
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_NOT_OPEN when handle to board is invalid.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported or the interrupt level address is invalid.

◆ naibrd_SetVMEInterruptLevel()

NAIBRDFUNC nai_status_t NAIAPI naibrd_SetVMEInterruptLevel ( int32_t cardIndex,
uint8_t level )

Sets the VME interrupt level of the card.

Parameters
cardIndex: (Input) Logical Card Index assigned to connection with the NAI_BOARD (0 - NAI_MAX_CARDS-1).
level: (Input) The VME interupt level.
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_NOT_OPEN when handle to board is invalid.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported or the interrupt level address is invalid.

◆ naibrd_UninstallISR()

NAIBRDFUNC nai_status_t NAIAPI naibrd_UninstallISR ( int32_t cardIndex)

Handles removing the interrupt associations (Interrupt Service Routine or Interrupt Driven Ethernet Messages).

Parameters
cardIndex: (Input) Logical Card Index assigned to connection with the NAI_BOARD (0 - NAI_MAX_CARDS-1).
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_NOT_OPEN when handle to board is invalid.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported or the interrupt level address is invalid.