Software Library API naibrd 2.24.0
See all documentation at naii.docs.com
|
Typedefs | |
typedef uint32_t | naibrd_can_msg_t |
typedef uint32_t | naibrd_can_addr_claim_t |
typedef uint32_t | naibrd_can_gen5_ctrl_t |
typedef uint32_t | naibrd_can_gen3_p6_ctrl_t |
typedef uint32_t | naibrd_can_gen3_pa_ctrl_t |
typedef uint32_t | naibrd_can_filter_ctrl_type_t |
Functions | |
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). | |
static bool_t | naibrd_CAN_IsChannelJ1939 (uint32_t modId, int32_t cardIndex, int32_t module, int32_t channel) |
static bool_t | naibrd_CAN_IsRequestedStatusEnabledForModule (uint32_t modId, naibrd_can_chan_mapped_status_type_t statusType) |
static bool_t | naibrd_CAN_IsCANModuleGreaterThanGen3 (uint32_t modId) |
static nai_status_t | naibrd_CAN_GetProcRevision (int32_t cardIndex, int32_t module, uint32_t *p_outprocRev) |
static bool_t | naibrd_CAN_IsInterruptStatusValidForClear (naibrd_can_chan_mapped_status_type_t statusType) |
static nai_status_t | naibrd_CAN_ExtractInfoFromEventMappedStatus (naibrd_can_event_mapped_status_type_t statusType, int32_t *p_outshiftCount, uint32_t *p_outmaskValue) |
static nai_status_t | naibrd_CAN_VerifyAccesType (nai_status_access_type_t accessType) |
static nai_status_t | naibrd_CAN_VerifyEventMapCategoryType (naibrd_can_event_mapped_category_type_t categoryType) |
static nai_status_t | naibrd_CAN_VerifyChanMappedLatchStatusType (naibrd_can_chan_mapped_status_type_t statusType) |
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. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_CAN_AB_QueueTransmit32 (int32_t cardIndex, int32_t module, int32_t channel, bool_t isModeA, int32_t msgId, uint32_t *p_buffer, int32_t txCount) |
Queues a CAN AB message for transmit on the channels FIFO. The message will be sent once the TX_ENABLE bit is set in the channel's control register. If that bit is already set, the message will be transmitted immediately. If the Tx FIFO does not have enough space to hold the message, the function will return immediately with a value of NAI_ERROR_FULL. If the message is longer than NAI_AB_MAX_DATA_LEN, the function will return immediately with a value of NAI_ERROR_INVALID_RANGE. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_CAN_AB_Transmit32 (int32_t cardIndex, int32_t module, int32_t channel, bool_t isModeA, int32_t msgId, uint32_t *p_buffer, int32_t txCount) |
Queues a message to transmit on a CAN A/B channel's Tx FIFO, then enables the transmit bit in the channel's control word. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_CAN_AB_Receive32 (int32_t cardIndex, int32_t module, int32_t channel, bool_t *p_outisModeA, int32_t *p_outmsgId, uint32_t bufferLength, uint32_t *p_outbuffer, int32_t *p_outrxCount) |
Reads a CAN AB message off a channel. If there are no messages waiting, this function will return NAI_ERROR_EMPTY. If the format of the message on the fifo is invalid the function will return NAI_ERROR_MISMATCH. If the message exceeds buflen the function will fill as much as it can, discard the rest of the message, and return NAI_ERROR_MORE_DATA. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_CAN_J1939_QueueTransmit32 (int32_t cardIndex, int32_t module, int32_t channel, int32_t pgn, int32_t priority, int32_t destination, uint32_t *p_buffer, int32_t txCount) |
Queues a J1939 message, for transmit on the given channel. The message will be sent once the TX_ENABLE bit is set in the channel's control register. If that bit is already set, the message will be transmitted immediately. If the Tx FIFO does not have enough space to hold the message, the function will return immediately with a value of NAI_ERROR_FULL. If the message is longer than NAIBRD_CAN_J1939_MAX_DATA_LEN, the function will return immediately with a value of NAI_ERROR_INVALID_RANGE. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_CAN_J1939_Transmit32 (int32_t cardIndex, int32_t module, int32_t channel, int32_t pgn, int32_t priority, int32_t destination, uint32_t *p_buffer, int32_t txCount) |
Queues a message to transmit on a J1939 channel's Tx FIFO, then enables the transmit bit in the channel's control word. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_CAN_J1939_Receive32 (int32_t cardIndex, int32_t module, int32_t channel, int32_t *p_outpgn, int32_t *p_outsource, int32_t *p_outdestination, uint32_t bufferLength, uint32_t *p_outbuffer, int32_t *p_outrxCount) |
Reads a J1939 message off a channel on a gen5 module. If there are no messages waiting, this function will return NAI_ERROR_EMPTY. If the format of the message on the fifo is invalid the function will return NAI_ERROR_MISMATCH. If the message exceeds buflen the function will fill as much as it can, discard the rest of the message, and return NAI_ERROR_MORE_DATA. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_CAN_J1939_SetAddress (int32_t cardIndex, int32_t module, int32_t channel, int32_t address) |
Set the CAN channel's SAE J1939 address. NOTE: In order for address assignment to work, all channels on the the bus need to be enabled for TX and RX so each channel can communicate with the channel requesting the address. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_CAN_J1939_GetAddress (int32_t cardIndex, int32_t module, int32_t channel, int32_t *p_outaddress, int32_t *p_outstatus) |
Get the CAN channel's SAE J1939 address. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_CAN_GetTxFIFOCount (int32_t cardIndex, int32_t module, int32_t channel, int32_t *p_outcount) |
Get the number of words used in the Tx FIFO. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_CAN_GetRxFIFOCount (int32_t cardIndex, int32_t module, int32_t channel, int32_t *p_outcount) |
Get the number of words used in the Rx FIFO. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_CAN_GetTxFIFOFrameCount (int32_t cardIndex, int32_t module, int32_t channel, int32_t *p_outcount) |
Get the number of frames in the Tx FIFO. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_CAN_GetRxFIFOFrameCount (int32_t cardIndex, int32_t module, int32_t channel, int32_t *p_outcount) |
Get the number of frames in the Rx FIFO. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_CAN_GetTxFIFOMessageWaiting (int32_t cardIndex, int32_t module, int32_t channel, bool_t *p_outmsgWaiting) |
Determine whether or not a Tx message is waiting to be transmitted. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_CAN_GetRxFIFOMessageWaiting (int32_t cardIndex, int32_t module, int32_t channel, bool_t *p_outmsgWaiting) |
Determine whether or not a Rx message is waiting to be received. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_CAN_GetCoreStatus (int32_t cardIndex, int32_t module, int32_t channel, int32_t *p_outstatus) |
Get the core status of a channel. This is the status of actual CAN core. The meaning of bits having been set high (1) is listed here: BIT 0 = Configuration Mode Indicator (1 = CAN core is in configuration mode. 0 = CAN core is NOT in configuration mode) BIT 1 = Loopback Mode Indicator (1 = CAN core is in loopback mode. 0 = CAN core is NOT in loopback mode) BIT 2 = Sleep Mode Indicator (1 = CAN core is in sleep mode. 0 = CAN core is NOT in sleep mode) BIT 3 = Normal Mode Indicator (1 = CAN core is in normal mode. 0 = CAN core is NOT in normal mode) BIT 4 = Bus Idle Indicator (1 = No bus communication is taking place. 0 = CAN core is either in configuration mode or the bus is busy) BIT 5 = Bus Busy Indicator (1 = CAN core is either receiving a message or transmitting a message. 0 = CAN core is either in configuration mode or the bus is idle) BIT 6 = Error Warning Indicator (1 = Indicates either the Transmit Error counter or the Receive Error counter have count of 96 or greater. 0 indicates neither counter have reached a count of 96) BIT 7 and 8 = Error Status Indicator (00 = Indicates configuration mode and error state is undefined. 01 = Indicates Error Active State. 11 = Indicates Error Passive State. 10 = Indicates Bus Off State) BIT 9 - 31 = RESERVED. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_CAN_GetCommStatus (int32_t cardIndex, int32_t module, int32_t channel, naibrd_can_comm_status_type_t *p_outstatus) |
Get the communication status of a channel. For P6 and PA modules, the valid communication status flags are defined by the nai_can_comm_status_t type (see header file). For Gen_5 modules (CB1, CB2 and CB3), the communication status are 32 bit error codes (not bitmapped). | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_CAN_GetBusStatus (int32_t cardIndex, int32_t module, int32_t channel, int32_t *p_outstatus) |
Get the bus status of a channel. This indicates the type of error that has occurred on the bus. If more than one error occurs, all relevant error flag bits are set in this p_outstatus value. Bit meanings are as follows: | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_CAN_GetLastError (int32_t cardIndex, int32_t module, int32_t channel, int32_t *p_outlastError) |
Get the last error of a channel. For Gen 3 modules (P6 and PA), the valid error values are defined by the nai_can_error enumeration. For Gen 5 modules (CB1, CB2 and CB3), the valid error values will either be errors as defined in naibrd_CAN_GetBusStatus or naibrd_CAN_GetCommStatus. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_CAN_GetErrorCount (int32_t cardIndex, int32_t module, int32_t channel, bool_t *p_outisErrorPassive, int32_t *p_outrxErrorCount, int32_t *p_outtxErrorCount) |
Get the error statistics for a given channel. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_CAN_SetTxFIFOAlmostEmpty (int32_t cardIndex, int32_t module, int32_t channel, int32_t almostEmptyValue) |
Set the Tx FIFO Almost Empty value for a given channel. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_CAN_GetTxFIFOAlmostEmpty (int32_t cardIndex, int32_t module, int32_t channel, int32_t *p_outalmostEmptyValue) |
Get the Tx FIFO Almost Empty value for a given channel. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_CAN_SetRxFIFOAlmostFull (int32_t cardIndex, int32_t module, int32_t channel, int32_t almostFullValue) |
Set the Rx FIFO Almost Full value for a given channel. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_CAN_GetRxFIFOAlmostFull (int32_t cardIndex, int32_t module, int32_t channel, int32_t *p_outalmostFullValue) |
Get the Rx FIFO Almost Full value for a given channel. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_CAN_SetRxFIFOHighWatermark (int32_t cardIndex, int32_t module, int32_t channel, int32_t highWatermarkValue) |
Set the Rx FIFO High Watermark value for a given channel. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_CAN_GetRxFIFOHighWatermark (int32_t cardIndex, int32_t module, int32_t channel, int32_t *p_outhighWatermarkValue) |
Get the Rx FIFO High Watermark value for a given channel. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_CAN_SetRxFIFOLowWatermark (int32_t cardIndex, int32_t module, int32_t channel, int32_t lowWatermarkValue) |
Set the Rx FIFO Low Watermark value for a given channel. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_CAN_GetRxFIFOLowWatermark (int32_t cardIndex, int32_t module, int32_t channel, int32_t *p_outlowWatermarkValue) |
Get the Rx FIFO Low Watermark value for a given channel. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_CAN_StartConfigChanges (int32_t cardIndex, int32_t module, int32_t channel) |
Sets a bit in the control register indicating the user is making configuration changes. Calling this function will force the CAN module to ignore any configuration changes made until such time that the naibrd_CAN_ApplyConfigChanges is called. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_CAN_ApplyConfigChanges (int32_t cardIndex, int32_t module, int32_t channel) |
Clears a bit in the control register indicating the user is finished making configuration changes. Calling this function will force the CAN module to once again check and apply any detected changes to the CAN configuration. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_CAN_ChannelReset (int32_t cardIndex, int32_t module, int32_t channel) |
Reset the channel specified. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_CAN_SetRxEnable (int32_t cardIndex, int32_t module, int32_t channel, bool_t enable) |
Enables or disables Receive for the channel specified. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_CAN_GetRxEnable (int32_t cardIndex, int32_t module, int32_t channel, bool_t *p_outenable) |
Get Receive enable setting for the channel specified. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_CAN_SetTxEnable (int32_t cardIndex, int32_t module, int32_t channel, bool_t enable) |
Enables or disables Transmit for the channel specified. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_CAN_GetTxEnable (int32_t cardIndex, int32_t module, int32_t channel, bool_t *p_outenable) |
Get Transmit enable setting for the channel specified. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_CAN_SetProtocol (int32_t cardIndex, int32_t module, int32_t channel, naibrd_can_protocol_type_t protocol) |
naibrd_CAN_SetProtocol sets the CAN protocol to be used for the specified channel. This function is only supported for modules that allow a per channel protocol to be configured (such as the CB3). | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_CAN_GetProtocol (int32_t cardIndex, int32_t module, int32_t channel, naibrd_can_protocol_type_t *p_outprotocol) |
naibrd_CAN_GetProtocol gets the CAN protocol being used for the specified channel. Modules such as CB1 will always report a protocol of CAN AB, CB2 will always report a protocol of J1939 and CB3 could potentially be either CAN AB or J1939 depending on how each channel was configured. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_CAN_ResetTxFIFO (int32_t cardIndex, int32_t module, int32_t channel) |
naibrd_CAN_ResetTxFIFO forces the TX FIFO to be emptied without the need to force transmission to empty the FIFO. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_CAN_ResetRxFIFO (int32_t cardIndex, int32_t module, int32_t channel) |
naibrd_CAN_ResetRxFIFO forces the RX FIFO to be emptied without the need to force receiving to empty the FIFO. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_CAN_ResetTxAndRxFIFOs (int32_t cardIndex, int32_t module, int32_t channel) |
naibrd_CAN_ResetTxAndRxFIFOs forces the TX FIFO and RX FIFO to be emptied without the need to force transmitting and receiving to empty the FIFOs. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_CAN_SetBitTiming (int32_t cardIndex, int32_t module, int32_t channel, int32_t prescaler, int32_t sjw, int32_t tseg1, int32_t tseg2) |
Change the bit timing for a particular CAN module channel. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_CAN_GetBitTiming (int32_t cardIndex, int32_t module, int32_t channel, int32_t *p_outprescaler, int32_t *p_outsjw, int32_t *p_outtseg1, int32_t *p_outtseg2) |
Retrieve the bit timing for a particular CAN module channel. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_CAN_SetBaudRate (int32_t cardIndex, int32_t module, int32_t channel, naibrd_can_baud_rate_type_t baudRate) |
Change the baud rate for a particular CAN module channel. - This function can be used in place of naibrd_CAN_SetBitTiming if you know what baud rate you want but you do not want to specify the specific bit timing parameters to achieve the desired baud rate. We will take care of determining bit timing parameters to achieve the desired baud rate. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_CAN_GetBaudRate (int32_t cardIndex, int32_t module, int32_t channel, naibrd_can_baud_rate_type_t *p_outbaudRate) |
Retrieve the baud rate for a particular CAN module channel. NOTE: This function retrieves the value of what was last assigned using the "naibrd_CAN_SetBaudRate" function call. If baud rate was set using the naibrd_CAN_SetBitTiming, a call to naibrd_CAN_GetBaudRate will return 0 since no attempt is made to reverse calculate what the baud rate is based upon the bit timing parameters. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_CAN_GetChanMappedStatus (int32_t cardIndex, int32_t module, int32_t channel, naibrd_can_chan_mapped_status_type_t statusType, nai_status_bit_t *p_outstatusBit) |
Get the interrupt status for the specified channel. Valid interrupt status flags are defined by the naibrd_can_status_type enumeration. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_CAN_ClearChanMappedStatus (int32_t cardIndex, int32_t module, int32_t channel, naibrd_can_chan_mapped_status_type_t statusType) |
Clears the latched status (NOTE if "REALTIME" version of interrupt is asked to be cleared, the "LATCHED" version of the interrupt is what really gets cleared as there is no way to clear the "REALTIME". | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_CAN_SetChanMappedInterruptEnable (int32_t cardIndex, int32_t module, int32_t channel, naibrd_can_chan_mapped_status_type_t statusType, bool_t enable) |
Set the interrupt enable bit for the specified channel. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_CAN_GetChanMappedInterruptEnable (int32_t cardIndex, int32_t module, int32_t channel, naibrd_can_chan_mapped_status_type_t statusType, bool_t *p_outenable) |
Get the interrupt enable for the specified channel. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_CAN_SetChanMappedInterruptVector (int32_t cardIndex, int32_t module, naibrd_can_chan_mapped_status_type_t statusType, uint32_t vector) |
Set the interrupt vector for the specified channel. This function is for Gen5 and above. For Gen3 modules, naibrd_CAN_SetInterruptVectorForChannel should be called where a channel can be passed in. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_CAN_GetChanMappedInterruptVector (int32_t cardIndex, int32_t module, naibrd_can_chan_mapped_status_type_t statusType, uint32_t *p_outvector) |
Get the interrupt vector for the specified channel. This function is for Gen5 and above. For Gen3 modules, naibrd_CAN_GetInterruptVectorForChannel should be called where a channel can be passed in. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_CAN_SetChanMappedInterruptVectorForChannel (int32_t cardIndex, int32_t module, int32_t channel, naibrd_can_chan_mapped_status_type_t statusType, uint32_t vector) |
Set the interrupt vector for the specified channel. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_CAN_GetChanMappedInterruptVectorForChannel (int32_t cardIndex, int32_t module, int32_t channel, naibrd_can_chan_mapped_status_type_t statusType, uint32_t *p_outvector) |
Get the interrupt vector for the specified channel. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_CAN_SetChanMappedInterruptTriggerType (int32_t cardIndex, int32_t module, int32_t channel, naibrd_can_chan_mapped_status_type_t statusType, naibrd_int_trigger_type_t triggerType) |
Sets the Interrupt Edge/Level register value for the specified CAN channel. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_CAN_SetChanMappedInterruptTriggerTypeRaw (int32_t cardIndex, int32_t module, int32_t channel, naibrd_can_chan_mapped_status_type_t statusType, uint32_t triggerTypeRegValue) |
Sets the Interrupt Edge/Level register value for the specified CAN channel. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_CAN_GetChanMappedInterruptTriggerTypeRaw (int32_t cardIndex, int32_t module, int32_t channel, naibrd_can_chan_mapped_status_type_t statusType, uint32_t *p_outtriggerTypeRegValue) |
Gets the Interrupt Edge/Level register value for the specified CAN channel. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_CAN_GetChanMappedInterruptTriggerType (int32_t cardIndex, int32_t module, int32_t channel, naibrd_can_chan_mapped_status_type_t statusType, naibrd_int_trigger_type_t *p_outtriggerType) |
Retrieves the Interrupt Trigger Type (Edge/Level) register value for the specified CAN channel. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_CAN_SetChanMappedInterruptSteering (int32_t cardIndex, int32_t module, naibrd_can_chan_mapped_status_type_t statusType, naibrd_int_steering_t steering) |
Sets the Interrupt Steering which indicates the interrupt direction for the specified channel. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_CAN_GetChanMappedInterruptSteering (int32_t cardIndex, int32_t module, naibrd_can_chan_mapped_status_type_t statusType, naibrd_int_steering_t *p_outsteering) |
Retrieves the Interrupt Steering which indicates the interrupt direction for the specified channel. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_CAN_GetFIFOEventMappedStatus (int32_t cardIndex, int32_t module, int32_t channel, naibrd_can_event_mapped_status_type_t statusType, nai_status_bit_t *p_outstatusBit) |
Retrieves the requested FIFO Buffer Status for the given channel. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_CAN_GetFIFOEventMappedStatusRaw (int32_t cardIndex, int32_t module, int32_t channel, nai_status_access_type_t accessType, naibrd_can_event_mapped_category_type_t categoryType, uint32_t *p_outstatusRaw) |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_CAN_InitiateBIT (int32_t cardIndex, int32_t module, int32_t channel, bool_t waitForResult) |
Executes the CAN Built-in Test and returns the results. BIT takes the channel off line, executes the tests and then reconnects the channel. The results of the test are returned in the status if waitForResult = 1, otherwise the return value will be any of the statuses listed below with the exception of NAI_ERROR_TIMEOUT and NAI_ERROR_BIT_FAILED. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_CAN_CheckBITComplete (int32_t cardIndex, int32_t module, int32_t channel, bool_t *p_outbitComplete) |
Retrieves the BIT status (complete or incomplete) of the channel specified. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_CAN_GetBITStatus (int32_t cardIndex, int32_t module, int32_t channel, naibrd_can_chan_mapped_status_type_t statusType, bool_t *p_outbitStatus) |
Retrieves the BIT status of the channel specified. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_CAN_ClearBITStatus (int32_t cardIndex, int32_t module, int32_t channel) |
Clears the latched BIT status of the channel specified. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_CAN_SetBITInterruptEnable (int32_t cardIndex, int32_t module, int32_t channel, bool_t intEnable) |
Sets the BIT Interrupt Enable register value for the specified CAN channel. Setting the bits to 1 enabled interrupts. Status is reported in the BIT Interrupt Status register. | |
nai_status_t NAIAPI | naibrd_CAN_GetBITInterruptEnable (int32_t cardIndex, int32_t module, int32_t channel, bool_t *p_outintEnable) |
Retrieves the BIT Interrupt Enable register value for the specified CAN channel. Setting the bits to 1 enabled interrupts. Status is reported in the BIT Interrupt Status register. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_CAN_SetBITInterruptTriggerType (int32_t cardIndex, int32_t module, int32_t channel, uint32_t triggerType) |
Sets the BIT Interrupt Trigger Type (Edge/Level) register value for the specified CAN channel. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_CAN_GetBITInterruptTriggerType (int32_t cardIndex, int32_t module, int32_t channel, uint32_t *p_outtriggerType) |
Retrieves the BIT Interrupt Trigger Type (Edge/Level) register value for the specified CAN channel. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_CAN_SetBITInterruptVector (int32_t cardIndex, int32_t module, uint32_t vector) |
Sets the BIT interrupt vector for the specified CAN module. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_CAN_GetBITInterruptVector (int32_t cardIndex, int32_t module, uint32_t *p_outvector) |
Retrieves the BIT interrupt vector for the specified CAN module. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_CAN_SetBITInterruptSteering (int32_t cardIndex, int32_t module, naibrd_int_steering_t steering) |
Sets the BIT Interrupt Steering which indicates the interrupt direction for the specified channel. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_CAN_GetBITInterruptSteering (int32_t cardIndex, int32_t module, naibrd_int_steering_t *p_outsteering) |
Retrieves the BIT Interrupt Steering which indicates the interrupt direction for the specified channel. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_CAN_GetMaxAcceptFilterCount (int32_t cardIndex, int32_t module, int32_t channel, int32_t *p_outmaxAcceptFilterCount) |
Retrieve the max acceptance filter count for the specified module. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_CAN_StartAcceptFilterChanges (int32_t cardIndex, int32_t module, int32_t channel) |
Sets a bit in the filter control register indicating the user is making acceptance filter changes. Calling this function will force the CAN module to ignore any changes made until such time that the naibrd_CAN_ApplyAcceptFilterChanges is called. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_CAN_ApplyAcceptFilterChanges (int32_t cardIndex, int32_t module, int32_t channel) |
Clears a bit in the filter control register indicating the user is finished making acceptance filter changes. Call this function will force the CAN module to once again check and apply any detected changes to the CAN filtering. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_CAN_SetEnabledAcceptFilterCount (int32_t cardIndex, int32_t module, int32_t channel, int32_t enableFilterCount) |
Specifies the number of CAN acceptance filters to be enabled for the specified Card, Module and Channel. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_CAN_GetEnabledAcceptFilterCount (int32_t cardIndex, int32_t module, int32_t channel, int32_t *outenabledFilterCount) |
Returns the number of CAN acceptance filters enabled for the specified Card, Module and Channel. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_CAN_ClearAcceptFilter (int32_t cardIndex, int32_t module, int32_t channel, int32_t filter) |
Clears all acceptance filter settings for the specified Card, Module, Channel and Filter. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_CAN_SetAcceptCodeFilterEnable (int32_t cardIndex, int32_t module, int32_t channel, int32_t filter, bool_t enable) |
Enables or disables Acceptance Code / Mask filtering for the channel specified. NOTE: Configuring of filters should be performed between calls to naibrd_CAN_StartAcceptFilterChanges and naibrd_CAN_ApplyAcceptFilterChanges. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_CAN_GetAcceptCodeFilterEnable (int32_t cardIndex, int32_t module, int32_t channel, int32_t filter, bool_t *outenable) |
Get Acceptance Code / Mask filter enable setting for the channel specified. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_CAN_SetStdExtAcceptFilterEnable (int32_t cardIndex, int32_t module, int32_t channel, int32_t filter, bool_t enable) |
Enables or disables acceptance for Standard (CAN-A) / Extended (CAN-B) filtering for the channel specified. NOTE: Configuring of filters should be performed between calls to naibrd_CAN_StartAcceptFilterChanges and naibrd_CAN_ApplyAcceptFilterChanges. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_CAN_GetStdExtAcceptFilterEnable (int32_t cardIndex, int32_t module, int32_t channel, int32_t filter, bool_t *outenable) |
Get CAN-A / CAN-B filter enable setting for the channel specified. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_CAN_SetSRRAcceptFilterEnable (int32_t cardIndex, int32_t module, int32_t channel, int32_t filter, bool_t enable) |
Enables or disables substitute remote transmission request (SRR) acceptance filtering for the channel specified (standard frame). NOTE: Configuring of filters should be performed between calls to naibrd_CAN_StartAcceptFilterChanges and naibrd_CAN_ApplyAcceptFilterChanges. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_CAN_GetSRRAcceptFilterEnable (int32_t cardIndex, int32_t module, int32_t channel, int32_t filter, bool_t *outenable) |
Get substitute remote transmission request (SRR) accept filter enable setting for the channel specified. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_CAN_SetRTRAcceptFilterEnable (int32_t cardIndex, int32_t module, int32_t channel, int32_t filter, bool_t enable) |
Enables or disables remote transmission request (RTR) acceptance filtering for the channel specified (extended frame). NOTE: Configuring of filters should be performed between calls to naibrd_CAN_StartAcceptFilterChanges and naibrd_CAN_ApplyAcceptFilterChanges. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_CAN_GetRTRAcceptFilterEnable (int32_t cardIndex, int32_t module, int32_t channel, int32_t filter, bool_t *p_outenable) |
Get remote transmission request (RTR) acceptance filter enable setting for the channel specified. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_CAN_SetAcceptMaskFilter (int32_t cardIndex, int32_t module, int32_t channel, int32_t filter, int32_t acceptmask) |
Set the CAN channel's Acceptance Mask value. When the Acceptance Code filter is enabled, only messages with an Acceptance Code / Mask matching the filter value are accepted. NOTE: Configuring of filters should be performed between calls to naibrd_CAN_StartAcceptFilterChanges and naibrd_CAN_ApplyAcceptFilterChanges. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_CAN_GetAcceptMaskFilter (int32_t cardIndex, int32_t module, int32_t channel, int32_t filter, int32_t *p_outacceptmask) |
Get the CAN channel's Acceptance Mask filter value (CAN A/B only). When the Acceptance Code filter is enabled, only messages with an Acceptance Code / Mask matching the filter value are accepted. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_CAN_SetAcceptCodeFilter (int32_t cardIndex, int32_t module, int32_t channel, int32_t filter, int32_t acceptcode) |
Set the CAN channel's Acceptance Code filter value. When the Acceptance Code filter is enabled, only messages with an Acceptance Code / Mask matching the filter value are accepted. NOTE: Configuring of filters should be performed between calls to naibrd_CAN_StartAcceptFilterChanges and naibrd_CAN_ApplyAcceptFilterChanges. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_CAN_GetAcceptCodeFilter (int32_t cardIndex, int32_t module, int32_t channel, int32_t filter, int32_t *p_outacceptcode) |
Get the CAN channel's Acceptance Code filter value. When the Acceptance Code filter is enabled, only messages with an Acceptance Code / Mask matching the filter value are accepted. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_CAN_SetStdExtAcceptFilter (int32_t cardIndex, int32_t module, int32_t channel, int32_t filter, bool_t acceptStdMsgs) |
Specifies whether to allow Standard / Extended CAN frames to pass through for the channel specified. NOTE: Configuring of filters should be performed between calls to naibrd_CAN_StartAcceptFilterChanges and naibrd_CAN_ApplyAcceptFilterChanges. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_CAN_GetStdExtAcceptFilter (int32_t cardIndex, int32_t module, int32_t channel, int32_t filter, bool_t *p_outacceptStdMsgs) |
Get Standard / Extended Mode filter enable setting for the channel specified. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_CAN_SetSRRAcceptFilter (int32_t cardIndex, int32_t module, int32_t channel, int32_t filter, bool_t acceptSRRMsgs) |
Specifies whether to allow CAN frames that have Substitute remote request (SRR) bit set to pass through for the channel specified. NOTE: Configuring of filters should be performed between calls to naibrd_CAN_StartAcceptFilterChanges and naibrd_CAN_ApplyAcceptFilterChanges. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_CAN_GetSRRAcceptFilter (int32_t cardIndex, int32_t module, int32_t channel, int32_t filter, bool_t *p_outacceptSRRMsgs) |
Get SRR (Substitute Remote Request) acceptance filter enable setting for the channel specified. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_CAN_SetRTRAcceptFilter (int32_t cardIndex, int32_t module, int32_t channel, int32_t filter, bool_t acceptRTRMsgs) |
Specifies whether to allow CAN frames that have Remote Transmission Request (RTR) bit set to pass through for the channel specified. NOTE: Configuring of filters should be performed between calls to naibrd_CAN_StartAcceptFilterChanges and naibrd_CAN_ApplyAcceptFilterChanges. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_CAN_GetRTRAcceptFilter (int32_t cardIndex, int32_t module, int32_t channel, int32_t filter, bool_t *p_outacceptRTRMsgs) |
Get RTR (Remote Transmission Request) acceptance filter setting for the channel specified. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_CAN_J1939_SetPriorityAcceptFilterEnable (int32_t cardIndex, int32_t module, int32_t channel, int32_t filter, bool_t enable) |
Enables or disables Priority filtering for the channel specified (J1939 only). NOTE: Configuring of filters should be performed between calls to naibrd_CAN_StartAcceptFilterChanges and naibrd_CAN_ApplyAcceptFilterChanges. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_CAN_J1939_GetPriorityAcceptFilterEnable (int32_t cardIndex, int32_t module, int32_t channel, int32_t filter, bool_t *p_outenable) |
Get Priority filter enable setting for the channel specified (J1939 only). | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_CAN_J1939_SetSrcAcceptFilterEnable (int32_t cardIndex, int32_t module, int32_t channel, int32_t filter, bool_t enable) |
Enables or disables Source filtering for the channel specified (J1939 only). NOTE: Configuring of filters should be performed between calls to naibrd_CAN_StartAcceptFilterChanges and naibrd_CAN_ApplyAcceptFilterChanges. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_CAN_J1939_GetSrcAcceptFilterEnable (int32_t cardIndex, int32_t module, int32_t channel, int32_t filter, bool_t *p_outenable) |
Get Source filter enable setting for the channel specified (J1939 only). | |
NAIBRDFUNC nai_status_t | naibrd_CAN_J1939_SetDestAcceptFilterEnable (int32_t cardIndex, int32_t module, int32_t channel, int32_t filter, bool_t enable) |
Enables or disables Destination filtering for the channel specified (J1939 only). NOTE: Configuring of filters should be performed between calls to naibrd_CAN_StartAcceptFilterChanges and naibrd_CAN_ApplyAcceptFilterChanges. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_CAN_J1939_GetDestAcceptFilterEnable (int32_t cardIndex, int32_t module, int32_t channel, int32_t filter, bool_t *p_outenable) |
Get Destination filter enable setting for the channel specified (J1939 only). | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_CAN_J1939_SetPGNAcceptFilterEnable (int32_t cardIndex, int32_t module, int32_t channel, int32_t filter, bool_t enable) |
Enables or disables PGN filtering for the channel specified (J1939 only). NOTE: Configuring of filters should be performed between calls to naibrd_CAN_StartAcceptFilterChanges and naibrd_CAN_ApplyAcceptFilterChanges. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_CAN_J1939_GetPGNAcceptFilterEnable (int32_t cardIndex, int32_t module, int32_t channel, int32_t filter, bool_t *p_outenable) |
Get PGN filter enable setting for the channel specified (J1939 only). | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_CAN_J1939_SetPriorityAcceptFilter (int32_t cardIndex, int32_t module, int32_t channel, int32_t filter, int32_t priorityAcceptFilter) |
Set the CAN channel's priority filter value. When the priority filter is enabled, only messages with a priority matching the filter value are accepted (J1939 only). NOTE: Configuring of filters should be performed between calls to naibrd_CAN_StartAcceptFilterChanges and naibrd_CAN_ApplyAcceptFilterChanges. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_CAN_J1939_GetPriorityAcceptFilter (int32_t cardIndex, int32_t module, int32_t channel, int32_t filter, int32_t *p_outpriorityAcceptFilter) |
Get the CAN channel's priority filter value. When the priority filter is enabled, only messages with a priority matching the filter value are accepted (J1939 only). | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_CAN_J1939_SetSrcAcceptFilter (int32_t cardIndex, int32_t module, int32_t channel, int32_t filter, int32_t srcAcceptFilter) |
Set the CAN channel's source filter value. When the source filter is enabled, only messages with a source address matching the filter value are accepted (J1939 only). NOTE: Configuring of filters should be performed between calls to naibrd_CAN_StartAcceptFilterChanges and naibrd_CAN_ApplyAcceptFilterChanges. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_CAN_J1939_GetSrcAcceptFilter (int32_t cardIndex, int32_t module, int32_t channel, int32_t filter, int32_t *p_outsrcAcceptFilter) |
Get the CAN channel's source filter value. When the source filter is enabled, only messages with a source address matching the filter value are accepted (J1939 only). | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_CAN_J1939_SetDestAcceptFilter (int32_t cardIndex, int32_t module, int32_t channel, int32_t filter, int32_t destAcceptFilter) |
Set the CAN channel's destination filter value. When the destination filter is enabled, only messages with a destination address matching the filter value are accepted (J1939 only). NOTE: Configuring of filters should be performed between calls to naibrd_CAN_StartAcceptFilterChanges and naibrd_CAN_ApplyAcceptFilterChanges. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_CAN_J1939_GetDestAcceptFilter (int32_t cardIndex, int32_t module, int32_t channel, int32_t filter, int32_t *p_outdestAcceptFilter) |
Get the CAN channel's destination filter value. When the destination filter is enabled, only messages with a destination address matching the filter value are accepted (J1939 only). | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_CAN_J1939_SetPGNAcceptFilter (int32_t cardIndex, int32_t module, int32_t channel, int32_t filter, int32_t pgnAcceptFilter) |
Set the CAN channel's PGN filter value. When the PGN filter is enabled, only messages with a PGN matching the filter value are accepted (J1939 only). NOTE: Configuring of filters should be performed between calls to naibrd_CAN_StartAcceptFilterChanges and naibrd_CAN_ApplyAcceptFilterChanges. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_CAN_J1939_GetPGNAcceptFilter (int32_t cardIndex, int32_t module, int32_t channel, int32_t filter, int32_t *p_outpgnAcceptFilter) |
Get the CAN channel's PGN filter value. When the PGN filter is enabled, only messages with a PGN matching the filter value are accepted (J1939 only). | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_CAN_GetSWTData (int32_t cardIndex, int32_t module, int32_t channel, bool_t *p_outupdateOccured, bool_t *p_outinterruptOccured, naibrd_can_swt_fault_type_t *p_outfaultType, uint32_t *p_outfaultValue) |
Gets the information associated with the SWT (Short Wire Test) status for a specific channel. This function is only for CB6 modules since a "special" FPGA is required to detect wire shorts. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_CAN_GetDropCount (int32_t cardIndex, int32_t module, int32_t channel, int32_t *p_outdropCount) |
Get the Drop Count for specified channel. (How many CAN msgs known to have been dropped) | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_CAN_GetModulePowerResetStatus (int32_t cardIndex, int32_t module, naibrd_can_module_power_reset_status_type_t modulePowerResetStatusType, bool_t *p_outmodulePowerResetStatusBit) |
Retrieves the bit specified by the module power reset status type from the module power reset status register for the specified CAN module. Feature supported in Motherboard FPGA Version >= X.X. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_CAN_ClearModulePowerResetStatus (int32_t cardIndex, int32_t module, naibrd_can_module_power_reset_status_type_t modulePowerResetStatusType) |
Clears the bit specified by the module power reset status type in the module power reset status register for the specified CAN module. Feature supported in Motherboard FPGA Version >= X.X. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_CAN_SetModulePowerReset (int32_t cardIndex, int32_t module, naibrd_can_module_power_reset_type_t modulePowerResetType, bool_t modulePowerResetBit) |
Sets the bit specified by the module power reset type in the module power reset register for the specified CAN module. If the bit was set, the hardware will acknowledge it by setting the corresponding bit back to 0. Feature supported in Motherboard FPGA Version >= X.X. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_CAN_GetModulePowerReset (int32_t cardIndex, int32_t module, naibrd_can_module_power_reset_type_t modulePowerResetType, bool_t *p_outmodulePowerResetBit) |
Retrieves the bit specified by the module power reset type from the module power reset register for the specified CAN module. Feature supported in Motherboard FPGA Version >= X.X. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_CAN_SetControlRaw (int32_t cardIndex, int32_t module, int32_t channel, uint32_t controlRaw) |
Set the control register value for a given channel. The valid control flags are defined by the NAIBRD_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, uint32_t *p_outcontrolRaw) |
Get the control register value for a given channel. The valid control flags are defined by the NAIBRD_CAN_CTRL enumeration. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_CAN_SetChanMappedInterruptEnableRaw (int32_t cardIndex, int32_t module, naibrd_can_chan_mapped_status_type_t statusType, uint32_t enableRaw) |
Set the value of the Interrupt enable register. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_CAN_GetChanMappedInterruptEnableRaw (int32_t cardIndex, int32_t module, naibrd_can_chan_mapped_status_type_t statusType, uint32_t *p_outenableRaw) |
Get the value of the Interrupt enable register. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_CAN_GetChanMappedStatusRaw (int32_t cardIndex, int32_t module, int32_t channel, naibrd_can_chan_mapped_status_type_t statusType, uint32_t *p_outstatusRaw) |
Get the interrupt status for all channels. Valid interrupt status flags are defined by the naibrd_can_status_type enumeration. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_CAN_ClearChanMappedStatusRaw (int32_t cardIndex, int32_t module, naibrd_can_chan_mapped_status_type_t statusType, uint32_t statusRaw) |
Clears the status data value in the register associated to the status type specified. NOTE: this function does not apply to *_REALTIME status types, which do not clear. If a *_REALTIME status type is specified, this function returns NAI_ERROR_INVALID_VALUE. | |
Variables | |
static uint32_t | NAIBRD_CAN_GEN3_ControlAddr [] = NAI_CAN_GEN3_REG_CTRL_ADD |
static uint32_t | NAIBRD_CAN_GEN3_RxBufferAddr [] = NAI_CAN_GEN3_REG_RX_BUFFER_ADD |
static uint32_t | NAIBRD_CAN_GEN3_RxBufferCount [] = NAI_CAN_GEN3_REG_RX_BUFFER_COUNT_ADD |
static uint32_t | NAIBRD_CAN_GEN3_RxBufferFrameCount [] = NAI_CAN_GEN3_REG_RX_FRAME_COUNT_ADD |
static uint32_t | NAIBRD_CAN_GEN3_TxBufferAddr [] = NAI_CAN_GEN3_REG_TX_BUFFER_ADD |
static uint32_t | NAIBRD_CAN_GEN3_TxBufferCount [] = NAI_CAN_GEN3_REG_TX_BUFFER_COUNT_ADD |
static uint32_t | NAIBRD_CAN_GEN3_TxBufferFrameCount [] = NAI_CAN_GEN3_REG_TX_FRAME_COUNT_ADD |
static uint32_t | NAIBRD_CAN_GEN3_LastErrorAddr [] = NAI_CAN_GEN3_REG_LAST_ERROR_ADD |
static uint32_t | NAIBRD_CAN_GEN3_CommStatusAddr [] = NAI_CAN_GEN3_REG_COMM_STATUS_ADD |
static uint32_t | NAIBRD_CAN_GEN3_ErrCntAddr [] = NAI_CAN_GEN3_REG_ERROR_COUNTER_ADD |
static uint32_t | NAIBRD_CAN_GEN3_AddressAddr [] = NAI_CAN_GEN3_REG_ADDRESS_ADD |
static uint32_t | NAIBRD_CAN_GEN3_BaudrateAddr [] = NAI_CAN_GEN3_REG_BAUDRATE_ADD |
static uint32_t | NAIBRD_CAN_GEN3_PrescaleExtAddr [] = NAI_CAN_GEN3_REG_PRESCALER_EXT_ADD |
static uint32_t | NAIBRD_CAN_GEN3_IntStatusAddr [] = NAI_CAN_GEN3_REG_RECV_INT_STATUS_ADD |
static uint32_t | NAIBRD_CAN_GEN3_IntVectorAddr [] = NAI_CAN_GEN3_REG_RECV_INT_VECTOR_ADD |
static uint32_t | NAIBRD_CAN_GEN3_PGNFilterHiAddr [] = NAI_CAN_GEN3_REG_PGN_HI_FILTER_ADD |
static uint32_t | NAIBRD_CAN_GEN3_PGNFilterLoAddr [] = NAI_CAN_GEN3_REG_PGN_LO_FILTER_ADD |
static uint32_t | NAIBRD_CAN_GEN3_PriorityFilterAddr [] = NAI_CAN_GEN3_REG_PRIORITY_FILTER_ADD |
static uint32_t | NAIBRD_CAN_GEN3_DestSrcFilterAddr [] = NAI_CAN_GEN3_REG_DESTSRC_FILTER_ADD |
static uint32_t | NAIBRD_CAN_GEN3_AcceptMaskHiAddr [] = NAI_CAN_GEN3_REG_ACCEPT_MASK_HI_ADD |
static uint32_t | NAIBRD_CAN_GEN3_AcceptMaskLoAddr [] = NAI_CAN_GEN3_REG_ACCEPT_MASK_LO_ADD |
static uint32_t | NAIBRD_CAN_GEN3_AcceptCodeHiAddr [] = NAI_CAN_GEN3_REG_ACCEPT_CODE_HI_ADD |
static uint32_t | NAIBRD_CAN_GEN3_AcceptCodeLoAddr [] = NAI_CAN_GEN3_REG_ACCEPT_CODE_LO_ADD |
static uint32_t | NAIBRD_CAN_GEN5_ControlAddr [] = NAI_CAN_GEN5_REG_CTRL_ADD |
static uint32_t | NAIBRD_CAN_GEN5_RxFIFOAddr [] = NAI_CAN_GEN5_REG_RX_BUFFER_ADD |
static uint32_t | NAIBRD_CAN_GEN5_RxFIFOCount [] = NAI_CAN_GEN5_REG_RX_BUFFER_COUNT_ADD |
static uint32_t | NAIBRD_CAN_GEN5_RxFIFOFrameCount [] = NAI_CAN_GEN5_REG_RX_FRAME_COUNT_ADD |
static uint32_t | NAIBRD_CAN_GEN5_TxFIFOAddr [] = NAI_CAN_GEN5_REG_TX_BUFFER_ADD |
static uint32_t | NAIBRD_CAN_GEN5_TxFIFOCount [] = NAI_CAN_GEN5_REG_TX_BUFFER_COUNT_ADD |
static uint32_t | NAIBRD_CAN_GEN5_TxFIFOFrameCount [] = NAI_CAN_GEN5_REG_TX_FRAME_COUNT_ADD |
static uint32_t | NAIBRD_CAN_GEN5_LastErrorAddr [] = NAI_CAN_GEN5_REG_LAST_ERROR_ADD |
static uint32_t | NAIBRD_CAN_GEN5_CoreStatusAddr [] = NAI_CAN_GEN5_REG_CORE_STATUS_ADD |
static uint32_t | NAIBRD_CAN_GEN5_CommStatusAddr [] = NAI_CAN_GEN5_REG_COMM_STATUS_ADD |
static uint32_t | NAIBRD_CAN_GEN5_BusStatusAddr [] = NAI_CAN_GEN5_REG_BUS_STATUS_ADD |
static uint32_t | NAIBRD_CAN_GEN5_AddressAddr [] = NAI_CAN_GEN5_REG_ADDRESS_ADD |
static uint32_t | NAIBRD_CAN_GEN5_BaudTimingAddr [] = NAI_CAN_GEN5_REG_BAUDRATE_BIT_TIMING_ADD |
static uint32_t | NAIBRD_CAN_GEN5_ErrCntAddr [] = NAI_CAN_GEN5_REG_ERROR_COUNTER_ADD |
static uint32_t | NAIBRD_CAN_GEN5_TxFIFOAlmostEmptyAddr [] = NAI_CAN_GEN5_REG_TX_BUF_ALMOST_EMPTY_ADD |
static uint32_t | NAIBRD_CAN_GEN5_RxFIFOAlmostFullAddr [] = NAI_CAN_GEN5_REG_RX_BUF_ALMOST_FULL_ADD |
static uint32_t | NAIBRD_CAN_GEN5_RxFIFOHighWatermarkAddr [] = NAI_CAN_GEN5_REG_RX_BUF_HI_WATERMARK_ADD |
static uint32_t | NAIBRD_CAN_GEN5_RxFIFOLowWatermarkAddr [] = NAI_CAN_GEN5_REG_RX_BUF_LO_WATERMARK_ADD |
static uint32_t | NAIBRD_CAN_GEN5_FilterControlAddr [] = NAI_CAN_GEN5_REG_FILTER_CTRL_ADD |
static uint32_t | NAIBRD_CAN_GEN5_AcceptMaskAddr [][NAIBRD_GEN5_CAN_MAX_ACCEPT_FILTER_COUNT] = NAI_CAN_GEN5_REG_ACCEPT_MASK_ADD |
static uint32_t | NAIBRD_CAN_GEN5_AcceptCodeAddr [][NAIBRD_GEN5_CAN_MAX_ACCEPT_FILTER_COUNT] = NAI_CAN_GEN5_REG_ACCEPT_CODE_ADD |
static uint32_t | NAIBRD_CAN_GEN5_FifoStatusAddr [] = NAI_CAN_GEN5_REG_FIFO_STATUS_ADD |
static uint32_t | NAIBRD_CAN_GEN5_DropCountAddr [] = NAI_CAN_GEN5_REG_DROP_COUNT_ADD |
static uint32_t | NAIBRD_CAN_GEN5_IntStatusAddr [NAIBRD_CAN_CHAN_MAPPED_STATUS_TYPE_ENUM_COUNT] |
static uint32_t | NAIBRD_CAN_GEN3_IntEnableAddr [NAIBRD_CAN_CHAN_MAPPED_STATUS_TYPE_ENUM_COUNT] |
static uint32_t | NAIBRD_CAN_GEN5_CB1_TO_CB3_IntEnableAddr [NAIBRD_CAN_CHAN_MAPPED_STATUS_TYPE_ENUM_COUNT] |
static uint32_t | NAIBRD_CAN_GEN5_CB6_IntEnableAddr [NAIBRD_CAN_CHAN_MAPPED_STATUS_TYPE_ENUM_COUNT] |
static uint32_t | NAIBRD_CAN_GEN5_SWT_DataReg [NAIBRD_GEN5_CAN_MAX_CHANNEL_COUNT] = NAI_CAN_GEN5_REG_SWT_DATA_ADD |
static uint32_t | NAIBRD_CAN_GEN5_ProtocolAssignmentAddr [] = NAI_CAN_GEN5_REG_PROTOCOL_ASSIGNMENT_ADD |
static uint32_t | NAIBRD_CAN_GEN5_TX_RX_EnableStateAddr [] = NAI_CAN_GEN5_REG_TX_RX_ENABLE_STATE_ADD |
static uint32_t | NAIBRD_CAN_GEN5_BaudRateAddr [] = NAI_CAN_GEN5_REG_BAUDRATE_ADD |
static const uint32_t | NAIBRD_CAN_GEN5_IntNumber [NAIBRD_CAN_CHAN_MAPPED_STATUS_TYPE_ENUM_COUNT] |
static const uint32_t | NAIBRD_CAN_GEN5_TriggerType [NAIBRD_CAN_CHAN_MAPPED_STATUS_TYPE_ENUM_COUNT] |
static const uint32_t | CAN_MOD_VERSION_OF_ENHANCED_CONFIG_CONTROL = 0x0000010D |
typedef uint32_t naibrd_can_addr_claim_t |
typedef uint32_t naibrd_can_filter_ctrl_type_t |
typedef uint32_t naibrd_can_gen3_p6_ctrl_t |
typedef uint32_t naibrd_can_gen3_pa_ctrl_t |
typedef uint32_t naibrd_can_gen5_ctrl_t |
typedef uint32_t naibrd_can_msg_t |
NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_ApplyAcceptFilterChanges | ( | int32_t | cardIndex, |
int32_t | module, | ||
int32_t | channel ) |
Clears a bit in the filter control register indicating the user is finished making acceptance filter changes. Call this function will force the CAN module to once again check and apply any detected changes to the CAN filtering.
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]). |
NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_ApplyConfigChanges | ( | int32_t | cardIndex, |
int32_t | module, | ||
int32_t | channel ) |
Clears a bit in the control register indicating the user is finished making configuration changes. Calling this function will force the CAN module to once again check and apply any detected changes to the CAN configuration.
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]). |
NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_ChannelReset | ( | int32_t | cardIndex, |
int32_t | module, | ||
int32_t | channel ) |
Reset the channel specified.
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]). |
NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_CheckBITComplete | ( | int32_t | cardIndex, |
int32_t | module, | ||
int32_t | channel, | ||
bool_t * | p_outbitComplete ) |
Retrieves the BIT status (complete or incomplete) of the channel specified.
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]). |
p_outbitComplete | : (Output) 0 = BIT not done, 1 = BIT complete. |
NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_ClearAcceptFilter | ( | int32_t | cardIndex, |
int32_t | module, | ||
int32_t | channel, | ||
int32_t | filter ) |
Clears all acceptance filter settings for the specified Card, Module, Channel and Filter.
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]). |
filter | : (Input) Filter value specifying which filter to clear configuration. |
NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_ClearBITStatus | ( | int32_t | cardIndex, |
int32_t | module, | ||
int32_t | channel ) |
Clears the latched BIT status of the channel specified.
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]). |
NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_ClearChanMappedStatusRaw | ( | int32_t | cardIndex, |
int32_t | module, | ||
naibrd_can_chan_mapped_status_type_t | statusType, | ||
uint32_t | statusRaw ) |
Clears the status data value in the register associated to the status type specified. NOTE: this function does not apply to *_REALTIME status types, which do not clear. If a *_REALTIME status type is specified, this function returns NAI_ERROR_INVALID_VALUE.
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]). |
statusType | : (Input) Status Type: refer to naibrd_can_chan_mapped_status_type_t definition. |
statusRaw | : (Input) Raw Data Code. |
|
static |
NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_GetAcceptCodeFilter | ( | int32_t | cardIndex, |
int32_t | module, | ||
int32_t | channel, | ||
int32_t | filter, | ||
int32_t * | p_outacceptcode ) |
Get the CAN channel's Acceptance Code filter value. When the Acceptance Code filter is enabled, only messages with an Acceptance Code / Mask matching the filter value are accepted.
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]). |
filter | : (Input) Index of acceptance filter (1 based). |
p_outacceptcode | : (Output) Acceptance Code value. |
NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_GetAcceptCodeFilterEnable | ( | int32_t | cardIndex, |
int32_t | module, | ||
int32_t | channel, | ||
int32_t | filter, | ||
bool_t * | outenable ) |
Get Acceptance Code / Mask filter enable setting for the channel specified.
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]). |
filter | : (Input) Index of acceptance filter (1 based). |
outenable | : (Output) NAI_TRUE: Enabled, NAI_FALSE: Disabled. |
NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_GetAcceptMaskFilter | ( | int32_t | cardIndex, |
int32_t | module, | ||
int32_t | channel, | ||
int32_t | filter, | ||
int32_t * | p_outacceptmask ) |
Get the CAN channel's Acceptance Mask filter value (CAN A/B only). When the Acceptance Code filter is enabled, only messages with an Acceptance Code / Mask matching the filter value are accepted.
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]). |
filter | : (Input) Index of acceptance filter (1 based). |
p_outacceptmask | : (Output) Acceptance Mask value. |
nai_status_t NAIAPI naibrd_CAN_GetBITInterruptEnable | ( | int32_t | cardIndex, |
int32_t | module, | ||
int32_t | channel, | ||
bool_t * | p_outintEnable ) |
Retrieves the BIT Interrupt Enable register value for the specified CAN channel. Setting the bits to 1 enabled interrupts. Status is reported in the BIT Interrupt Status register.
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]). |
p_outintEnable | : (Output) enabled(1) and/or disabled(0). |
NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_GetBITInterruptSteering | ( | int32_t | cardIndex, |
int32_t | module, | ||
naibrd_int_steering_t * | p_outsteering ) |
Retrieves the BIT Interrupt Steering which indicates the interrupt direction for the specified channel.
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]). |
p_outsteering | : (Output) Interrupt Steering: refer to naibrd_int_steering_t definition. |
NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_GetBITInterruptTriggerType | ( | int32_t | cardIndex, |
int32_t | module, | ||
int32_t | channel, | ||
uint32_t * | p_outtriggerType ) |
Retrieves the BIT Interrupt Trigger Type (Edge/Level) register value for the specified CAN channel.
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]). |
p_outtriggerType | : (Output)(0 = EDGE, 1 = LEVEL). |
NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_GetBITInterruptVector | ( | int32_t | cardIndex, |
int32_t | module, | ||
uint32_t * | p_outvector ) |
Retrieves the BIT interrupt vector for the specified CAN module.
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]). |
p_outvector | : (Output) Interrupt vector. |
NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_GetBITStatus | ( | int32_t | cardIndex, |
int32_t | module, | ||
int32_t | channel, | ||
naibrd_can_chan_mapped_status_type_t | statusType, | ||
bool_t * | p_outbitStatus ) |
Retrieves the BIT status of the channel specified.
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]). |
statusType | : (Input) The CAN status type to read - For BIT it should be either NAIBRD_CAN_STATUS_BIT_LATCHED or NAIBRD_CAN_STATUS_BIT_REALTIME. |
p_outbitStatus | : (Output) Channel BIT Status (0 = pass, 1 = fail). |
NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_GetChanMappedInterruptEnable | ( | int32_t | cardIndex, |
int32_t | module, | ||
int32_t | channel, | ||
naibrd_can_chan_mapped_status_type_t | statusType, | ||
bool_t * | p_outenable ) |
Get the interrupt enable for the specified channel.
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]). |
statusType | : (Input) CAN Status Type - refer to naibrd_can_chan_mapped_status_type_t definition. |
p_outenable | : (Output) Interrupt enable (TRUE: Enable, FALSE: Disable). |
NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_GetChanMappedInterruptEnableRaw | ( | int32_t | cardIndex, |
int32_t | module, | ||
naibrd_can_chan_mapped_status_type_t | statusType, | ||
uint32_t * | p_outenableRaw ) |
Get the value of the Interrupt enable register.
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]). |
statusType | : (Input) CAN Status Type - refer to naibrd_can_chan_mapped_status_type_t definition. |
p_outenableRaw | : (Output) The current state of the Interrupt enable register. |
NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_GetChanMappedInterruptSteering | ( | int32_t | cardIndex, |
int32_t | module, | ||
naibrd_can_chan_mapped_status_type_t | statusType, | ||
naibrd_int_steering_t * | p_outsteering ) |
Retrieves the Interrupt Steering which indicates the interrupt direction for the specified channel.
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]). |
statusType | : (Input) Status Type: refer to naibrd_can_chan_mapped_status_type_t definition. |
p_outsteering | : (Output) Interrupt Steering: refer to naibrd_int_steering_t definition. |
NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_GetChanMappedInterruptTriggerType | ( | int32_t | cardIndex, |
int32_t | module, | ||
int32_t | channel, | ||
naibrd_can_chan_mapped_status_type_t | statusType, | ||
naibrd_int_trigger_type_t * | p_outtriggerType ) |
Retrieves the Interrupt Trigger Type (Edge/Level) register value for the specified CAN channel.
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]). |
statusType | : (Input) Status Type: refer to nai_can_status_type_t definition. |
p_outtriggerType | : (Output)Bitmask of the trigger Mode of interrupts (0 = EDGE, 1 = LEVEL). |
NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_GetChanMappedInterruptTriggerTypeRaw | ( | int32_t | cardIndex, |
int32_t | module, | ||
int32_t | channel, | ||
naibrd_can_chan_mapped_status_type_t | statusType, | ||
uint32_t * | p_outtriggerTypeRegValue ) |
Gets the Interrupt Edge/Level register value for the specified CAN channel.
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]). |
statusType | : (Input) Status Type: refer to nai_can_status_type_t definition. |
p_outtriggerTypeRegValue | : (Output) Bitmask where each bit represents a channel. Bit 0 is channel 1 Bit 1 is channel 2 etc... The value at each bit location indicates the trigger type where 0 = EDGE, 1 = LEVEL. |
NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_GetChanMappedInterruptVector | ( | int32_t | cardIndex, |
int32_t | module, | ||
naibrd_can_chan_mapped_status_type_t | statusType, | ||
uint32_t * | p_outvector ) |
Get the interrupt vector for the specified channel. This function is for Gen5 and above. For Gen3 modules, naibrd_CAN_GetInterruptVectorForChannel should be called where a channel can be passed in.
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]). |
statusType | : (Input) Status Type: refer to naibrd_can_chan_mapped_status_type_t definition. Use for Gen5 boards. |
p_outvector | : (Output) Interrupt vector. |
NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_GetChanMappedInterruptVectorForChannel | ( | int32_t | cardIndex, |
int32_t | module, | ||
int32_t | channel, | ||
naibrd_can_chan_mapped_status_type_t | statusType, | ||
uint32_t * | p_outvector ) |
Get the interrupt vector for the specified channel.
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]). |
statusType | : (Input) Status Type: refer to naibrd_can_chan_mapped_status_type_t definition. Use for Gen5 boards. |
p_outvector | : (Output) Interrupt vector. |
NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_GetChanMappedStatusRaw | ( | int32_t | cardIndex, |
int32_t | module, | ||
int32_t | channel, | ||
naibrd_can_chan_mapped_status_type_t | statusType, | ||
uint32_t * | p_outstatusRaw ) |
Get the interrupt status for all channels. Valid interrupt status flags are defined by the naibrd_can_status_type enumeration.
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]). This parameter is only valid for Gen3 version of modules and for CB6 modules of Gen5. |
statusType | : (Input) CAN Status Type - refer to naibrd_can_chan_mapped_status_type_t definition. |
p_outstatusRaw | : (Output) 32 bit register value of interrupt status - each bit signals whether an interrupt was generated for a given channel. If the value is a 1, an interrupt was generated. Bit 0 = channel 1, Bit 1 = Channel 2 and so on. |
NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_GetControlRaw | ( | int32_t | cardIndex, |
int32_t | module, | ||
int32_t | channel, | ||
uint32_t * | p_outcontrolRaw ) |
Get the control register value for a given channel. The valid control flags are defined by the NAIBRD_CAN_CTRL enumeration.
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]). |
p_outcontrolRaw | : (Output) The control register's current state. |
NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_GetEnabledAcceptFilterCount | ( | int32_t | cardIndex, |
int32_t | module, | ||
int32_t | channel, | ||
int32_t * | outenabledFilterCount ) |
Returns the number of CAN acceptance filters enabled for the specified Card, Module and Channel.
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]). |
outenabledFilterCount | : (Output) Returns how many filters are enabled. |
NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_GetFIFOEventMappedStatus | ( | int32_t | cardIndex, |
int32_t | module, | ||
int32_t | channel, | ||
naibrd_can_event_mapped_status_type_t | statusType, | ||
nai_status_bit_t * | p_outstatusBit ) |
Retrieves the requested FIFO Buffer Status for the given channel.
FIFO Buffer Status Definition: ------------------------------ NAIBRD_CAN_EVENT_STATUS_FIFO_RX_ALMOST_FULL 0x0 NAIBRD_CAN_EVENT_STATUS_FIFO_TX_ALMOST_EMPTY 0x1 NAIBRD_CAN_EVENT_STATUS_FIFO_HIGH_WATERMARK_REACHED 0x2 NAIBRD_CAN_EVENT_STATUS_FIFO_RX_EMPTY 0x4 NAIBRD_CAN_EVENT_STATUS_FIFO_TX_FULL 0x8
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]). |
statusType | : (Input) Status Type: refer to naibrd_can_event_mapped_status_type_t definition. |
p_outstatusBit | : (Output) FIFO Buffer Status. |
NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_GetFIFOEventMappedStatusRaw | ( | int32_t | cardIndex, |
int32_t | module, | ||
int32_t | channel, | ||
nai_status_access_type_t | accessType, | ||
naibrd_can_event_mapped_category_type_t | categoryType, | ||
uint32_t * | p_outstatusRaw ) |
NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_GetMaxAcceptFilterCount | ( | int32_t | cardIndex, |
int32_t | module, | ||
int32_t | channel, | ||
int32_t * | p_outmaxAcceptFilterCount ) |
Retrieve the max acceptance filter count for the specified module.
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]). |
p_outmaxAcceptFilterCount | : (Output) Maximum number acceptance filters that can be configured for given Module ID. |
|
static |
NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_GetProtocol | ( | int32_t | cardIndex, |
int32_t | module, | ||
int32_t | channel, | ||
naibrd_can_protocol_type_t * | p_outprotocol ) |
naibrd_CAN_GetProtocol gets the CAN protocol being used for the specified channel. Modules such as CB1 will always report a protocol of CAN AB, CB2 will always report a protocol of J1939 and CB3 could potentially be either CAN AB or J1939 depending on how each channel was configured.
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]). |
*p_outprotocol | : (Output) CAN protocol channel is currently configured to. |
NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_GetRTRAcceptFilter | ( | int32_t | cardIndex, |
int32_t | module, | ||
int32_t | channel, | ||
int32_t | filter, | ||
bool_t * | p_outacceptRTRMsgs ) |
Get RTR (Remote Transmission Request) acceptance filter setting for the channel specified.
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]). |
filter | : (Input) Index of acceptance filter (1 based). |
p_outacceptRTRMsgs | : (Output) NAI_TRUE: Enabled (Allow only messages that have RTR bit set), NAI_FALSE: Disabled. (Allow only messages that do not have RTR bit set) |
NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_GetRTRAcceptFilterEnable | ( | int32_t | cardIndex, |
int32_t | module, | ||
int32_t | channel, | ||
int32_t | filter, | ||
bool_t * | p_outenable ) |
Get remote transmission request (RTR) acceptance filter enable setting for the channel specified.
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]). |
filter | : (Input) Index of acceptance filter (1 based). |
p_outenable | : (Output) NAI_TRUE: Enabled, NAI_FALSE: Disabled. |
NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_GetRxEnable | ( | int32_t | cardIndex, |
int32_t | module, | ||
int32_t | channel, | ||
bool_t * | p_outenable ) |
Get Receive enable setting for the channel specified.
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]). |
p_outenable | : (Output) NAI_TRUE: Enabled, NAI_FALSE: Disabled. |
NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_GetRxFIFOAlmostFull | ( | int32_t | cardIndex, |
int32_t | module, | ||
int32_t | channel, | ||
int32_t * | p_outalmostFullValue ) |
Get the Rx FIFO Almost Full value for a given channel.
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]). |
p_outalmostFullValue | : (Output) Value specifying at what value the Rx FIFO is considered Almost Full. |
NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_GetRxFIFOHighWatermark | ( | int32_t | cardIndex, |
int32_t | module, | ||
int32_t | channel, | ||
int32_t * | p_outhighWatermarkValue ) |
Get the Rx FIFO High Watermark value for a given channel.
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]). |
p_outhighWatermarkValue | : (Output) Value specifying the currently set value for Rx FIFO High Watermark. |
NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_GetRxFIFOLowWatermark | ( | int32_t | cardIndex, |
int32_t | module, | ||
int32_t | channel, | ||
int32_t * | p_outlowWatermarkValue ) |
Get the Rx FIFO Low Watermark value for a given channel.
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]). |
p_outlowWatermarkValue | : (Output) Value specifying the currently set value for Rx FIFO Low Watermark. |
NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_GetSRRAcceptFilter | ( | int32_t | cardIndex, |
int32_t | module, | ||
int32_t | channel, | ||
int32_t | filter, | ||
bool_t * | p_outacceptSRRMsgs ) |
Get SRR (Substitute Remote Request) acceptance filter enable setting for the channel specified.
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]). |
filter | : (Input) Index of acceptance filter (1 based). |
p_outacceptSRRMsgs | : (Output) NAI_TRUE: Enabled (Allow only messages that have SRR bit set), NAI_FALSE: Disabled. (Allow only messages that do not have SRR bit set) |
NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_GetSRRAcceptFilterEnable | ( | int32_t | cardIndex, |
int32_t | module, | ||
int32_t | channel, | ||
int32_t | filter, | ||
bool_t * | outenable ) |
Get substitute remote transmission request (SRR) accept filter enable setting for the channel specified.
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]). |
filter | : (Input) Index of acceptance filter (1 based). |
outenable | : (Output) NAI_TRUE: Enabled, NAI_FALSE: Disabled. |
NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_GetStdExtAcceptFilter | ( | int32_t | cardIndex, |
int32_t | module, | ||
int32_t | channel, | ||
int32_t | filter, | ||
bool_t * | p_outacceptStdMsgs ) |
Get Standard / Extended Mode filter enable setting for the channel specified.
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]). |
filter | : (Input) Index of acceptance filter (1 based). |
p_outacceptStdMsgs | : (Output) NAI_TRUE: Enabled (Standard messages only), NAI_FALSE: Disabled. (Extended messages only) |
NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_GetStdExtAcceptFilterEnable | ( | int32_t | cardIndex, |
int32_t | module, | ||
int32_t | channel, | ||
int32_t | filter, | ||
bool_t * | outenable ) |
Get CAN-A / CAN-B filter enable setting for the channel specified.
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]). |
filter | : (Input) Index of acceptance filter (1 based). |
outenable | : (Output) NAI_TRUE: Enabled, NAI_FALSE: Disabled. |
NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_GetTxEnable | ( | int32_t | cardIndex, |
int32_t | module, | ||
int32_t | channel, | ||
bool_t * | p_outenable ) |
Get Transmit enable setting for the channel specified.
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]). |
p_outenable | : (Output) NAI_TRUE: Enabled, NAI_FALSE: Disabled. |
NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_GetTxFIFOAlmostEmpty | ( | int32_t | cardIndex, |
int32_t | module, | ||
int32_t | channel, | ||
int32_t * | p_outalmostEmptyValue ) |
Get the Tx FIFO Almost Empty value for a given channel.
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]). |
p_outalmostEmptyValue | : (Output) Value specifying at what value the Tx FIFO is considered Almost Empty. |
NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_InitiateBIT | ( | int32_t | cardIndex, |
int32_t | module, | ||
int32_t | channel, | ||
bool_t | waitForResult ) |
Executes the CAN Built-in Test and returns the results. BIT takes the channel off line, executes the tests and then reconnects the channel. The results of the test are returned in the status if waitForResult = 1, otherwise the return value will be any of the statuses listed below with the exception of NAI_ERROR_TIMEOUT and NAI_ERROR_BIT_FAILED.
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]). |
waitForResult | : (Input) This allows this API to either wait for the BIT result before returning or return immediately after BIT is initiated. When returning immediately, please allow 5mS for the BIT to complete. Calling naibrd_CAN_GetBITStatus() after BIT is complete will return the results of the last executed test, regardless if this API returns immediately or after the test is complete. |
|
static |
|
static |
|
static |
|
static |
NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_J1939_GetDestAcceptFilter | ( | int32_t | cardIndex, |
int32_t | module, | ||
int32_t | channel, | ||
int32_t | filter, | ||
int32_t * | p_outdestAcceptFilter ) |
Get the CAN channel's destination filter value. When the destination filter is enabled, only messages with a destination address matching the filter value are accepted (J1939 only).
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]). |
filter | : (Input) Index of acceptance filter (1 based). |
p_outdestAcceptFilter | : (Output) Destination filter value. |
NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_J1939_GetDestAcceptFilterEnable | ( | int32_t | cardIndex, |
int32_t | module, | ||
int32_t | channel, | ||
int32_t | filter, | ||
bool_t * | p_outenable ) |
Get Destination filter enable setting for the channel specified (J1939 only).
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]). |
filter | : (Input) Index of acceptance filter (1 based). |
p_outenable | : (Output) NAI_TRUE: Enabled, NAI_FALSE: Disabled. |
NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_J1939_GetPGNAcceptFilter | ( | int32_t | cardIndex, |
int32_t | module, | ||
int32_t | channel, | ||
int32_t | filter, | ||
int32_t * | p_outpgnAcceptFilter ) |
Get the CAN channel's PGN filter value. When the PGN filter is enabled, only messages with a PGN matching the filter value are accepted (J1939 only).
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]). |
filter | : (Input) Index of acceptance filter (1 based). |
p_outpgnAcceptFilter | : (Output) PGN filter value. |
NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_J1939_GetPGNAcceptFilterEnable | ( | int32_t | cardIndex, |
int32_t | module, | ||
int32_t | channel, | ||
int32_t | filter, | ||
bool_t * | p_outenable ) |
Get PGN filter enable setting for the channel specified (J1939 only).
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]). |
filter | : (Input) Index of acceptance filter (1 based). |
p_outenable | : (Output) NAI_TRUE: Enabled, NAI_FALSE: Disabled. |
NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_J1939_GetPriorityAcceptFilter | ( | int32_t | cardIndex, |
int32_t | module, | ||
int32_t | channel, | ||
int32_t | filter, | ||
int32_t * | p_outpriorityAcceptFilter ) |
Get the CAN channel's priority filter value. When the priority filter is enabled, only messages with a priority matching the filter value are accepted (J1939 only).
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]). |
filter | : (Input) Index of acceptance filter (1 based). |
p_outpriorityAcceptFilter | : (Output) Priority filter value. |
NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_J1939_GetPriorityAcceptFilterEnable | ( | int32_t | cardIndex, |
int32_t | module, | ||
int32_t | channel, | ||
int32_t | filter, | ||
bool_t * | p_outenable ) |
Get Priority filter enable setting for the channel specified (J1939 only).
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]). |
filter | : (Input) Index of acceptance filter (1 based). |
p_outenable | : (Output) NAI_TRUE: Enabled, NAI_FALSE: Disabled. |
NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_J1939_GetSrcAcceptFilter | ( | int32_t | cardIndex, |
int32_t | module, | ||
int32_t | channel, | ||
int32_t | filter, | ||
int32_t * | p_outsrcAcceptFilter ) |
Get the CAN channel's source filter value. When the source filter is enabled, only messages with a source address matching the filter value are accepted (J1939 only).
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]). |
filter | : (Input) Index of acceptance filter (1 based). |
p_outsrcAcceptFilter | : (Output) Source filter value. |
NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_J1939_GetSrcAcceptFilterEnable | ( | int32_t | cardIndex, |
int32_t | module, | ||
int32_t | channel, | ||
int32_t | filter, | ||
bool_t * | p_outenable ) |
Get Source filter enable setting for the channel specified (J1939 only).
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]). |
filter | : (Input) Index of acceptance filter (1 based). |
p_outenable | : (Output) NAI_TRUE: Enabled, NAI_FALSE: Disabled. |
NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_J1939_SetDestAcceptFilter | ( | int32_t | cardIndex, |
int32_t | module, | ||
int32_t | channel, | ||
int32_t | filter, | ||
int32_t | destAcceptFilter ) |
Set the CAN channel's destination filter value. When the destination filter is enabled, only messages with a destination address matching the filter value are accepted (J1939 only). NOTE: Configuring of filters should be performed between calls to naibrd_CAN_StartAcceptFilterChanges and naibrd_CAN_ApplyAcceptFilterChanges.
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]). |
filter | : (Input) Index of acceptance filter (1 based). |
destAcceptFilter | : (Input) Destination Filter value. |
NAIBRDFUNC nai_status_t naibrd_CAN_J1939_SetDestAcceptFilterEnable | ( | int32_t | cardIndex, |
int32_t | module, | ||
int32_t | channel, | ||
int32_t | filter, | ||
bool_t | enable ) |
Enables or disables Destination filtering for the channel specified (J1939 only). NOTE: Configuring of filters should be performed between calls to naibrd_CAN_StartAcceptFilterChanges and naibrd_CAN_ApplyAcceptFilterChanges.
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]). |
filter | : (Input) Index of acceptance filter (1 based). |
enable | : (Input) NAI_TRUE: Enable, NAI_FALSE: Disable. |
NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_J1939_SetPGNAcceptFilter | ( | int32_t | cardIndex, |
int32_t | module, | ||
int32_t | channel, | ||
int32_t | filter, | ||
int32_t | pgnAcceptFilter ) |
Set the CAN channel's PGN filter value. When the PGN filter is enabled, only messages with a PGN matching the filter value are accepted (J1939 only). NOTE: Configuring of filters should be performed between calls to naibrd_CAN_StartAcceptFilterChanges and naibrd_CAN_ApplyAcceptFilterChanges.
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]). |
filter | : (Input) Index of acceptance filter (1 based). |
pgnAcceptFilter | : (Input) PGN Filter value. |
NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_J1939_SetPGNAcceptFilterEnable | ( | int32_t | cardIndex, |
int32_t | module, | ||
int32_t | channel, | ||
int32_t | filter, | ||
bool_t | enable ) |
Enables or disables PGN filtering for the channel specified (J1939 only). NOTE: Configuring of filters should be performed between calls to naibrd_CAN_StartAcceptFilterChanges and naibrd_CAN_ApplyAcceptFilterChanges.
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]). |
filter | : (Input) Index of acceptance filter (1 based). |
enable | : (Input) NAI_TRUE: Enable, NAI_FALSE: Disable. |
NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_J1939_SetPriorityAcceptFilter | ( | int32_t | cardIndex, |
int32_t | module, | ||
int32_t | channel, | ||
int32_t | filter, | ||
int32_t | priorityAcceptFilter ) |
Set the CAN channel's priority filter value. When the priority filter is enabled, only messages with a priority matching the filter value are accepted (J1939 only). NOTE: Configuring of filters should be performed between calls to naibrd_CAN_StartAcceptFilterChanges and naibrd_CAN_ApplyAcceptFilterChanges.
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]). |
filter | : (Input) Index of acceptance filter (1 based). |
priorityAcceptFilter | : (Input) Priority Filter value - valid values are 0 - 7 (0 is highest priority). |
NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_J1939_SetPriorityAcceptFilterEnable | ( | int32_t | cardIndex, |
int32_t | module, | ||
int32_t | channel, | ||
int32_t | filter, | ||
bool_t | enable ) |
Enables or disables Priority filtering for the channel specified (J1939 only). NOTE: Configuring of filters should be performed between calls to naibrd_CAN_StartAcceptFilterChanges and naibrd_CAN_ApplyAcceptFilterChanges.
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]). |
filter | : (Input) Index of acceptance filter (1 based). |
enable | : (Input) NAI_TRUE: Enable, NAI_FALSE: Disable. |
NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_J1939_SetSrcAcceptFilter | ( | int32_t | cardIndex, |
int32_t | module, | ||
int32_t | channel, | ||
int32_t | filter, | ||
int32_t | srcAcceptFilter ) |
Set the CAN channel's source filter value. When the source filter is enabled, only messages with a source address matching the filter value are accepted (J1939 only). NOTE: Configuring of filters should be performed between calls to naibrd_CAN_StartAcceptFilterChanges and naibrd_CAN_ApplyAcceptFilterChanges.
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]). |
filter | : (Input) Index of acceptance filter (1 based). |
srcAcceptFilter | : (Input) Source Filter value. Valid values are 0 - 255 |
NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_J1939_SetSrcAcceptFilterEnable | ( | int32_t | cardIndex, |
int32_t | module, | ||
int32_t | channel, | ||
int32_t | filter, | ||
bool_t | enable ) |
Enables or disables Source filtering for the channel specified (J1939 only). NOTE: Configuring of filters should be performed between calls to naibrd_CAN_StartAcceptFilterChanges and naibrd_CAN_ApplyAcceptFilterChanges.
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]). |
filter | : (Input) Index of acceptance filter (1 based). |
enable | : (Input) NAI_TRUE: Enable, NAI_FALSE: Disable. |
NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_ResetRxFIFO | ( | int32_t | cardIndex, |
int32_t | module, | ||
int32_t | channel ) |
naibrd_CAN_ResetRxFIFO forces the RX FIFO to be emptied without the need to force receiving to empty the FIFO.
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]). |
NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_ResetTxAndRxFIFOs | ( | int32_t | cardIndex, |
int32_t | module, | ||
int32_t | channel ) |
naibrd_CAN_ResetTxAndRxFIFOs forces the TX FIFO and RX FIFO to be emptied without the need to force transmitting and receiving to empty the FIFOs.
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]). |
NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_ResetTxFIFO | ( | int32_t | cardIndex, |
int32_t | module, | ||
int32_t | channel ) |
naibrd_CAN_ResetTxFIFO forces the TX FIFO to be emptied without the need to force transmission to empty the FIFO.
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]). |
NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_SetAcceptCodeFilter | ( | int32_t | cardIndex, |
int32_t | module, | ||
int32_t | channel, | ||
int32_t | filter, | ||
int32_t | acceptcode ) |
Set the CAN channel's Acceptance Code filter value. When the Acceptance Code filter is enabled, only messages with an Acceptance Code / Mask matching the filter value are accepted. NOTE: Configuring of filters should be performed between calls to naibrd_CAN_StartAcceptFilterChanges and naibrd_CAN_ApplyAcceptFilterChanges.
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]). |
filter | : (Input) Index of acceptance filter (1 based). |
acceptcode | : (Input) Acceptance Code value. |
NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_SetAcceptCodeFilterEnable | ( | int32_t | cardIndex, |
int32_t | module, | ||
int32_t | channel, | ||
int32_t | filter, | ||
bool_t | enable ) |
Enables or disables Acceptance Code / Mask filtering for the channel specified. NOTE: Configuring of filters should be performed between calls to naibrd_CAN_StartAcceptFilterChanges and naibrd_CAN_ApplyAcceptFilterChanges.
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]). |
filter | : (Input) Index of acceptance filter (1 based). |
enable | : (Input) NAI_TRUE: Enable, NAI_FALSE: Disable. |
NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_SetAcceptMaskFilter | ( | int32_t | cardIndex, |
int32_t | module, | ||
int32_t | channel, | ||
int32_t | filter, | ||
int32_t | acceptmask ) |
Set the CAN channel's Acceptance Mask value. When the Acceptance Code filter is enabled, only messages with an Acceptance Code / Mask matching the filter value are accepted. NOTE: Configuring of filters should be performed between calls to naibrd_CAN_StartAcceptFilterChanges and naibrd_CAN_ApplyAcceptFilterChanges.
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]). |
filter | : (Input) Index of acceptance filter (1 based). |
acceptmask | : (Input) Acceptance Mask value. |
NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_SetBITInterruptEnable | ( | int32_t | cardIndex, |
int32_t | module, | ||
int32_t | channel, | ||
bool_t | intEnable ) |
Sets the BIT Interrupt Enable register value for the specified CAN channel. Setting the bits to 1 enabled interrupts. Status is reported in the BIT Interrupt Status register.
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]). |
intEnable | : (Input) enable(1), disable(0). |
NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_SetBITInterruptSteering | ( | int32_t | cardIndex, |
int32_t | module, | ||
naibrd_int_steering_t | steering ) |
Sets the BIT Interrupt Steering which indicates the interrupt direction for the specified channel.
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]). |
steering | : (Input) Interrupt Steering: refer to naibrd_int_steering_t definition. |
NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_SetBITInterruptTriggerType | ( | int32_t | cardIndex, |
int32_t | module, | ||
int32_t | channel, | ||
uint32_t | triggerType ) |
Sets the BIT Interrupt Trigger Type (Edge/Level) register value for the specified CAN channel.
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]). |
triggerType | : (Input) (0 = EDGE, 1 = LEVEL). |
NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_SetBITInterruptVector | ( | int32_t | cardIndex, |
int32_t | module, | ||
uint32_t | vector ) |
Sets the BIT interrupt vector for the specified CAN module.
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]). |
vector | : (Input) Interrupt vector. |
NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_SetChanMappedInterruptEnable | ( | int32_t | cardIndex, |
int32_t | module, | ||
int32_t | channel, | ||
naibrd_can_chan_mapped_status_type_t | statusType, | ||
bool_t | enable ) |
Set the interrupt enable bit for the specified channel.
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]). |
statusType | : (Input) CAN Status Type - refer to naibrd_can_chan_mapped_status_type_t definition. |
enable | : (Input) Interrupt enable (TRUE: Enable, FALSE: Disable). |
NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_SetChanMappedInterruptEnableRaw | ( | int32_t | cardIndex, |
int32_t | module, | ||
naibrd_can_chan_mapped_status_type_t | statusType, | ||
uint32_t | enableRaw ) |
Set the value of the Interrupt enable register.
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]). |
statusType | : (Input) CAN Status Type - refer to naibrd_can_chan_mapped_status_type_t definition. |
enableRaw | : (Input) Interrupt enable register value to set. |
NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_SetChanMappedInterruptSteering | ( | int32_t | cardIndex, |
int32_t | module, | ||
naibrd_can_chan_mapped_status_type_t | statusType, | ||
naibrd_int_steering_t | steering ) |
Sets the Interrupt Steering which indicates the interrupt direction for the specified channel.
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]). |
statusType | : (Input) Status Type: refer to naibrd_can_chan_mapped_status_type_t definition. |
steering | : (Input) Interrupt Steering: refer to naibrd_int_steering_t definition. |
NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_SetChanMappedInterruptTriggerType | ( | int32_t | cardIndex, |
int32_t | module, | ||
int32_t | channel, | ||
naibrd_can_chan_mapped_status_type_t | statusType, | ||
naibrd_int_trigger_type_t | triggerType ) |
Sets the Interrupt Edge/Level register value for the specified CAN channel.
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]). |
statusType | : (Input) Status Type: refer to nai_can_status_type_t definition. |
triggerType | : (Input) Bitmask of the trigger Mode of interrupts (0 = EDGE, 1 = LEVEL). |
NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_SetChanMappedInterruptTriggerTypeRaw | ( | int32_t | cardIndex, |
int32_t | module, | ||
int32_t | channel, | ||
naibrd_can_chan_mapped_status_type_t | statusType, | ||
uint32_t | triggerTypeRegValue ) |
Sets the Interrupt Edge/Level register value for the specified CAN channel.
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]). |
statusType | : (Input) Status Type: refer to nai_can_status_type_t definition. |
triggerTypeRegValue | : (Input) Bitmask where each bit represents a channel. Bit 0 is channel 1 Bit 1 is channel 2 etc... The value at each bit location indicates the trigger type where 0 = EDGE, 1 = LEVEL. |
NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_SetChanMappedInterruptVector | ( | int32_t | cardIndex, |
int32_t | module, | ||
naibrd_can_chan_mapped_status_type_t | statusType, | ||
uint32_t | vector ) |
Set the interrupt vector for the specified channel. This function is for Gen5 and above. For Gen3 modules, naibrd_CAN_SetInterruptVectorForChannel should be called where a channel can be passed in.
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]). |
statusType | : (Input) Status Type: refer to naibrd_can_chan_mapped_status_type_t definition. Use for Gen5 boards. |
vector | : (Input) Interrupt vector. |
NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_SetChanMappedInterruptVectorForChannel | ( | int32_t | cardIndex, |
int32_t | module, | ||
int32_t | channel, | ||
naibrd_can_chan_mapped_status_type_t | statusType, | ||
uint32_t | vector ) |
Set the interrupt vector for the specified channel.
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]). |
statusType | : (Input) Status Type: refer to naibrd_can_chan_mapped_status_type_t definition. Use for Gen5 boards. |
vector | : (Input) Interrupt vector. |
NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_SetControlRaw | ( | int32_t | cardIndex, |
int32_t | module, | ||
int32_t | channel, | ||
uint32_t | controlRaw ) |
Set the control register value for a given channel. The valid control flags are defined by the NAIBRD_CAN_CTRL enumeration. NOTE: CAN Configuration calls should be performed between calls to naibrd_CAN_StartConfigChanges and naibrd_CAN_ApplyConfigChanges.
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. |
NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_SetEnabledAcceptFilterCount | ( | int32_t | cardIndex, |
int32_t | module, | ||
int32_t | channel, | ||
int32_t | enableFilterCount ) |
Specifies the number of CAN acceptance filters to be enabled for the specified Card, Module and Channel.
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]). |
enableFilterCount | : (Input) Specifies how many filters to enable. |
NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_SetProtocol | ( | int32_t | cardIndex, |
int32_t | module, | ||
int32_t | channel, | ||
naibrd_can_protocol_type_t | protocol ) |
naibrd_CAN_SetProtocol sets the CAN protocol to be used for the specified channel. This function is only supported for modules that allow a per channel protocol to be configured (such as the CB3).
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]). |
protocol | : (Input) CAN protocol to be used for the specified channel |
NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_SetRTRAcceptFilter | ( | int32_t | cardIndex, |
int32_t | module, | ||
int32_t | channel, | ||
int32_t | filter, | ||
bool_t | acceptRTRMsgs ) |
Specifies whether to allow CAN frames that have Remote Transmission Request (RTR) bit set to pass through for the channel specified. NOTE: Configuring of filters should be performed between calls to naibrd_CAN_StartAcceptFilterChanges and naibrd_CAN_ApplyAcceptFilterChanges.
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]). |
filter | : (Input) Index of acceptance filter (1 based). |
acceptRTRMsgs | : (Input) NAI_TRUE: (Allow only messages that have RTR bit set), NAI_FALSE: Disabled. (Allow only messages that do not have RTR bit set) . |
NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_SetRTRAcceptFilterEnable | ( | int32_t | cardIndex, |
int32_t | module, | ||
int32_t | channel, | ||
int32_t | filter, | ||
bool_t | enable ) |
Enables or disables remote transmission request (RTR) acceptance filtering for the channel specified (extended frame). NOTE: Configuring of filters should be performed between calls to naibrd_CAN_StartAcceptFilterChanges and naibrd_CAN_ApplyAcceptFilterChanges.
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]). |
filter | : (Input) Index of acceptance filter (1 based). |
enable | : (Input) NAI_TRUE: Enable, NAI_FALSE: Disable. |
NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_SetRxEnable | ( | int32_t | cardIndex, |
int32_t | module, | ||
int32_t | channel, | ||
bool_t | enable ) |
Enables or disables Receive for the channel specified.
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]). |
enable | : (Input) NAI_TRUE: Enable, NAI_FALSE: Disable. |
NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_SetRxFIFOAlmostFull | ( | int32_t | cardIndex, |
int32_t | module, | ||
int32_t | channel, | ||
int32_t | almostFullValue ) |
Set the Rx FIFO Almost Full value for a given channel.
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]). |
almostFullValue | : (Input) Value specifying at what value the Rx FIFO should be considered Almost Full. |
NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_SetRxFIFOHighWatermark | ( | int32_t | cardIndex, |
int32_t | module, | ||
int32_t | channel, | ||
int32_t | highWatermarkValue ) |
Set the Rx FIFO High Watermark value for a given channel.
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]). |
highWatermarkValue | : (Input) Value specifying a FIFO level marker that is considered to be a High Level . |
NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_SetRxFIFOLowWatermark | ( | int32_t | cardIndex, |
int32_t | module, | ||
int32_t | channel, | ||
int32_t | lowWatermarkValue ) |
Set the Rx FIFO Low Watermark value for a given channel.
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]). |
lowWatermarkValue | : (Input) Value specifying a FIFO level marker that is considered to be a Low Level . |
NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_SetSRRAcceptFilter | ( | int32_t | cardIndex, |
int32_t | module, | ||
int32_t | channel, | ||
int32_t | filter, | ||
bool_t | acceptSRRMsgs ) |
Specifies whether to allow CAN frames that have Substitute remote request (SRR) bit set to pass through for the channel specified. NOTE: Configuring of filters should be performed between calls to naibrd_CAN_StartAcceptFilterChanges and naibrd_CAN_ApplyAcceptFilterChanges.
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]). |
filter | : (Input) Index of acceptance filter (1 based). |
acceptSRRMsgs | : (Input) NAI_TRUE: (Only allow messages that have SRR bit set), NAI_FALSE: Disabled. (Only allow messages that do not have SRR bit set) . |
NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_SetSRRAcceptFilterEnable | ( | int32_t | cardIndex, |
int32_t | module, | ||
int32_t | channel, | ||
int32_t | filter, | ||
bool_t | enable ) |
Enables or disables substitute remote transmission request (SRR) acceptance filtering for the channel specified (standard frame). NOTE: Configuring of filters should be performed between calls to naibrd_CAN_StartAcceptFilterChanges and naibrd_CAN_ApplyAcceptFilterChanges.
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]). |
filter | : (Input) Index of acceptance filter (1 based). |
enable | : (Input) NAI_TRUE: Enable, NAI_FALSE: Disable. |
NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_SetStdExtAcceptFilter | ( | int32_t | cardIndex, |
int32_t | module, | ||
int32_t | channel, | ||
int32_t | filter, | ||
bool_t | acceptStdMsgs ) |
Specifies whether to allow Standard / Extended CAN frames to pass through for the channel specified. NOTE: Configuring of filters should be performed between calls to naibrd_CAN_StartAcceptFilterChanges and naibrd_CAN_ApplyAcceptFilterChanges.
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]). |
filter | : (Input) Index of acceptance filter (1 based). |
acceptStdMsgs | : (Input) NAI_TRUE: Enable (Allow Standard messages only), NAI_FALSE: Disable (Allow Extended messages only) . |
NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_SetStdExtAcceptFilterEnable | ( | int32_t | cardIndex, |
int32_t | module, | ||
int32_t | channel, | ||
int32_t | filter, | ||
bool_t | enable ) |
Enables or disables acceptance for Standard (CAN-A) / Extended (CAN-B) filtering for the channel specified. NOTE: Configuring of filters should be performed between calls to naibrd_CAN_StartAcceptFilterChanges and naibrd_CAN_ApplyAcceptFilterChanges.
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]). |
filter | : (Input) Index of acceptance filter (1 based). |
enable | : (Input) NAI_TRUE: Enable, NAI_FALSE: Disable. |
NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_SetTxEnable | ( | int32_t | cardIndex, |
int32_t | module, | ||
int32_t | channel, | ||
bool_t | enable ) |
Enables or disables Transmit for the channel specified.
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]). |
enable | : (Input) NAI_TRUE: Enable, NAI_FALSE: Disable. |
NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_SetTxFIFOAlmostEmpty | ( | int32_t | cardIndex, |
int32_t | module, | ||
int32_t | channel, | ||
int32_t | almostEmptyValue ) |
Set the Tx FIFO Almost Empty value for a given channel.
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]). |
almostEmptyValue | : (Input) Value specifying at what value the Tx FIFO should be considered Almost Empty. should be a value between 1 and result of naibrd_CAN_GetMaxFIFOCount() |
NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_StartAcceptFilterChanges | ( | int32_t | cardIndex, |
int32_t | module, | ||
int32_t | channel ) |
Sets a bit in the filter control register indicating the user is making acceptance filter changes. Calling this function will force the CAN module to ignore any changes made until such time that the naibrd_CAN_ApplyAcceptFilterChanges is called.
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]). |
NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_StartConfigChanges | ( | int32_t | cardIndex, |
int32_t | module, | ||
int32_t | channel ) |
Sets a bit in the control register indicating the user is making configuration changes. Calling this function will force the CAN module to ignore any configuration changes made until such time that the naibrd_CAN_ApplyConfigChanges is called.
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]). |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |