📄 dm7520_library.h
字号:
int GetErrorCode7520(int board, int *code);/******************************************************************************GetFifoStatus7520() Purpose: Read the status of a board's FIFOs. Parameters: board ====> File descriptor of board. status_p => Address where FIFO status will be stored. This status is really the contents of the FIFO Status Register located at LAS0 + 0x10. Please see the hardware manual for the interpretation of the individual bits in the FIFO status. Nothing is written to this memory location if the function fails. Return Value: 0 Success. -1 Failure. Please see the description of the internal function dm7520_readreg() for information on possible values errno may have in this case. ******************************************************************************/int GetFifoStatus7520(int board, uint16_t *status_p);/******************************************************************************GetITStatus7520() Purpose: Read the status of a board's interrupts. Parameters: board ====> File descriptor of board. status_p => Address where interrupt status will be stored. This status is really the contents of the Interrupt Status Register located at LAS0 + 0x30. Please see the hardware manual for the interpretation of the individual bits in the interrupt status. Nothing is written to this memory location if the function fails. Return Value: 0 Success. -1 Failure. Please see the description of the internal function dm7520_readreg() for information on possible values errno may have in this case. ******************************************************************************/int GetITStatus7520(int board, uint16_t *status_p);/******************************************************************************GetTimerStatus7520() Purpose: Read the status of a board's timers/counters. Parameters: board ====> File descriptor of board. status_p => Address where timer/counter status will be stored. This status is really the contents of the Pacer/Burst Clock Timer Status Register located at LAS0 + 0x2C. Please see the hardware manual for the interpretation of the individual bits in the timer status. Nothing is written to this memory location if the function fails. Return Value: 0 Success. -1 Failure. Please see the description of the internal function dm7520_readreg() for information on possible values errno may have in this case. ******************************************************************************/int GetTimerStatus7520(int board, uint16_t *status_p);/******************************************************************************GetUcnt1Count7520() Purpose: Read the value of a board's D/A Update Counter 1. Parameters: board ===> File descriptor of board. count_p => Address where counter value will be stored. Nothing is written to this memory location if the function fails. Return Value: 0 Success. -1 Failure. Please see the description of the internal function dm7520_readreg() for information on possible values errno may have in this case. ******************************************************************************/int GetUcnt1Count7520(int board, uint16_t *count_p);/******************************************************************************GetUcnt2Count7520() Purpose: Read the value of a board's D/A Update Counter 2. Parameters: board ===> File descriptor of board. count_p => Address where counter value will be stored. Nothing is written to this memory location if the function fails. Return Value: 0 Success. -1 Failure. Please see the description of the internal function dm7520_readreg() for information on possible values errno may have in this case. ******************************************************************************/int GetUcnt2Count7520(int board, uint16_t *count_p);/******************************************************************************InitBoard7520() Purpose: Initialize a board. This does the following: 1) performs a software reset, 2) clears the A/D FIFO, 3) clears the D/A converter 1 FIFO, 4) clears the D/A converter 2 FIFO, 5) clears the high speed digital input FIFO, 6) clears the channel/gain table, 7) clears the digital I/O chip, and 8) clears the digital interrupt status flag. Parameters: board => File descriptor of board. Return Value: 0 Success. -1 Failure. Please see the descriptions of ClearAllIO7520(), ClearADFifo7520(), ClearDAC1Fifo7520(), ClearDAC2Fifo7520(), ClearDinFifo7520(), ClearCGT7520(), ClearDIO7520(), and ClearDIO0IrqStatus7520() for information on possible values errno may have in this case. ******************************************************************************/int InitBoard7520(int board);/******************************************************************************IsADFifoEmpty7520() Purpose: Determine whether or not a board's A/D FIFO is empty. Parameters: board ===> File descriptor of board. empty_p => Address where A/D FIFO empty flag will be stored. If the FIFO is not empty, zero will be stored here. If the FIFO is empty, a nonzero value will be stored here. Nothing is written to this memory location if the function fails. Return Value: 0 Success. -1 Failure. Please see the description of GetFifoStatus7520() for information on possible values errno may have in this case. ******************************************************************************/int IsADFifoEmpty7520(int board, uint8_t *empty_p);/******************************************************************************IsADFifoFull7520() Purpose: Determine whether or not a board's A/D FIFO is full. Parameters: board ==> File descriptor of board. full_p => Address where A/D FIFO full flag will be stored. If the FIFO is not full, zero will be stored here. If the FIFO is full, a nonzero value will be stored here. Nothing is written to this memory location if the function fails. Return Value: 0 Success. -1 Failure. Please see the description of GetFifoStatus7520() for information on possible values errno may have in this case. ******************************************************************************/int IsADFifoFull7520(int board, uint8_t *full_p);/******************************************************************************IsADFifoHalfFull7520() Purpose: Determine whether or not a board's A/D FIFO is half full. Parameters: board =======> File descriptor of board. half_full_p => Address where A/D FIFO half full flag will be stored. If the FIFO is not half full, zero will be stored here. If the FIFO is half full, a nonzero value will be stored here. Nothing is written to this memory location if the function fails. Return Value: 0 Success. -1 Failure. Please see the description of GetFifoStatus7520() for information on possible values errno may have in this case. ******************************************************************************/int IsADFifoHalfFull7520(int board, uint8_t *half_full_p);/******************************************************************************IsBusMaster7520() Purpose: Determine whether or not a jumper is installed on a board's Master/Target Only Mode jumper JP1. Parameters: board ========> File descriptor of board. bus_master_p => Address where bus master flag will be stored. If the board is not jumpered as a bus master (JP1 is not installed), zero will be stored here. If the board is jumpered as a bus master (JP1 is installed), a nonzero value will be stored here. Nothing is written to this memory location if the function fails. Return Value: 0 Success. -1 Failure. Please see the description of the internal function dm7520_readreg() for information on possible values errno may have in this case. NOTE: If a board is not jumpered as a bus master, you will not be able to initiate a DMA transfer on that board using the library DMA-related functions. ******************************************************************************/int IsBusMaster7520(int board, uint8_t *bus_master_p);/******************************************************************************IsDAC1FifoEmpty7520() Purpose: Determine whether or not a board's D/A 1 FIFO is empty. Parameters: board ===> File descriptor of board. empty_p => Address where D/A 1 FIFO empty flag will be stored. If the FIFO is not empty, zero will be stored here. If the FIFO is empty, a nonzero value will be stored here. Nothing is written to this memory location if the function fails. Return Value: 0 Success. -1 Failure. Please see the description of GetFifoStatus7520() for information on possible values errno may have in this case. ******************************************************************************/int IsDAC1FifoEmpty7520(int board, uint8_t *empty_p);/******************************************************************************IsDAC1FifoFull7520() Purpose: Determine whether or not a board's D/A 1 FIFO is full. Parameters: board ==> File descriptor of board. full_p => Address where D/A 1 FIFO full flag will be stored. If the FIFO is not full, zero will be stored here. If the FIFO is full, a nonzero value will be stored here. Nothing is written to this memory location if the function fails. Return Value: 0 Success. -1 Failure. Please see the description of GetFifoStatus7520() for information on possible values errno may have in this case. ******************************************************************************/int IsDAC1FifoFull7520(int board, uint8_t *full_p);/******************************************************************************IsDAC1FifoHalfFull7520() Purpose: Determine whether or not a board's D/A 1 FIFO is half full. Parameters: board =======> File descriptor of board. half_full_p => Address where D/A 1 FIFO half full flag will be stored. If the FIFO is not half full, zero will be stored here. If the FIFO is half full, a nonzero value will be stored here. Nothing is written to this memory location if the function fails. Return Value: 0 Success. -1 Failure. Please see the description of GetFifoStatus7520() for information on possible values errno may have in this case. ******************************************************************************/int IsDAC1FifoHalfFull7520(int board, uint8_t *half_full_p);/******************************************************************************IsDAC2FifoEmpty7520() Purpose: Determine whether or not a board's D/A 2 FIFO is empty. Parameters: board ===> File descriptor of board. empty_p => Address where D/A 2 FIFO empty flag will be stored. If the FIFO is not empty, zero will be stored here. If the FIFO is empty, a nonzero value will be stored here. Nothing is written to this memory location if the function fails. Return Value: 0 Success. -1 Failure. Please see the description of GetFifoStatus7520() for information on possible values errno may have in this case. ******************************************************************************/int IsDAC2FifoEmpty7520(int board, uint8_t *empty_p);/******************************************************************************IsDAC2FifoFull7520() Purpose: Determine whether or not a board's D/A 2 FIFO is full. Parameters: board ==> File descriptor of board. full_p => Address where D/A 2 FIFO full flag will be stored. If the
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -