Software Library API naibrd 1.62
See all documentation at naii.docs.com
Raw Register Access Functions

Functions

NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_SetControlRaw (int32_t cardIndex, int32_t module, int32_t channel, nai_can_ctrl_t controlraw)
 Set the control register value for a given channel. The valid control flags are defined by the NAI_CAN_CTRL enumeration. NOTE: CAN Configuration calls should be performed between calls to naibrd_CAN_StartConfigChanges and naibrd_CAN_ApplyConfigChanges.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_GetControlRaw (int32_t cardIndex, int32_t module, int32_t channel, nai_can_ctrl_t *outcontrolraw)
 Get the control register value for a given channel. The valid control flags are defined by the NAI_CAN_CTRL enumeration.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_SetFilterControlRaw (int32_t cardIndex, int32_t module, int32_t channel, nai_can_filt_ctrl_t filterControlRaw)
 Set the filter control register value for a given channel. The valid control flags are defined by the NAI_CAN_FILT_CTRL enumeration. Gen5 Only NOTE: Configuring of filters should be performed between calls to naibrd_CAN_StartFilterChanges and naibrd_CAN_ApplyFilterChanges.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_GetFilterControlRaw (int32_t cardIndex, int32_t module, int32_t channel, nai_can_filt_ctrl_t *outFilterControlRaw)
 Get the filter control register value for a given channel. The valid control flags are defined by the NAI_CAN_FILT_CTRL enumeration. Gen5 Only.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_SetIntEnableRaw (int32_t cardIndex, int32_t module, int32_t enableraw)
 Set the value of the Interrupt enable register.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_GetIntEnableRaw (int32_t cardIndex, int32_t module, int32_t *outenableraw)
 Get the value of the Interrupt enable register.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_ClearStatusRaw (int32_t cardIndex, int32_t module, nai_can_status_type_t type, uint32_t rawdata)
 clear the interrupt status bits specified in the rawdata. Valid interrupt status flags are defined by the nai_can_status_type enumeration.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_GetStatusRaw (int32_t cardIndex, int32_t module, nai_can_status_type_t type, nai_status_bit_t *outstatusraw)
 Get the interrupt status for all channel. Valid interrupt status flags are defined by the nai_can_status_type enumeration.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_GetFifoStatusRaw (int32_t cardIndex, int32_t module, int32_t channel, uint32_t *outFifoStatus)
 Get the FIFO status for specified channel.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_GetDropCount (int32_t cardIndex, int32_t module, int32_t channel, int32_t *outDropCountVal)
 Get the Drop Count for specified channel. (How many CAN msgs known to have been dropped)
 

Detailed Description


Function Documentation

◆ naibrd_CAN_ClearStatusRaw()

NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_ClearStatusRaw ( int32_t cardIndex,
int32_t module,
nai_can_status_type_t type,
uint32_t rawdata )

clear the interrupt status bits specified in the rawdata. Valid interrupt status flags are defined by the nai_can_status_type enumeration.

Parameters
cardIndex: (Input) Logical Card Index assigned to connect 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) CAN Status Type - refer to nai_can_status_type_t definition.
rawdata: (Output) Interrupt status bits to write
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_SUPPORTED when function is not supported.

◆ naibrd_CAN_GetControlRaw()

NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_GetControlRaw ( int32_t cardIndex,
int32_t module,
int32_t channel,
nai_can_ctrl_t * outcontrolraw )

Get the control register value for a given channel. The valid control flags are defined by the NAI_CAN_CTRL enumeration.

Parameters
cardIndex: (Input) Logical Card Index assigned to connect 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]).
outcontrolraw: (Output) The control register's current state.
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_INVALID_CHANNEL when invalid channel parameter is specified.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.

◆ naibrd_CAN_GetDropCount()

NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_GetDropCount ( int32_t cardIndex,
int32_t module,
int32_t channel,
int32_t * outDropCountVal )

Get the Drop Count for specified channel. (How many CAN msgs known to have been dropped)

Parameters
cardIndex: (Input) Logical Card Index assigned to connect 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]).
outDropCountVal: (Output) CAN message drop count.
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_SUPPORTED when function is not supported.

◆ naibrd_CAN_GetFifoStatusRaw()

NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_GetFifoStatusRaw ( int32_t cardIndex,
int32_t module,
int32_t channel,
uint32_t * outFifoStatus )

Get the FIFO status for specified channel.

Parameters
cardIndex: (Input) Logical Card Index assigned to connect 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]).
outFifoStatus: (Output) FIFO status.
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_SUPPORTED when function is not supported.

◆ naibrd_CAN_GetFilterControlRaw()

NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_GetFilterControlRaw ( int32_t cardIndex,
int32_t module,
int32_t channel,
nai_can_filt_ctrl_t * outFilterControlRaw )

Get the filter control register value for a given channel. The valid control flags are defined by the NAI_CAN_FILT_CTRL enumeration. Gen5 Only.

Parameters
cardIndex: (Input) Logical Card Index assigned to connect 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]).
outFilterControlRaw: (Output) The filter control register's current state.
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_INVALID_CHANNEL when invalid channel parameter is specified.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.

◆ naibrd_CAN_GetIntEnableRaw()

NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_GetIntEnableRaw ( int32_t cardIndex,
int32_t module,
int32_t * outenableraw )

Get the value of the Interrupt enable register.

Parameters
cardIndex: (Input) Logical Card Index assigned to connect with the NAI_BOARD (0 - NAI_MAX_CARDS-1).
module: (Input) Module Number of the module to access (1 - [max modules for board]).
outenableraw: (Output) The current state of the Interrupt enable register.
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_SUPPORTED when function is not supported.

◆ naibrd_CAN_GetStatusRaw()

NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_GetStatusRaw ( int32_t cardIndex,
int32_t module,
nai_can_status_type_t type,
nai_status_bit_t * outstatusraw )

Get the interrupt status for all channel. Valid interrupt status flags are defined by the nai_can_status_type enumeration.

Parameters
cardIndex: (Input) Logical Card Index assigned to connect 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) CAN Status Type - refer to nai_can_status_type_t definition.
outstatusraw: (Output) Interrupt status.
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_SUPPORTED when function is not supported.

◆ naibrd_CAN_SetControlRaw()

NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_SetControlRaw ( int32_t cardIndex,
int32_t module,
int32_t channel,
nai_can_ctrl_t controlraw )

Set the control register value for a given channel. The valid control flags are defined by the NAI_CAN_CTRL enumeration. NOTE: CAN Configuration calls should be performed between calls to naibrd_CAN_StartConfigChanges and naibrd_CAN_ApplyConfigChanges.

Parameters
cardIndex: (Input) Logical Card Index assigned to connect 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]).
controlraw: (Input) The control register value to set.
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_INVALID_CHANNEL when invalid channel parameter is specified.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.

◆ naibrd_CAN_SetFilterControlRaw()

NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_SetFilterControlRaw ( int32_t cardIndex,
int32_t module,
int32_t channel,
nai_can_filt_ctrl_t filterControlRaw )

Set the filter control register value for a given channel. The valid control flags are defined by the NAI_CAN_FILT_CTRL enumeration. Gen5 Only NOTE: Configuring of filters should be performed between calls to naibrd_CAN_StartFilterChanges and naibrd_CAN_ApplyFilterChanges.

Parameters
cardIndex: (Input) Logical Card Index assigned to connect 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]).
filterControlRaw: (Input) The filter control register value to set.
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_INVALID_CHANNEL when invalid channel parameter is specified.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.

◆ naibrd_CAN_SetIntEnableRaw()

NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_SetIntEnableRaw ( int32_t cardIndex,
int32_t module,
int32_t enableraw )

Set the value of the Interrupt enable register.

Parameters
cardIndex: (Input) Logical Card Index assigned to connect with the NAI_BOARD (0 - NAI_MAX_CARDS-1).
module: (Input) Module Number of the module to access (1 - [max modules for board]).
enableraw: (Input) Interrupt enable register value to set.
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_SUPPORTED when function is not supported.