Software Library API naibrd 2.24.0
See all documentation at naii.docs.com
|
Functions | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_LL2_SetDLVData (int32_t cardIndex, int32_t module, naibrd_LL2_cmd_data_t cmdData, uint32_t crc) |
Writes the DLV Command data to the LL2 command registers. The DLV data is not output until commanded by a call to naibrd_LL2_InitiateSendCmd(). The data has no affect on the DLV until the command to send the data is given. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_LL2_GetDLVData (int32_t cardIndex, int32_t module, naibrd_LL2_cmd_data_t *p_outcmdData, uint32_t *p_outcrc) |
Retrieves the DLV Command data from the LL2 module. The DLV data is not output until commanded by a call to naibrd_LL2_InitiateSendCmd(). The data has no affect on the DLV until the command to send the data is given. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_LL2_GetInitiateSendCmd (int32_t cardIndex, int32_t module, uint32_t *p_outsendDataCmd) |
Retrieves the value of the NAI_LL2_INITIATE_SEND_CMD register. If the value is 0, then the hardware is ready to output the data that resides in the DLV command registers, which is done by calling naibrd_LL2_InitiateSendCmd(). A value of NAIBRD_LL2_SEND_DATA_CMD (0xFEEDDADA) indicates the HW is busy with the previous send operation. This API can be polled until the value is 0 before attempting to call naibrd_LL2_InitiateSendCmd() to send the data to the DLV. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_LL2_InitiateSendCmd (int32_t cardIndex, int32_t module) |
Initiates sending the data from the LL2 to the DLV. This is done by writing NAIBRD_LL2_SEND_DATA_CMD (0xFEEDDADA) to the NAI_LL2_INITIATE_SEND_CMD register. The LL2 will set this back to 0 once the operation is complete. The user can not call naibrd_LL2_SetDLVData() until the NAI_LL2_INITIATE_SEND_CMD register is 0. Call naibrd_LL2_GetInitiateSendCmd() and check *p_outsendDataCmd == 0 to verify that the previous operation is complete. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_LL2_GetLVDTReqData (int32_t cardIndex, int32_t module, naibrd_LL2_req_data_t *p_outreqData) |
Retrieves the LVDT Request data from the LL2 module. The LL2 gets the Request Data from the LVDT after completing a INITIATE_REQ_DATA command. The LVDT data resides in the LL2's Request Data registers until a new INITIATE_REQ_DATA is complete. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_LL2_GetInitiateReqData (int32_t cardIndex, int32_t module, uint32_t *p_outintiateReqData) |
Retrieves the value of the NAI_LL2_INITIATE_REQ_DATA register. If the value is 0, then the LL2's LVDT data is ready to be read, which is done by calling naibrd_LL2_GetLVDTReqData(). This API can be polled until the value is 0 before attempting to call naibrd_LL2_GetLVDTReqData() to read the LL2's LVDT data. A value of NAIBRD_LL2_REQ_DATA_CMD (0XBEADDADA) indicates the HW is busy with the previous request operation. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_LL2_InitiateReqData (int32_t cardIndex, int32_t module) |
Initiates reading LVDT data and storing it in the LL2's Request Data registers. This is done by writing NAIBRD_LL2_REQ_DATA_CMD (0xBEADDADAu) to the NAI_LL2_INITIATE_REQ_DATA register. The LL2 will set this back to 0 once the operation is complete. The user can not call naibrd_LL2_GetInitiateReqData() until the NAI_LL2_INITIATE_REQ_DATA register is 0. Call naibrd_LL2_GetInitiateReqData() and check *p_outintiateReqData == 0 to verify that the previous operation is complete. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_LL2_GetReqUpdateRate (int32_t cardIndex, int32_t module, uint32_t *p_outupdateRate_us) |
Retrieves the Request update rate. Update rate is specified in the micro-seconds (example: 10 = 10 micro-seconds) Setting the update rate to NAIBRD_LL2_MANUAL_UPDATE (0u) puts the LL2 into manaual update mode, where the user must poll naibrd_LL2_GetInitiateReqData() until NAI_LL2_INITIATE_REQ_DATA is 0, and then call naibrd_LL2_InitiateReqData() to read the LVDT and store the data in the LL2's Request data registers. A non-zero value spcifies the update rate. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_LL2_SetReqUpdateRate (int32_t cardIndex, int32_t module, uint32_t updateRate_us) |
Sets the Request update rate. Update rate is specified in the micro-seconds (example: 10 = 10 micro-seconds) Setting the update rate to NAIBRD_LL2_MANUAL_UPDATE (0u) puts the LL2 into manaual update mode, where the user must poll naibrd_LL2_GetInitiateReqData() until NAI_LL2_INITIATE_REQ_DATA is 0, and then call naibrd_LL2_InitiateReqData() to read the LVDT and store the data in the LL2's Request data registers. A non-zero value spcifies the update rate. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_LL2_SetDLVDataRaw (int32_t cardIndex, int32_t module, naibrd_LL2_cmd_raw_data_t rawCmdData) |
Writes the DLV Command data to the LL2 module in raw (hex) form. The data resides in the LL2 and is sent to the DLV when commanded by a call to naibrd_LL2_InitiateSendCmd(). The data has no affect on the DLV until the command to send the data is given. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_LL2_GetLVDTReqDataRaw (int32_t cardIndex, int32_t module, naibrd_LL2_req_raw_data_t *p_outrawReqData) |
Retrieves the LVDT Request data from the LL2 module in raw (hex) form. The LL2 gets the Request Data from the LVDT after completing a INITIATE_REQ_DATA command. The LVDT data resides in the LL2's Request Data registers until a new INITIATE_REQ_DATA is complete. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_LL2_GetCRCErrorCount (int32_t cardIndex, int32_t module, uint32_t *p_outcrcErrorCount) |
Retrieves the number of CRC errors that have occured since a power-cycle or reset. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_LL2_ResetCRCErrorCount (int32_t cardIndex, int32_t module) |
Resets the CRC error count register. | |
NAIBRDFUNC uint32_t NAIAPI | naibrd_LL2_calcCRC (naibrd_LL2_cmd_data_t cmdData) |
Calculates a crc uses NAIBRD_LL2_CRC_POLYNOMIAL (0x4C11DB7) and is based on the following values in the order specified: Channel 1 Position (raw value, NOT IEEE754), Channel 1 Delay, Channel 2 Position (raw value, NOT IEEE754), Channel 2 Delay, Frame Number, Sequence Number. | |
NAIBRDFUNC uint32_t NAIAPI naibrd_LL2_calcCRC | ( | naibrd_LL2_cmd_data_t | cmdData | ) |
Calculates a crc uses NAIBRD_LL2_CRC_POLYNOMIAL (0x4C11DB7) and is based on the following values in the order specified: Channel 1 Position (raw value, NOT IEEE754), Channel 1 Delay, Channel 2 Position (raw value, NOT IEEE754), Channel 2 Delay, Frame Number, Sequence Number.
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]). |
cmdData | : (Input) populated data structure of type .
|
NAIBRDFUNC nai_status_t NAIAPI naibrd_LL2_GetCRCErrorCount | ( | int32_t | cardIndex, |
int32_t | module, | ||
uint32_t * | p_outcrcErrorCount ) |
Retrieves the number of CRC errors that have occured since a power-cycle or reset.
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_outcrcErrorCount | : (Output) CRC error count.
|
NAIBRDFUNC nai_status_t NAIAPI naibrd_LL2_GetDLVData | ( | int32_t | cardIndex, |
int32_t | module, | ||
naibrd_LL2_cmd_data_t * | p_outcmdData, | ||
uint32_t * | p_outcrc ) |
Retrieves the DLV Command data from the LL2 module. The DLV data is not output until commanded by a call to naibrd_LL2_InitiateSendCmd(). The data has no affect on the DLV until the command to send the data is given.
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_outcmdData | : (Output) Fully populated data structure of type naibrd_LL2_cmd_data_t. This holds the DLV data that is to be sent to the DLV module. |
p_outcrc | : (Output) CRC that has been calculated on the data provided in sendData. Call naibrd_LL2_calcCRC() to get the calculated CRC. the user has the option of using a failing CRC for testing purposes. A passing CRC (when this CRC matches the hw derived CRC) is required for the data that resides in the LL2 module to be sent to the DLV. |
NAIBRDFUNC nai_status_t NAIAPI naibrd_LL2_GetInitiateReqData | ( | int32_t | cardIndex, |
int32_t | module, | ||
uint32_t * | p_outintiateReqData ) |
Retrieves the value of the NAI_LL2_INITIATE_REQ_DATA register. If the value is 0, then the LL2's LVDT data is ready to be read, which is done by calling naibrd_LL2_GetLVDTReqData(). This API can be polled until the value is 0 before attempting to call naibrd_LL2_GetLVDTReqData() to read the LL2's LVDT data. A value of NAIBRD_LL2_REQ_DATA_CMD (0XBEADDADA) indicates the HW is busy with the previous request operation.
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_outintiateReqData | : (Output) value of the NAI_LL2_INITIATE_SEND_CMD register. 0 = clear to send, NAIBRD_LL2_SEND_DATA_CMD (0xFEEDDADA) = busy. |
NAIBRDFUNC nai_status_t NAIAPI naibrd_LL2_GetInitiateSendCmd | ( | int32_t | cardIndex, |
int32_t | module, | ||
uint32_t * | p_outsendDataCmd ) |
Retrieves the value of the NAI_LL2_INITIATE_SEND_CMD register. If the value is 0, then the hardware is ready to output the data that resides in the DLV command registers, which is done by calling naibrd_LL2_InitiateSendCmd(). A value of NAIBRD_LL2_SEND_DATA_CMD (0xFEEDDADA) indicates the HW is busy with the previous send operation. This API can be polled until the value is 0 before attempting to call naibrd_LL2_InitiateSendCmd() to send the data to the DLV.
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_outsendDataCmd | : (Output) value of the NAI_LL2_INITIATE_SEND_CMD register. 0 = clear to send, NAIBRD_LL2_SEND_DATA_CMD (0xFEEDDADA) = busy. |
NAIBRDFUNC nai_status_t NAIAPI naibrd_LL2_GetLVDTReqData | ( | int32_t | cardIndex, |
int32_t | module, | ||
naibrd_LL2_req_data_t * | p_outreqData ) |
Retrieves the LVDT Request data from the LL2 module. The LL2 gets the Request Data from the LVDT after completing a INITIATE_REQ_DATA command. The LVDT data resides in the LL2's Request Data registers until a new INITIATE_REQ_DATA is complete.
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_outreqData | : (Output) Fully populated data structure of type naibrd_LL2_req_data_t. This holds the LVDT data read from the LVDT module. |
NAIBRDFUNC nai_status_t NAIAPI naibrd_LL2_GetLVDTReqDataRaw | ( | int32_t | cardIndex, |
int32_t | module, | ||
naibrd_LL2_req_raw_data_t * | p_outrawReqData ) |
Retrieves the LVDT Request data from the LL2 module in raw (hex) form. The LL2 gets the Request Data from the LVDT after completing a INITIATE_REQ_DATA command. The LVDT data resides in the LL2's Request Data registers until a new INITIATE_REQ_DATA is complete.
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_outrawReqData | : (Output) Fully populated data structure of type naibrd_LL2_req_raw_data_t. This holds the LVDT data read from the LVDT module. |
NAIBRDFUNC nai_status_t NAIAPI naibrd_LL2_GetReqUpdateRate | ( | int32_t | cardIndex, |
int32_t | module, | ||
uint32_t * | p_outupdateRate_us ) |
Retrieves the Request update rate. Update rate is specified in the micro-seconds (example: 10 = 10 micro-seconds) Setting the update rate to NAIBRD_LL2_MANUAL_UPDATE (0u) puts the LL2 into manaual update mode, where the user must poll naibrd_LL2_GetInitiateReqData() until NAI_LL2_INITIATE_REQ_DATA is 0, and then call naibrd_LL2_InitiateReqData() to read the LVDT and store the data in the LL2's Request data registers. A non-zero value spcifies the update rate.
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_outupdateRate_us | : (Output) Request update rate in micr-seconds, or 0 for manual update mode.
|
NAIBRDFUNC nai_status_t NAIAPI naibrd_LL2_InitiateReqData | ( | int32_t | cardIndex, |
int32_t | module ) |
Initiates reading LVDT data and storing it in the LL2's Request Data registers. This is done by writing NAIBRD_LL2_REQ_DATA_CMD (0xBEADDADAu) to the NAI_LL2_INITIATE_REQ_DATA register. The LL2 will set this back to 0 once the operation is complete. The user can not call naibrd_LL2_GetInitiateReqData() until the NAI_LL2_INITIATE_REQ_DATA register is 0. Call naibrd_LL2_GetInitiateReqData() and check *p_outintiateReqData == 0 to verify that the previous operation is complete.
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]). |
NAIBRDFUNC nai_status_t NAIAPI naibrd_LL2_InitiateSendCmd | ( | int32_t | cardIndex, |
int32_t | module ) |
Initiates sending the data from the LL2 to the DLV. This is done by writing NAIBRD_LL2_SEND_DATA_CMD (0xFEEDDADA) to the NAI_LL2_INITIATE_SEND_CMD register. The LL2 will set this back to 0 once the operation is complete. The user can not call naibrd_LL2_SetDLVData() until the NAI_LL2_INITIATE_SEND_CMD register is 0. Call naibrd_LL2_GetInitiateSendCmd() and check *p_outsendDataCmd == 0 to verify that the previous operation is complete.
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]). |
NAIBRDFUNC nai_status_t NAIAPI naibrd_LL2_ResetCRCErrorCount | ( | int32_t | cardIndex, |
int32_t | module ) |
Resets the CRC error count 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]). |
NAIBRDFUNC nai_status_t NAIAPI naibrd_LL2_SetDLVData | ( | int32_t | cardIndex, |
int32_t | module, | ||
naibrd_LL2_cmd_data_t | cmdData, | ||
uint32_t | crc ) |
Writes the DLV Command data to the LL2 command registers. The DLV data is not output until commanded by a call to naibrd_LL2_InitiateSendCmd(). The data has no affect on the DLV until the command to send the data is given.
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]). |
cmdData | : (Input) Fully populated data structure of type naibrd_LL2_cmd_data_t. This holds the DLV data that is to be sent to the DLV module. |
crc | : (Input) CRC that has been calculated on the data provided in sendData. Call naibrd_LL2_calcCRC() to get the calculated CRC. the user has the option of using a failing CRC for testing purposes. A passing CRC (when this CRC matches the hw derived CRC) is required for the data that resides in the LL2 module to be sent to the DLV. |
NAIBRDFUNC nai_status_t NAIAPI naibrd_LL2_SetDLVDataRaw | ( | int32_t | cardIndex, |
int32_t | module, | ||
naibrd_LL2_cmd_raw_data_t | rawCmdData ) |
Writes the DLV Command data to the LL2 module in raw (hex) form. The data resides in the LL2 and is sent to the DLV when commanded by a call to naibrd_LL2_InitiateSendCmd(). The data has no affect on the DLV until the command to send the data is given.
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]). |
rawCmdData | : (Input) Fully populated data structure of type naibrd_LL2_cmd_raw_data_t. This holds the DLV data that is to be sent to the DLV module. |
NAIBRDFUNC nai_status_t NAIAPI naibrd_LL2_SetReqUpdateRate | ( | int32_t | cardIndex, |
int32_t | module, | ||
uint32_t | updateRate_us ) |
Sets the Request update rate. Update rate is specified in the micro-seconds (example: 10 = 10 micro-seconds) Setting the update rate to NAIBRD_LL2_MANUAL_UPDATE (0u) puts the LL2 into manaual update mode, where the user must poll naibrd_LL2_GetInitiateReqData() until NAI_LL2_INITIATE_REQ_DATA is 0, and then call naibrd_LL2_InitiateReqData() to read the LVDT and store the data in the LL2's Request data registers. A non-zero value spcifies the update rate.
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]). |
updateRate_us | : (Input) Request update rate in micr-seconds, or 0 for manual update mode.
|