Software Library API naibrd 2.24.0
See all documentation at naii.docs.com

Functions

NAIBRDFUNC int32_t NAIAPI naibrd_CAN_GetChannelCount (uint32_t modId)
 Retrieves the number of channels for the specified CAN Module ID.
 
NAIBRDFUNC int32_t NAIAPI naibrd_CAN_GetChannelCountForModule (uint32_t cardIndex, uint32_t module)
 Returns the number of channels for the specified card and CAN Module.
 
NAIBRDFUNC int32_t NAIAPI naibrd_CAN_GetMaxFIFOCount (uint32_t modId)
 Returns the max FIFO count for the specified CAN Module ID.
 
NAIBRDFUNC int32_t NAIAPI naibrd_CAN_GetFrameByteCount (uint32_t modId)
 Returns the number of bytes that make up a CAN frame for the specified CAN Module ID.
 
static nai_status_t naibrd_CAN_VerifyChannel (uint32_t modId, int32_t channel)
 Returns whether the given channel (1-based) is valid for the specified Module ID.
 
static nai_status_t naibrd_CAN_VerifyFilter (uint32_t modId, int32_t filter)
 Returns whether the given filter is valid for the specified Module ID.
 
static int32_t naibrd_CAN_GetMaxAcceptFilterCountForModule (uint32_t modId)
 Returns the maximum number of filters that can be configured for the given Module ID.
 
static nai_status_t naibrd_CAN_WaitForCanControlOptionToFinish (int32_t cardIndex, int32_t module, int32_t channel, uint32_t moduleVer, bool_t checkConfigEdit, uint32_t controlBitsToWaitOn)
 Performs wait logic for CAN control options. Each control option request bit is set to a one (1) requesting an action to take place. When the task is finished, the bits are set back to a zero (0).
 

Detailed Description

Function Documentation

◆ naibrd_CAN_GetChannelCount()

NAIBRDFUNC int32_t NAIAPI naibrd_CAN_GetChannelCount ( uint32_t modId)

Retrieves the number of channels for the specified CAN Module ID.

Parameters
modId: (Input) CAN Module ID
Returns
  • Number of channels for the Module ID.

◆ naibrd_CAN_GetChannelCountForModule()

NAIBRDFUNC int32_t NAIAPI naibrd_CAN_GetChannelCountForModule ( uint32_t cardIndex,
uint32_t module )

Returns the number of channels for the specified card and CAN Module.

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]).
Returns
  • Number of channels for the Module Index.

◆ naibrd_CAN_GetFrameByteCount()

NAIBRDFUNC int32_t NAIAPI naibrd_CAN_GetFrameByteCount ( uint32_t modId)

Returns the number of bytes that make up a CAN frame for the specified CAN Module ID.

Parameters
modId: (Input) CAN Module ID
Returns
  • Frame byte count for the Module ID.

◆ naibrd_CAN_GetMaxAcceptFilterCountForModule()

static int32_t naibrd_CAN_GetMaxAcceptFilterCountForModule ( uint32_t modId)
static

Returns the maximum number of filters that can be configured for the given Module ID.

Parameters
modId: (Input) CAN Module ID
Returns
  • Maximum number of filters that can be configured for given Module ID.

◆ naibrd_CAN_GetMaxFIFOCount()

NAIBRDFUNC int32_t NAIAPI naibrd_CAN_GetMaxFIFOCount ( uint32_t modId)

Returns the max FIFO count for the specified CAN Module ID.

Parameters
modId: (Input) CAN Module ID
Returns
  • Max Fifo count for the Module ID.

◆ naibrd_CAN_VerifyChannel()

static nai_status_t naibrd_CAN_VerifyChannel ( uint32_t modId,
int32_t channel )
static

Returns whether the given channel (1-based) is valid for the specified Module ID.

Parameters
modId: (Input) CAN Module ID
channel: (Input) Channel Number of the channel to access (1 - [max channels for module]).
Returns
  • NAI_SUCCESS if channel value is within a valid range for the specified Module ID.
  • NAI_ERROR_INVALID_VALUE if channel value is not within a valid range for the specified Module ID.

◆ naibrd_CAN_VerifyFilter()

static nai_status_t naibrd_CAN_VerifyFilter ( uint32_t modId,
int32_t filter )
static

Returns whether the given filter is valid for the specified Module ID.

Parameters
modId: (Input) CAN Module ID
filter: (Input) Filter value (1-Based)
Returns
  • NAI_SUCCESS if specified filter is within a valid range for the specified Module ID.
  • NAI_ERROR_INVALID_VALUE if specified filter is NOT within a valid range for the specified Module ID.

◆ naibrd_CAN_WaitForCanControlOptionToFinish()

static nai_status_t naibrd_CAN_WaitForCanControlOptionToFinish ( int32_t cardIndex,
int32_t module,
int32_t channel,
uint32_t moduleVer,
bool_t checkConfigEdit,
uint32_t controlBitsToWaitOn )
static

Performs wait logic for CAN control options. Each control option request bit is set to a one (1) requesting an action to take place. When the task is finished, the bits are set back to a zero (0).

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]).
moduleVer: (Input) Version of module baremetal code
checkConfigEdit: (Input) NAI_TRUE indicates to only attempt to wait if the control bit signaling editing configuration is not set.
configBitsToWaitOn: (Input) Config Bits to wait on.
Returns
  • NAI_SUCCESS if specified filter is within a valid range for the specified Module ID.
  • NAI_ERROR_TIMEOUT if the control bits are not set back to zero in the time we are willing to wait.