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

Functions

NAIBRDFUNC nai_status_t NAIAPI naibrd_ENC_SetInterruptEnable (int32_t cardIndex, int32_t module, int32_t channel, nai_enc_interrupt_t type, bool_t intEnable)
 Sets the interrupt enable for the specified Encoder interrupt type and channel. Interval timer vector and multicycle read enable share the same register for all channels. Configuring the enable for these interrupt types will set the enable for all channels.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_ENC_GetInterruptEnable (int32_t cardIndex, int32_t module, int32_t channel, nai_enc_interrupt_t type, bool_t *outintEnable)
 Gets the interrupt enable for the specified Encoder interrupt type and channel. Interval timer vector and multicycle read enable share the same register for all channels. Configuring the enable for these interrupt types will set the enable for all channels.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_ENC_SetInterruptVector (int32_t cardIndex, int32_t module, int32_t channel, nai_enc_interrupt_t type, uint32_t vector)
 Sets the interrupt vector for the specified Encoder interrupt type and channel. Interval timer vector and multicycle read vector share the same register for all channels. Configuring the vector for these interrupt types will set the vector for all channels.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_ENC_GetInterruptVector (int32_t cardIndex, int32_t module, int32_t channel, nai_enc_interrupt_t type, uint32_t *outVector)
 Gets the interrupt vector for the specified Encoder interrupt type and channel. Interval timer vector and multicycle read vector share the same register for all channels. Configuring the vector for these interrupt types will set the vector for all channels.
 

Detailed Description


Function Documentation

◆ naibrd_ENC_GetInterruptEnable()

NAIBRDFUNC nai_status_t NAIAPI naibrd_ENC_GetInterruptEnable ( int32_t cardIndex,
int32_t module,
int32_t channel,
nai_enc_interrupt_t type,
bool_t * outintEnable )

Gets the interrupt enable for the specified Encoder interrupt type and channel. Interval timer vector and multicycle read enable share the same register for all channels. Configuring the enable for these interrupt types will set the enable for all channels.

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) Interrupt Type: refer to nai_enc_interrupt_t definition.
outintEnable: (Output) Interrupt enable.
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_INVALID_MODULE when invalid card 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_NOT_SUPPORTED when function is not supported.

◆ naibrd_ENC_GetInterruptVector()

NAIBRDFUNC nai_status_t NAIAPI naibrd_ENC_GetInterruptVector ( int32_t cardIndex,
int32_t module,
int32_t channel,
nai_enc_interrupt_t type,
uint32_t * outVector )

Gets the interrupt vector for the specified Encoder interrupt type and channel. Interval timer vector and multicycle read vector share the same register for all channels. Configuring the vector for these interrupt types will set the vector for all channels.

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) Interrupt Type: refer to nai_enc_interrupt_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 card 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_NOT_SUPPORTED when function is not supported.

◆ naibrd_ENC_SetInterruptEnable()

NAIBRDFUNC nai_status_t NAIAPI naibrd_ENC_SetInterruptEnable ( int32_t cardIndex,
int32_t module,
int32_t channel,
nai_enc_interrupt_t type,
bool_t intEnable )

Sets the interrupt enable for the specified Encoder interrupt type and channel. Interval timer vector and multicycle read enable share the same register for all channels. Configuring the enable for these interrupt types will set the enable for all channels.

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) Interrupt Type: refer to nai_enc_interrupt_t definition.
intEnable: (Input) Interrupt enable.
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_INVALID_MODULE when invalid card 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_NOT_SUPPORTED when function is not supported.

◆ naibrd_ENC_SetInterruptVector()

NAIBRDFUNC nai_status_t NAIAPI naibrd_ENC_SetInterruptVector ( int32_t cardIndex,
int32_t module,
int32_t channel,
nai_enc_interrupt_t type,
uint32_t vector )

Sets the interrupt vector for the specified Encoder interrupt type and channel. Interval timer vector and multicycle read vector share the same register for all channels. Configuring the vector for these interrupt types will set the vector for all channels.

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) Interrupt Type: refer to nai_enc_interrupt_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 card 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_NOT_SUPPORTED when function is not supported.