![]() |
Software Library API naibrd 1.62
See all documentation at naii.docs.com
|
Functions | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_PWM_SetSerialRxClockEdge (int32_t cardIndex, int32_t module, nai_pwm_clock_edge_t clockEdge) |
Sets the receive clock edge used by the PWM RS-422 SDLC serial port. Note, receive and transmit functions will use opposite edges (i.e. Rx Rising Edge, Tx Falling Edge OR Rx Falling Edge, Tx Rising Edge. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_PWM_GetSerialRxClockEdge (int32_t cardIndex, int32_t module, nai_pwm_clock_edge_t *p_outclockEdge) |
Retrieves the receive clock edge used by the PWM RS-422 SDLC serial port. Note, receive and transmit functions will use opposite edges (i.e. Rx Rising Edge, Tx Falling Edge OR Rx Falling Edge, Tx Rising Edge. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_PWM_GetCRCErrorCount (int32_t cardIndex, int32_t module, int32_t *p_outcrcErrorCnt) |
Retrieves the total RS-422 SDLC Serial Receive Data Frame CRC errors detected. Whenever a CRC error is detected within a received data frame, the error counter is incremented while the "CRC Error Count Disable" register is set to FALSE (0). If the count reaches the maximum value, the counter will stop counting and this register will retain the maximum count value until cleared via setting the "CRC Error Count Disable" register to TRUE (0xFFFF). In other words, the value in this register will not roll back to 0 and continue counting when the maximum count is reached. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_PWM_GetDataFrameCount (int32_t cardIndex, int32_t module, int32_t *p_outdataFrameCnt) |
Retrieves the total RS-422 SDLC Serial Receive Data Frames detected. Whenever Data Frame is detected the counter is incremented while the "Data Frame Count Disable" register is set to FALSE (0). If the count reaches the maximum value, the counter will stop counting and this register will retain the maximum count value until cleared via setting the "Data Frame Count Disable" register to TRUE (0xFFFF). In other words, the value in this register will not roll back to 0 and continue counting when the maximum count is reached. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_PWM_GetDataFrameStatus (int32_t cardIndex, int32_t module, uint32_t *p_outstatus) |
Retrieves the status of the last RS-422 SDLC Serial Data Frame. If a data frame is interrupted for any reason, an error indication shall be written to this register. The register shall retain the status of the last data frame received until another data frame transmission has completed and the new status is available. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_PWM_SetCRCErrorCountDisable (int32_t cardIndex, int32_t module, bool_t disable) |
Sets the "CRC Error Count Disable" state. When set to FALSE (0), the RS-422 SDLC Serial Receive Data Frame CRC error count is incremented. When set to TRUE (0xFFFF), the RS-422 SDLC Serial Receive Data Frame CRC error count is cleared to zero (0) and the "RS-422 SDLC Serial Receive Data Frame CRC error count" register remains at the value zero until this register is set to FALSE (0). | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_PWM_GetCRCErrorCountDisable (int32_t cardIndex, int32_t module, bool_t *p_outdisable) |
Retrieves the "CRC Error Count Disable" state. When set to FALSE (0), the RS-422 SDLC Serial Receive Data Frame CRC error count is incremented. When set to TRUE (0xFFFF), the RS-422 SDLC Serial Receive Data Frame CRC error count is cleared to zero (0) and the "RS-422 SDLC Serial Receive Data Frame CRC error count" register remains at the value zero until this register is set to FALSE (0). | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_PWM_SetDataFrameCountDisable (int32_t cardIndex, int32_t module, bool_t disable) |
Sets the "Data Frame Count Disable" state. When set to FALSE (0), the RS-422 SDLC Serial Receive Data Frame count is incremented. When set to TRUE (0xFFFF), the RS-422 SDLC Serial Receive Data Frame count is cleared to zero (0) and the "RS-422 SDLC Serial Receive Data Frame count" register remains at the value zero until this register is set to FALSE (0). | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_PWM_GetDataFrameCountDisable (int32_t cardIndex, int32_t module, bool_t *p_outdisable) |
Retrieves the "Data Frame Count Disable" state. When set to FALSE (0), the RS-422 SDLC Serial Receive Data Frame count is incremented. When set to TRUE (0xFFFF), the RS-422 SDLC Serial Receive Data Frame count is cleared to zero (0) and the "RS-422 SDLC Serial Receive Data Frame count" register remains at the value zero until this register is set to FALSE (0). | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_PWM_SetSerialTxMsgConfig (int32_t cardIndex, int32_t module, nai_pwm_tx_msg_config_t txMsgConfig) |
Sets the behavior of the last byte of the TX Data Frame. The last byte may represent either, the Test Bits (defined using naibrd_PWM_SetSerialTestBits()) or the following STATUS REGISTER: | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_PWM_GetSerialTxMsgConfig (int32_t cardIndex, int32_t module, nai_pwm_tx_msg_config_t *p_outtxMsgConfig) |
Retrieves the behavior of the last byte of the TX Data Frame. The last byte may represent either, the Test Bits (defined using naibrd_PWM_SetSerialTestBits()) or the following STATUS REGISTER: | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_PWM_SetSerialTestBits (int32_t cardIndex, int32_t module, uint32_t testBits) |
Sets values to be transmitted by the RS-422 SDLC interface whenever the ADC reading is enabled to be transmitted via the "ADC Input" and "ADC Source" registers. Only the least significant bits (D3-D0) are transmitted. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_PWM_GetSerialTestBits (int32_t cardIndex, int32_t module, uint32_t *p_outtestBits) |
Retrieves values to be transmitted by the RS-422 SDLC interface whenever the ADC reading is enabled to be transmitted via the "ADC Input" and "ADC Source" registers. Only the least significant bits (D3-D0) are transmitted. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_PWM_SetSerialTransmitEnable (int32_t cardIndex, int32_t module, bool_t enable) |
Enables or disables the Serial transmission of a frame after receipt of a valid frame. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_PWM_GetSerialTransmitEnable (int32_t cardIndex, int32_t module, bool_t *p_outenable) |
Retrieves the Enable state for the the Serial transmission of a frame after receipt of a valid frame. | |
NAIBRDFUNC nai_status_t NAIAPI naibrd_PWM_GetCRCErrorCount | ( | int32_t | cardIndex, |
int32_t | module, | ||
int32_t * | p_outcrcErrorCnt ) |
Retrieves the total RS-422 SDLC Serial Receive Data Frame CRC errors detected. Whenever a CRC error is detected within a received data frame, the error counter is incremented while the "CRC Error Count Disable" register is set to FALSE (0). If the count reaches the maximum value, the counter will stop counting and this register will retain the maximum count value until cleared via setting the "CRC Error Count Disable" register to TRUE (0xFFFF). In other words, the value in this register will not roll back to 0 and continue counting when the maximum count is reached.
Note: Invoke "naibrd_PWM_SetCRCErrorCountDisable" to clear the CRC Error Count.
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_outcrcErrorCnt | : (Output) Total RS-422 SDLC Serial Receive Data Frame CRC Error Count. |
NAIBRDFUNC nai_status_t NAIAPI naibrd_PWM_GetCRCErrorCountDisable | ( | int32_t | cardIndex, |
int32_t | module, | ||
bool_t * | p_outdisable ) |
Retrieves the "CRC Error Count Disable" state. When set to FALSE (0), the RS-422 SDLC Serial Receive Data Frame CRC error count is incremented. When set to TRUE (0xFFFF), the RS-422 SDLC Serial Receive Data Frame CRC error count is cleared to zero (0) and the "RS-422 SDLC Serial Receive Data Frame CRC error count" register remains at the value zero until this register is set to FALSE (0).
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_outdisable | : (Output) FALSE to increment Serial CRC Error Count upon detecting CRC error, TRUE to clear the CRC Error Count. |
NAIBRDFUNC nai_status_t NAIAPI naibrd_PWM_GetDataFrameCount | ( | int32_t | cardIndex, |
int32_t | module, | ||
int32_t * | p_outdataFrameCnt ) |
Retrieves the total RS-422 SDLC Serial Receive Data Frames detected. Whenever Data Frame is detected the counter is incremented while the "Data Frame Count Disable" register is set to FALSE (0). If the count reaches the maximum value, the counter will stop counting and this register will retain the maximum count value until cleared via setting the "Data Frame Count Disable" register to TRUE (0xFFFF). In other words, the value in this register will not roll back to 0 and continue counting when the maximum count is reached.
Note: Invoke "naibrd_PWM_SetDataFrameCountDisable" to clear the Data Frame Count.
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_outdataFrameCnt | : (Output) Total RS-422 SDLC Serial Receive Data Frame Count. |
NAIBRDFUNC nai_status_t NAIAPI naibrd_PWM_GetDataFrameCountDisable | ( | int32_t | cardIndex, |
int32_t | module, | ||
bool_t * | p_outdisable ) |
Retrieves the "Data Frame Count Disable" state. When set to FALSE (0), the RS-422 SDLC Serial Receive Data Frame count is incremented. When set to TRUE (0xFFFF), the RS-422 SDLC Serial Receive Data Frame count is cleared to zero (0) and the "RS-422 SDLC Serial Receive Data Frame count" register remains at the value zero until this register is set to FALSE (0).
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_outdisable | : (Output) FALSE to increment Serial Data Frame Count, TRUE to clear the Serial Data Frame Count. |
NAIBRDFUNC nai_status_t NAIAPI naibrd_PWM_GetDataFrameStatus | ( | int32_t | cardIndex, |
int32_t | module, | ||
uint32_t * | p_outstatus ) |
Retrieves the status of the last RS-422 SDLC Serial Data Frame. If a data frame is interrupted for any reason, an error indication shall be written to this register. The register shall retain the status of the last data frame received until another data frame transmission has completed and the new status is available.
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_outstatus | : (Output) Status of the last RS-422 SDLC Serial Data Frame (0x0000 = Frame Valid and 0xFFFF = Frame Error). |
NAIBRDFUNC nai_status_t NAIAPI naibrd_PWM_GetSerialRxClockEdge | ( | int32_t | cardIndex, |
int32_t | module, | ||
nai_pwm_clock_edge_t * | p_outclockEdge ) |
Retrieves the receive clock edge used by the PWM RS-422 SDLC serial port. Note, receive and transmit functions will use opposite edges (i.e. Rx Rising Edge, Tx Falling Edge OR Rx Falling Edge, Tx Rising Edge.
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_outclockEdge | : (Output) NAI_PWM_CLOCK_EDGE_RISING or NAI_PWM_CLOCK_EDGE_FALLING. |
NAIBRDFUNC nai_status_t NAIAPI naibrd_PWM_GetSerialTestBits | ( | int32_t | cardIndex, |
int32_t | module, | ||
uint32_t * | p_outtestBits ) |
Retrieves values to be transmitted by the RS-422 SDLC interface whenever the ADC reading is enabled to be transmitted via the "ADC Input" and "ADC Source" registers. Only the least significant bits (D3-D0) are transmitted.
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_outtestBits | : (Output) Test Bits to transmit. |
NAIBRDFUNC nai_status_t NAIAPI naibrd_PWM_GetSerialTransmitEnable | ( | int32_t | cardIndex, |
int32_t | module, | ||
bool_t * | p_outenable ) |
Retrieves the Enable state for the the Serial transmission of a frame after receipt of a valid frame.
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_outenable | : (Input) Enables (1) or Disables (0). |
NAIBRDFUNC nai_status_t NAIAPI naibrd_PWM_GetSerialTxMsgConfig | ( | int32_t | cardIndex, |
int32_t | module, | ||
nai_pwm_tx_msg_config_t * | p_outtxMsgConfig ) |
Retrieves the behavior of the last byte of the TX Data Frame. The last byte may represent either, the Test Bits (defined using naibrd_PWM_SetSerialTestBits()) or the following STATUS REGISTER:
D3 = PS Overvoltage or Undervoltage D2 = Drive 2 Fault D1 = Drive 1 Fault D2 = Master Drive Status Switch
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_outtxMsgConfig | : (Output) Value defined in nai_pwm_tx_msg_config_t. |
NAIBRDFUNC nai_status_t NAIAPI naibrd_PWM_SetCRCErrorCountDisable | ( | int32_t | cardIndex, |
int32_t | module, | ||
bool_t | disable ) |
Sets the "CRC Error Count Disable" state. When set to FALSE (0), the RS-422 SDLC Serial Receive Data Frame CRC error count is incremented. When set to TRUE (0xFFFF), the RS-422 SDLC Serial Receive Data Frame CRC error count is cleared to zero (0) and the "RS-422 SDLC Serial Receive Data Frame CRC error count" register remains at the value zero until this register is set to FALSE (0).
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]). |
disable | : (Input) FALSE to increment Serial CRC Error Count upon detecting CRC error, TRUE to clear the CRC Error Count. |
NAIBRDFUNC nai_status_t NAIAPI naibrd_PWM_SetDataFrameCountDisable | ( | int32_t | cardIndex, |
int32_t | module, | ||
bool_t | disable ) |
Sets the "Data Frame Count Disable" state. When set to FALSE (0), the RS-422 SDLC Serial Receive Data Frame count is incremented. When set to TRUE (0xFFFF), the RS-422 SDLC Serial Receive Data Frame count is cleared to zero (0) and the "RS-422 SDLC Serial Receive Data Frame count" register remains at the value zero until this register is set to FALSE (0).
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]). |
disable | : (Input) FALSE to increment Serial Data Frame Count, TRUE to clear the Serial Data Frame Count. |
NAIBRDFUNC nai_status_t NAIAPI naibrd_PWM_SetSerialRxClockEdge | ( | int32_t | cardIndex, |
int32_t | module, | ||
nai_pwm_clock_edge_t | clockEdge ) |
Sets the receive clock edge used by the PWM RS-422 SDLC serial port. Note, receive and transmit functions will use opposite edges (i.e. Rx Rising Edge, Tx Falling Edge OR Rx Falling Edge, Tx Rising Edge.
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]). |
clockEdge | : (Input) NAI_PWM_CLOCK_EDGE_RISING or NAI_PWM_CLOCK_EDGE_FALLING. |
NAIBRDFUNC nai_status_t NAIAPI naibrd_PWM_SetSerialTestBits | ( | int32_t | cardIndex, |
int32_t | module, | ||
uint32_t | testBits ) |
Sets values to be transmitted by the RS-422 SDLC interface whenever the ADC reading is enabled to be transmitted via the "ADC Input" and "ADC Source" registers. Only the least significant bits (D3-D0) are transmitted.
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]). |
testBits | : (Input) Test Bits to transmit. |
NAIBRDFUNC nai_status_t NAIAPI naibrd_PWM_SetSerialTransmitEnable | ( | int32_t | cardIndex, |
int32_t | module, | ||
bool_t | enable ) |
Enables or disables the Serial transmission of a frame after receipt of a valid frame.
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]). |
enable | : (Input) Enables (1) or Disables (0). |
NAIBRDFUNC nai_status_t NAIAPI naibrd_PWM_SetSerialTxMsgConfig | ( | int32_t | cardIndex, |
int32_t | module, | ||
nai_pwm_tx_msg_config_t | txMsgConfig ) |
Sets the behavior of the last byte of the TX Data Frame. The last byte may represent either, the Test Bits (defined using naibrd_PWM_SetSerialTestBits()) or the following STATUS REGISTER:
D3 = PS Overvoltage or Undervoltage D2 = Drive 2 Fault D1 = Drive 1 Fault D2 = Master Drive Status Switch
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]). |
txMsgConfig | : (Input) Value defined in nai_pwm_tx_msg_config_t. |