Software Library API naibrd 2.24.0
See all documentation at naii.docs.com
|
Functions | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_AR_CAN_SetSamplePoint (int32_t cardIndex, int32_t module, int32_t channel, naibrd_ar_can_sample_point_type_t samplePoint) |
Sets the sample point to be used for the channel. Most devices work just fine with a sample point of 75% (0) but some need a sample rate of 80% (1). | |
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_AR_CAN_SetSamplePoint | ( | int32_t | cardIndex, |
int32_t | module, | ||
int32_t | channel, | ||
naibrd_ar_can_sample_point_type_t | samplePoint ) |
Sets the sample point to be used for the channel. Most devices work just fine with a sample point of 75% (0) but some need a sample rate of 80% (1).
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]). |
samplePoint | : (Input) Sample point value. |
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.
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_outbaudRate | : (Output) Baud Rate. |
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.
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_outprescaler | : (Output) Baud Rate Prescaler (valid values 0x00-0x3F). |
p_outsjw | : (Output) Synchronization Jump Width (valid values 0x0-0x3). |
p_outtseg1 | : (Output) Time segment before the sample point (valid values 0x1-0xF). |
p_outtseg2 | : (Output) Time segment after the sample point (valid values 0x0-0x7). |
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.
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]). |
baudRate | : (Input) Value from nai_can_baud_rate_type_t enumeration to specify a well-known baud rate. |
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.
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]). |
prescaler | : (Input) Baud Rate Prescaler (valid values 0x00-0x3F). |
sjw | : (Input) Synchronization Jump Width (valid values 0x0-0x3). |
tseg1 | : (Input) Time segment before the sample point (valid values 0x1-0xF). |
tseg2 | : (Input) Time segment after the sample point (valid values 0x0-0x7). |