dm7520_library.h
来自「rt 7520采集卡 linux驱动源代码」· C头文件 代码 · 共 1,919 行 · 第 1/5 页
H
1,919 行
DACClockStopSelect7520() Purpose: Select the stop source for a board's D/A clock. Parameters: board => File descriptor of board. data ==> D/A clock stop source. Valid values are: 0 - Pacer clock software stop. 1 - External trigger input signal. 2 - Digital interrupt. 3 - User timer/counter 2 output reaches zero. 4 - SyncBus 0. 5 - SyncBus 1. 6 - SyncBus 2. 7 - D/A clock software stop. 8 - D/A update counter 1 reaches zero. 9 - D/A update counter 2 reaches zero. Return Value: 0 Success. -1 Failure. Please see the description of the internal function dm7520_writereg() for information on possible values errno may have in this case. NOTE: This function works only on DM7520 boards with an EPLD version of nine or higher. ******************************************************************************/int DACClockStopSelect7520(int board, int data);/******************************************************************************dm7520_getFifoSize() Purpose: Return a board's A/D FIFO size. This is returned as a decimal integer and represents the number of samples which can be stored in the FIFO. Parameters: board ====> File descriptor of board. fifosize => Address where FIFO size will be stored. Nothing is written to this memory location if the function fails. Return Value: 0 Success. -1 Failure with errno set as follows: EBUSY The device file referred to by board was not opened. ENXIO The minor number of the device file referred to by board is greater than the number of DM7520 devices supported. ENXIO The device referred to by board was not configured, failed its configuration, or is not present. ******************************************************************************/int dm7520_getFifoSize(int board, int *fifosize);/******************************************************************************EnableAcntStop7520() Purpose: Enable or disable a board's About Counter stopping when it counts down to zero. Parameters: board ==> File descriptor of board. enable => Flag indicating whether or not the About Counter should stop when it counts down to zero. A value of zero means the About Counter should stop. Any other value means the About Counter should not stop. Return Value: 0 Success. -1 Failure. Please see the description of the internal function dm7520_writereg() for information on possible values errno may have in this case. ******************************************************************************/int EnableAcntStop7520(int board, uint16_t enable);/******************************************************************************EnableCGT7520() Purpose: Select whether the channel/gain latch or channel/gain table is used for A/D conversion on a board. Parameters: board ==> File descriptor of board. enable => Selector for latch or table usage. Valid values are: CSC_LATCH - Disable the channel/gain table and enable the channel/gain latch. CSC_CGT --- Disable the channel/gain latch and enable the channel/gain table. Return Value: 0 Success. -1 Failure. Please see the description of the internal function dm7520_writereg() for information on possible values errno may have in this case. ******************************************************************************/int EnableCGT7520(int board, uint16_t enable);/******************************************************************************EnableCGTDigital7520() Purpose: Enable or disable digital table output on pins 32, 34, 36, 38, 40, 42, 44, and 46 of a board's CN2 connector. Parameters: board ==> File descriptor of board. enable => Selector for digital table output. A value of zero means disable digital table output and enable digital I/O port 1 output. Any other value means enable the digital table output and disable digital I/O port 1 output. Return Value: 0 Success. -1 Failure. Please see the description of the internal function dm7520_writereg() for information on possible values errno may have in this case. ******************************************************************************/int EnableCGTDigital7520(int board, uint16_t enable);/******************************************************************************EnableCGTPause7520() Purpose: Enable or disable the channel/gain table pause bit on a board. Parameters: board ==> File descriptor of board. enable => Flag indicating whether or not pause bit should be enabled. A value of zero means disable the pause bit. Any other value means enable the pause bit. Return Value: 0 Success. -1 Failure. Please see the description of the internal function dm7520_writereg() for information on possible values errno may have in this case. ******************************************************************************/int EnableCGTPause7520(int board, uint16_t enable);/******************************************************************************EnableDIO0Irq7520() Purpose: Enable or disable advanced digital interrupts on a board's digital I/O port 0. Parameters: board ==> File descriptor of board. enable => Flag indicating whether or not digital interrupts should be enabled. A value of zero means disable digital interrupts. Any other value means enable digital interrupts. Return Value: 0 Success. -1 Failure. Please see the descriptions of the internal functions dm7520_readreg() and dm7520_writereg() for information on possible values errno may have in this case. ******************************************************************************/int EnableDIO0Irq7520(int board, int enable);/******************************************************************************EnableSbus07520() Purpose: Enable or disable a board's SyncBus 0 signal. Parameters: board ==> File descriptor of board. enable => Flag indicating whether or not SyncBus 0 signal should be enabled. A value of zero means disable SyncBus 0 signal. Any other value means enable SyncBus 0 signal. Return Value: 0 Success. -1 Failure. Please see the description of the internal function dm7520_writereg() for information on possible values errno may have in this case. NOTE: If the signal is enabled, it can be transmitted off the board via the SyncBus. If the signal is disabled, it can be received from another board via the SyncBus. ******************************************************************************/int EnableSbus07520(int board, uint16_t enable);/******************************************************************************EnableSbus17520() Purpose: Enable or disable a board's SyncBus 1 signal. Parameters: board ==> File descriptor of board. enable => Flag indicating whether or not SyncBus 1 signal should be enabled. A value of zero means disable SyncBus 1 signal. Any other value means enable SyncBus 1 signal. Return Value: 0 Success. -1 Failure. Please see the description of the internal function dm7520_writereg() for information on possible values errno may have in this case. NOTE: If the signal is enabled, it can be transmitted off the board via the SyncBus. If the signal is disabled, it can be received from another board via the SyncBus. ******************************************************************************/int EnableSbus17520(int board, uint16_t enable);/******************************************************************************EnableSbus27520() Purpose: Enable or disable a board's SyncBus 2 signal. Parameters: board ==> File descriptor of board. enable => Flag indicating whether or not SyncBus 2 signal should be enabled. A value of zero means disable SyncBus 2 signal. Any other value means enable SyncBus 2 signal. Return Value: 0 Success. -1 Failure. Please see the description of the internal function dm7520_writereg() for information on possible values errno may have in this case. NOTE: If the signal is enabled, it can be transmitted off the board via the SyncBus. If the signal is disabled, it can be received from another board via the SyncBus. ******************************************************************************/int EnableSbus27520(int board, uint16_t enable);/******************************************************************************Get8254Count7520() Purpose: Read the current value for an 8254 User Timer/Counter on a board. Parameters: board ===> File descriptor of board. counter => Timer/counter to read the value of. Valid values are: TC_UTC0 - User Timer/Counter 0. TC_UTC1 - User Timer/Counter 1. TC_UTC2 - User Timer/Counter 2. value_p => Address where timer/counter value should be stored. Nothing is written to this memory location if the function fails. Return Value: 0 Success. -1 Failure with errno set as follows: EINVAL counter is not valid. Please see the descriptions of the internal functions dm7520_readreg() and dm7520_writereg() for information on other possible values errno may have in this case. ******************************************************************************/int Get8254Count7520(int board, int counter, uint16_t *value_p);/******************************************************************************Get8254Mode7520() Purpose: Read the operating mode for an 8254 User Timer/Counter on a board. Parameters: board ===> File descriptor of board. counter => Timer/counter to read the mode of. Valid values are: TC_UTC0 - User Timer/Counter 0. TC_UTC1 - User Timer/Counter 1. TC_UTC2 - User Timer/Counter 2. mode_p ==> Address where timer/counter mode should be stored. Nothing is written to this memory location if the function fails. Return Value: 0 Success. -1 Failure with errno set as follows: EINVAL counter is not valid. Please see the descriptions of the internal functions dm7520_readreg() and dm7520_writereg() for information on other possible values errno may have in this case. ******************************************************************************/int Get8254Mode7520(int board, int counter, uint8_t *mode_p);/******************************************************************************Get8254Status7520() Purpose: Read the status for an 8254 User Timer/Counter on a board. Parameters: board ====> File descriptor of board. counter ==> Timer/counter to read the status of. Valid values are: TC_UTC0 - User Timer/Counter 0. TC_UTC1 - User Timer/Counter 1. TC_UTC2 - User Timer/Counter 2. status_p => Address where timer/counter status should be stored. Nothing is written to this memory location if the function fails. Return Value: 0 Success. -1 Failure with errno set as follows:
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?