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

📄 hpcif.h

📁 vxworks的BSP开发配置文件
💻 H
字号:
/* hpcif.h * Host communications driver via PCI (interface) * *--------------------------------------------------------------------------- *                                                                       *                  I N T E L   P R O P R I E T A R Y                    *                                                                       *     COPYRIGHT (c)  1999 BY  INTEL  CORPORATION.  ALL RIGHTS           *     RESERVED.   NO  PART  OF THIS PROGRAM  OR  PUBLICATION  MAY       *     BE  REPRODUCED,   TRANSMITTED,   TRANSCRIBED,   STORED  IN  A     *     RETRIEVAL SYSTEM, OR TRANSLATED INTO ANY LANGUAGE OR COMPUTER     *     LANGUAGE IN ANY FORM OR BY ANY MEANS, ELECTRONIC, MECHANICAL,     *     MAGNETIC,  OPTICAL,  CHEMICAL, MANUAL, OR OTHERWISE,  WITHOUT     *     THE PRIOR WRITTEN PERMISSION OF :                                 *                                                                       *                        INTEL  CORPORATION                             *                                                                      *                     2200 MISSION COLLEGE BLVD                         *                                                                       *               SANTA  CLARA,  CALIFORNIA  95052-8119                   *                                                                       *--------------------------------------------------------------------------- * * *  system: IXM1200 *  subsystem: VxWorks *  author: jdg, Mar 29, 00  Initial version *  revisions: *  $History: hpcIf.h $ *  * *****************  Version 1  ***************** * User: Jdguilfo     Date: 5/23/01    Time: 1:29p * Created in $/V1.3/BoardSupport/VxWorks/ixm1200 * Specific version for Spectacle Island *  * *****************  Version 6  ***************** * User: Jdguilfo     Date: 10/20/00   Time: 2:43p * Updated in $/dev_1200/BoardSupport/VxWorks/IXP1200EB * Merge bootmgr and flashutility into bootflash *  * *****************  Version 5  ***************** * User: Jdguilfo     Date: 7/07/00    Time: 9:58a * Updated in $/dev_1200/BoardSupport/VxWorks/IXP1200EB * Fix bug where two threads using common IRP could corrupt it *  * *****************  Version 4  ***************** * User: Jdguilfo     Date: 7/06/00    Time: 5:17p * Updated in $/dev_1200/BoardSupport/VxWorks/IXP1200EB * Allow app to specify incomplete message, overlapped I/O returns pending * status *  * *****************  Version 3  ***************** * User: Jdguilfo     Date: 6/29/00    Time: 2:24p * Updated in $/dev_1200/BoardSupport/VxWorks/IXP1200EB * Allow .h file to be included by c++ *  * *****************  Version 2  ***************** * User: Jdguilfo     Date: 6/29/00    Time: 2:18p * Updated in $/dev_1200/BoardSupport/VxWorks/IXP1200EB * Allow users to cancel read or write transactions separately *  * *****************  Version 1  ***************** * User: Jdguilfo     Date: 6/29/00    Time: 11:22a * Created in $/dev_1200/BoardSupport/VxWorks/IXP1200EB * Add HPC, merge VxWorks into one makefile *  * --------------------------------------------------------------------- */#ifndef __HPCIF_H#define __HPCIF_H#include <semLib.h>#ifdef __cplusplusextern "C" {#endif/* I'm just making up this value right now. This should be cleaned up. @@ */#define HPC_ERROR_PREFIX 0x00100000typedef enum _HPC_ERROR_CODE {    HPC_OK = 0,    HPC_ALREADY_OPENED = HPC_ERROR_PREFIX,    HPC_NOT_OPENED,    HPC_INCOMPLETE,    HPC_WRONG_MODE,    HPC_PENDING,    HPC_CANCELED,    HPC_INVALID_SIZE,    HPC_INVALID_OP,    HPC_INTERNAL_ERROR} HPC_ERROR_CODE;typedef enum _HPC_OP {    HPC_READ,    HPC_WRITE,    HPC_BOTH      /* used for hpcCancelio */} HPC_OP;/* * The following determines how the receive side deals with incomplete * buffers; i.e. buffers that are too small to hold the incoming message. * the choices are: * HPC_IB_NONE: No indication. * HPC_IB_RC:   The return code HPC_INCOMPLETE indicates an incomplete buffer. * HPC_IB_SIZE: Bit 31 is set on the size field for incomplete buffers. */typedef enum _HPC_IB_MODE {    HPC_IB_NONE,    HPC_IB_RC,    HPC_IB_SIZE} HPC_IB_MODE;#define HPC_IB_BIT (1 << 31)typedef void (*PUT_RCV_CHARS)(unsigned char *buff, unsigned int len, void *data);typedef unsigned int (*GET_TX_CHARS)(unsigned char **buf, void *data);/* * Note that the IRP is the same as the OVERLAPPED structure * that the external world sees, so the start of the structures * must agree */typedef struct _HPC_IRP {    /* OVERLAPPED Fields. These are publically visible and available */    SEM_ID done;    HPC_ERROR_CODE returnStatus;    /* Internal Fields */    struct _HPC_IRP *next;    unsigned char *buff;    unsigned int bSize;    unsigned int bUsed;    unsigned int incomplete;} HPC_IRP;void           hpcMemInit() ;void           hpcMemDummyInit() ;/* * A "simple" init skips the following steps: *    configuration of doorbell registers * Normally this should not be skipped (i.e. simple should be 0), but this * can be set to 1 in the case that a previous OS has set up the doorbell * registers, and the new OS does not want to clobber them. */void           hpcSysInit(int simple) ;void           hpcIsr(int param) ;HPC_ERROR_CODE hpcOpenW32(int channelNum) ;HPC_ERROR_CODE hpcOpenSio(int channelNum,                          PUT_RCV_CHARS putRcvChars, void* putData,                          GET_TX_CHARS  getTxChars,  void* getData) ;HPC_ERROR_CODE hpcCancelio(int channelNum, HPC_OP whichOnes) ;HPC_ERROR_CODE hpcClose(int channelNum) ;HPC_ERROR_CODE hpcSetmode(int channelNum, HPC_IB_MODE mode) ;HPC_ERROR_CODE hpcGetmode(int channelNum, HPC_IB_MODE *mode) ;HPC_ERROR_CODE hpcStartio(int channelNum) ;HPC_ERROR_CODE hpcReadwrite(int channelNum, HPC_OP op, unsigned char *buff,                            int buffsize, unsigned int *bytesUsed,                            HPC_IRP *userIrp) ;HPC_ERROR_CODE hpcGetIrpStatus( HPC_IRP *irp,                                unsigned int *bytesUsed, BOOL wait ) ;void           hpcInitIrp( HPC_IRP *irp) ;HPC_ERROR_CODE hpcDeleteIrp( HPC_IRP *irp) ;int hpcPolledSend(int channel, unsigned char *buf, unsigned int bsize) ;int hpcPolledRcv(int channel, unsigned char *buf, unsigned int bsize,                 unsigned int *incomp);#ifdef __cplusplus}#endif#endif /* ifndef __HPCIF_H */

⌨️ 快捷键说明

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