⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 dm7520_library.h

📁 rt 7520采集卡 linux驱动源代码
💻 H
📖 第 1 页 / 共 5 页
字号:
                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 Get8254Status7520(int board, int counter, uint8_t *status_p);/******************************************************************************GetAcntCount7520()    Purpose:        Read a board's About Counter value.    Parameters:        board ===> File descriptor of board.        value_p => Address where About Counter value should 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.    NOTE:        Because of the way the About Counter works in the hardware, the value        it contains is actually one less than the number of samples.  This        function internally adjusts for this so that the value returned is        correct. ******************************************************************************/int GetAcntCount7520(int board, uint16_t *value_p);/******************************************************************************GetAdcntCount7520()    Purpose:        Read a board's A/D Sample Counter value.    Parameters:        board ===> File descriptor of board.        value_p => Address where A/D Sample Counter value should 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 GetAdcntCount7520(int board, uint16_t *value_p);/******************************************************************************get_control_buf7520()    Purpose:        Map the driver's DMA control buffer into the calling process' address        space.    Parameters:        board =========> File descriptor of board.        controlBuffer => Address where address at which DMA control buffer was                         mapped will be stored.    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.            Please see the mmap(2) man page for information on other possible            values errno may have in this case.    NOTE:        The address mapping created by this function has the following        properties: 1) it is the same size as the kernel's idea of how big a        page of memory is, 2) it is readable and writable, 3) the mapping is        private, i.e. it exists in the calling process only and is not shared        with other processes, and 4) paging is disabled for the mapping, i.e.        the addresses are locked into memory. ******************************************************************************/int get_control_buf7520(int board, char **controlBuffer);/******************************************************************************GetDcntCount7520()    Purpose:        Read a board's Delay Counter value.    Parameters:        board ===> File descriptor of board.        value_p => Address where Delay Counter value should 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 GetDcntCount7520(int board, uint16_t *value_p);/******************************************************************************GetDIO0Clock7520()    Purpose:        Read the clock source selected for a board's digital I/O port 0.    Parameters:        board ====> File descriptor of board.        source_p => Address where clock source should be stored.  Zero will be                    stored here if the clock source is the 8 MHz system clock.                    One will be stored here if the clock source is the User                    Timer/Counter 1.  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 GetDIO0Clock7520(int board, uint8_t *source_p);/******************************************************************************GetDIO0CompareMode7520()    Purpose:        Read the digital interrupt mode selected for a board's digital I/O port        0.    Parameters:        board ==> File descriptor of board.        mode_p => Address where interrupt mode should be stored.  Zero will be                  stored here if the interrupt mode is event mode.  One will be                  stored here if the interrupt mode is match mode.  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 GetDIO0CompareMode7520(int board, uint8_t *mode_p);/******************************************************************************GetDIO0CompareValue7520()    Purpose:        Read the Compare Register value for a board's digital I/O port 0.    Parameters:        board ===> File descriptor of board.        value_p => Address where Compare Register 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() and the description of SelectDIO0Register7520()            for information on possible values errno may have in this case. ******************************************************************************/int GetDIO0CompareValue7520(int board, uint8_t *value_p);/******************************************************************************GetDIO0Direction7520()    Purpose:        Read the Direction Register value for a board's digital I/O port 0.    Parameters:        board ==> File descriptor of board.        mask_p => Address where Direction Register value will be stored.  The                  value is a bit mask where a zero in a bit position means                  that bit is set to input and a one in a bit position means                  that bit is set to output.  For example, if the bit mask has                  the value 0x81 then bits 7 and 0 are set to output while all                  other bits are set to input.  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() and the description of SelectDIO0Register7520()            for information on possible values errno may have in this case. ******************************************************************************/int GetDIO0Direction7520(int board, uint8_t *mask_p);/******************************************************************************GetDIO0Mask7520()    Purpose:        Read the Mask Register value for a board's digital I/O port 0.    Parameters:        board ==> File descriptor of board.        mask_p => Address where Mask Register value will be stored.  The value                  is a bit mask where a zero in a bit position means that bit                  can generate a digital interrupt and a one in a bit position                  means that bit cannot cause an interrupt.  For example, if                  the bit mask has the value 0xFE then bit zero can cause a                  digital interrupt while all other bits cannot.  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() and the description of SelectDIO0Register7520()            for information on possible values errno may have in this case. ******************************************************************************/int GetDIO0Mask7520(int board, uint8_t *mask_p);/******************************************************************************GetDIO1Direction7520()    Purpose:        Read the digital I/O port 1 bit direction for a board.    Parameters:        board =======> File descriptor of board.        direction_p => Address where port 1 direction will be stored.  Zero                       will be stored here if port 1 bits are set to input.                       One will be stored here if port 1 bits are set to                       output.  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 GetDIO1Direction7520(int board, uint8_t *direction_p);/******************************************************************************GetDIOStatus7520()    Purpose:        Read the Digital IRQ/Strobe Status Register for a board.    Parameters:        board ====> File descriptor of board.        status_p => Address where Status Register value will be stored.  The                    bits returned are interpreted as follows:                        0, 1 - Port 0 register selected for programming at                               address LAS0 + 0x78.                                   00 = Clear Register                                   01 = Direction Register                                   10 = Mask Register                                   11 = Compare Register                        2 ---- Port 1 bit direction.                                   0 = input                                   1 = output                        3 ---- Digital interrupt mode.                                   0 = event mode                                   1 = match mode                        4 ---- Digital interrupt enable.                                   0 = disabled                                   1 = enabled.                        5 ---- Digital sample clock select.                                   0 = 8 MHz system clock                                   1 = User Timer/Counter 1                        6 ---- Digital interrupt status.                                   0 = no interrupt occurred                                   1 = interrupt occurred                        7 ---- Strobe status.                                   0 = no strobe occurred                                   1 = strobe occurred                    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 GetDIOStatus7520(int board, uint8_t *status_p);/******************************************************************************GetErrorCode7520()    Purpose:        Read driver's error code for a board.    Parameters:        board => File descriptor of board.        code ==> Address where error code will be stored.  -999 will be stored                 here if the hardware detected an interrupt overrun.  -ENOBUFS                 will be stored here if either the A/D FIFO or the high speed                 digital input FIFO filled up before enough data was read.                 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.    NOTE:        This function can be used to obtain more information about why a call        to ReadData7520() did not return the requested number of samples. ******************************************************************************/

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -