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

Functions

NAIBRDFUNC nai_status_t NAIAPI naibrd_REF_SetInterruptEnable (int32_t cardIndex, int32_t module, int32_t channel, nai_ref_status_type_t type, bool_t enable)
 Sets the Interrupt Enable state for the specified Reference module channel and status type. When the interrupt is enabled, a fault on a channel will trigger an interrupt. By default, interrupts are disabled.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_REF_GetInterruptEnable (int32_t cardIndex, int32_t module, int32_t channel, nai_ref_status_type_t type, bool_t *outenable)
 Retrieves the Interrupt Enable state for the specified Reference module channel and status type. When the interrupt is enabled, a fault on a channel will trigger an interrupt. By default, interrupts are disabled.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_REF_SetInterruptEdgeLevel (int32_t cardIndex, int32_t module, int32_t channel, nai_ref_status_type_t type, nai_ref_edgelevel_t edgeLevel)
 Sets the Interrupt Edge/Level trigger setting for the specified Reference module channel and status type.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_REF_GetInterruptEdgeLevel (int32_t cardIndex, int32_t module, int32_t channel, nai_ref_status_type_t type, nai_ref_edgelevel_t *outedgeLevel)
 Retrieves the Interrupt Edge/Level trigger setting for the specified Reference module channel and status type.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_REF_SetInterruptVector (int32_t cardIndex, int32_t module, nai_ref_status_type_t type, uint32_t vector)
 Sets the Interrupt Vector associated with the specified status type for the specified Reference module.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_REF_GetInterruptVector (int32_t cardIndex, int32_t module, nai_ref_status_type_t type, uint32_t *outvector)
 Retrieves the Interrupt Vector associated with the specified status type for the specified Reference module.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_REF_SetInterruptSteering (int32_t cardIndex, int32_t module, nai_ref_status_type_t type, naibrd_int_steering_t steering)
 Sets the Interrupt Steering, which indicates the interrupt direction, for the specified Reference module and status type.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_REF_GetInterruptSteering (int32_t cardIndex, int32_t module, nai_ref_status_type_t type, naibrd_int_steering_t *outsteering)
 Retrieves the Interrupt Steering, which indicates the interrupt direction, for the specified Reference module and status type.
 

Detailed Description


Function Documentation

◆ naibrd_REF_GetInterruptEdgeLevel()

NAIBRDFUNC nai_status_t NAIAPI naibrd_REF_GetInterruptEdgeLevel ( int32_t cardIndex,
int32_t module,
int32_t channel,
nai_ref_status_type_t type,
nai_ref_edgelevel_t * outedgeLevel )

Retrieves the Interrupt Edge/Level trigger setting for the specified Reference module channel and status type.

Note: The Watchdog Timer Fault Interrupt Edge/Level trigger setting is mapped to the MSB (bit 31) of the Watchdog Timer Fault/CRC Fault Interrupt Edge/Level trigger setting register. The CRC Fault Interrupt Edge/Level trigger settings of each channel are channel-mapped in this register, starting with bit 0 for channel 1.

Parameters
cardIndex: (Input) Logical Card Index assigned to connection with the NAI_BOARD (0 - NAI_MAX_CARDS-1).
module: (Input) Module Number of the module to access (1 - [max modules for board]).
channel: (Input) Channel Number of the channel to access (1 - [max channels for module]).
type: (Input) Status Type: refer to nai_ref_status_type_t definition.
outedgeLevel: (Output) 0 for edge-triggered interrupts, 1 for level-triggered interrupts.
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_INVALID_MODULE when invalid module parameter is specified.
  • NAI_ERROR_NOT_OPEN when handle to board is invalid.
  • NAI_ERROR_INVALID_CHANNEL when invalid channel parameter is specified.
  • NAI_ERROR_INVALID_VALUE when invalid type parameter is specified.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.

◆ naibrd_REF_GetInterruptEnable()

NAIBRDFUNC nai_status_t NAIAPI naibrd_REF_GetInterruptEnable ( int32_t cardIndex,
int32_t module,
int32_t channel,
nai_ref_status_type_t type,
bool_t * outenable )

Retrieves the Interrupt Enable state for the specified Reference module channel and status type. When the interrupt is enabled, a fault on a channel will trigger an interrupt. By default, interrupts are disabled.

Note: The Watchdog Timer Fault Interrupt Enable setting is mapped to the MSB (bit 31) of the Watchdog Timer Fault/CRC Fault Interrupt Enable setting register. The CRC Fault Interrupt Enable settings of each channel are channel-mapped in this register, starting with bit 0 for channel 1.

Parameters
cardIndex: (Input) Logical Card Index assigned to connection with the NAI_BOARD (0 - NAI_MAX_CARDS-1).
module: (Input) Module Number of the module to access (1 - [max modules for board]).
channel: (Input) Channel Number of the channel to access (1 - [max channels for module]).
type: (Input) Status Type: refer to nai_ref_status_type_t definition.
outenable: (Output) 0 to disable, 1 to enable interrupt.
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_INVALID_MODULE when invalid module parameter is specified.
  • NAI_ERROR_NOT_OPEN when handle to board is invalid.
  • NAI_ERROR_INVALID_CHANNEL when invalid channel parameter is specified.
  • NAI_ERROR_INVALID_VALUE when invalid type parameter is specified.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.

◆ naibrd_REF_GetInterruptSteering()

NAIBRDFUNC nai_status_t NAIAPI naibrd_REF_GetInterruptSteering ( int32_t cardIndex,
int32_t module,
nai_ref_status_type_t type,
naibrd_int_steering_t * outsteering )

Retrieves the Interrupt Steering, which indicates the interrupt direction, for the specified Reference module and status type.

Note: The Watchdog Timer Fault Interrupt and the CRC Fault Interrupt both share the same interrupt number.

Parameters
cardIndex: (Input) Logical Card Index assigned to connection with the NAI_BOARD (0 - NAI_MAX_CARDS-1).
module: (Input) Module Number of the module to access (1 - [max modules for board]).
type: (Input) Status Type: refer to nai_ref_status_type_t definition.
outsteering: (Output) Interrupt Steering: refer to naibrd_int_steering_t definition.
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_INVALID_MODULE when invalid module parameter is specified.
  • NAI_ERROR_NOT_OPEN when handle to board is invalid.
  • NAI_ERROR_INVALID_VALUE when invalid type parameter is specified.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.

◆ naibrd_REF_GetInterruptVector()

NAIBRDFUNC nai_status_t NAIAPI naibrd_REF_GetInterruptVector ( int32_t cardIndex,
int32_t module,
nai_ref_status_type_t type,
uint32_t * outvector )

Retrieves the Interrupt Vector associated with the specified status type for the specified Reference module.

Note: The Watchdog Timer Fault Interrupt and the CRC Fault Interrupt both share the same interrupt number.

Parameters
cardIndex: (Input) Logical Card Index assigned to connection with the NAI_BOARD (0 - NAI_MAX_CARDS-1).
module: (Input) Module Number of the module to access (1 - [max modules for board]).
type: (Input) Status Type: refer to nai_ref_status_type_t definition.
outvector: (Output) Interrupt Vector.
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_INVALID_MODULE when invalid module parameter is specified.
  • NAI_ERROR_NOT_OPEN when handle to board is invalid.
  • NAI_ERROR_INVALID_VALUE when invalid type parameter is specified.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.

◆ naibrd_REF_SetInterruptEdgeLevel()

NAIBRDFUNC nai_status_t NAIAPI naibrd_REF_SetInterruptEdgeLevel ( int32_t cardIndex,
int32_t module,
int32_t channel,
nai_ref_status_type_t type,
nai_ref_edgelevel_t edgeLevel )

Sets the Interrupt Edge/Level trigger setting for the specified Reference module channel and status type.

Note: The Watchdog Timer Fault Interrupt Edge/Level trigger setting is mapped to the MSB (bit 31) of the Watchdog Timer Fault/CRC Fault Interrupt Edge/Level trigger setting register. The CRC Fault Interrupt Edge/Level trigger settings of each channel are channel-mapped in this register, starting with bit 0 for channel 1.

Parameters
cardIndex: (Input) Logical Card Index assigned to connection with the NAI_BOARD (0 - NAI_MAX_CARDS-1).
module: (Input) Module Number of the module to access (1 - [max modules for board]).
channel: (Input) Channel Number of the channel to access (1 - [max channels for module]).
type: (Input) Status Type: refer to nai_ref_status_type_t definition.
edgeLevel: (Input) 0 for edge-triggered interrupts, 1 for level-triggered interrupts.
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_INVALID_MODULE when invalid module parameter is specified.
  • NAI_ERROR_NOT_OPEN when handle to board is invalid.
  • NAI_ERROR_INVALID_CHANNEL when invalid channel parameter is specified.
  • NAI_ERROR_INVALID_VALUE when invalid type parameter or invalid edgeLevel parameter is specified.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.

◆ naibrd_REF_SetInterruptEnable()

NAIBRDFUNC nai_status_t NAIAPI naibrd_REF_SetInterruptEnable ( int32_t cardIndex,
int32_t module,
int32_t channel,
nai_ref_status_type_t type,
bool_t enable )

Sets the Interrupt Enable state for the specified Reference module channel and status type. When the interrupt is enabled, a fault on a channel will trigger an interrupt. By default, interrupts are disabled.

Note: The Watchdog Timer Fault Interrupt Enable setting is mapped to the MSB (bit 31) of the Watchdog Timer Fault/CRC Fault Interrupt Enable setting register. The CRC Fault Interrupt Enable settings of each channel are channel-mapped in this register, starting with bit 0 for channel 1.

Parameters
cardIndex: (Input) Logical Card Index assigned to connection with the NAI_BOARD (0 - NAI_MAX_CARDS-1).
module: (Input) Module Number of the module to access (1 - [max modules for board]).
channel: (Input) Channel Number of the channel to access (1 - [max channels for module]).
type: (Input) Status Type: refer to nai_ref_status_type_t definition.
enable: (Input) 0 to disable, 1 to enable interrupt.
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_INVALID_MODULE when invalid module parameter is specified.
  • NAI_ERROR_NOT_OPEN when handle to board is invalid.
  • NAI_ERROR_INVALID_CHANNEL when invalid channel parameter is specified.
  • NAI_ERROR_INVALID_VALUE when invalid type parameter or invalid enable parameter is specified.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.

◆ naibrd_REF_SetInterruptSteering()

NAIBRDFUNC nai_status_t NAIAPI naibrd_REF_SetInterruptSteering ( int32_t cardIndex,
int32_t module,
nai_ref_status_type_t type,
naibrd_int_steering_t steering )

Sets the Interrupt Steering, which indicates the interrupt direction, for the specified Reference module and status type.

Note: The Watchdog Timer Fault Interrupt and the CRC Fault Interrupt both share the same interrupt number.

Parameters
cardIndex: (Input) Logical Card Index assigned to connection with the NAI_BOARD (0 - NAI_MAX_CARDS-1).
module: (Input) Module Number of the module to access (1 - [max modules for board]).
type: (Input) Status Type: refer to nai_ref_status_type_t definition.
steering: (Input) Interrupt Steering: refer to naibrd_int_steering_t definition.
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_INVALID_MODULE when invalid module parameter is specified.
  • NAI_ERROR_NOT_OPEN when handle to board is invalid.
  • NAI_ERROR_INVALID_VALUE when invalid type parameter or invalid steering parameter is specified.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.

◆ naibrd_REF_SetInterruptVector()

NAIBRDFUNC nai_status_t NAIAPI naibrd_REF_SetInterruptVector ( int32_t cardIndex,
int32_t module,
nai_ref_status_type_t type,
uint32_t vector )

Sets the Interrupt Vector associated with the specified status type for the specified Reference module.

Note: The Watchdog Timer Fault Interrupt and the CRC Fault Interrupt both share the same interrupt number.

Parameters
cardIndex: (Input) Logical Card Index assigned to connection with the NAI_BOARD (0 - NAI_MAX_CARDS-1).
module: (Input) Module Number of the module to access (1 - [max modules for board]).
type: (Input) Status Type: refer to nai_ref_status_type_t definition.
vector: (Input) Interrupt Vector.
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_INVALID_MODULE when invalid module parameter is specified.
  • NAI_ERROR_NOT_OPEN when handle to board is invalid.
  • NAI_ERROR_INVALID_VALUE when invalid type parameter is specified.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.