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

📄 pc.h

📁 Linux内核源代码 为压缩文件 是<<Linux内核>>一书中的源代码
💻 H
📖 第 1 页 / 共 2 页
字号:
/* * * Copyright (C) Eicon Technology Corporation, 2000. * * This source file is supplied for the exclusive use with Eicon * Technology Corporation's range of DIVA Server Adapters. * * Eicon File Revision :    1.2   * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2, or (at your option) * any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY OF ANY KIND WHATSOEVER INCLUDING ANY  * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.   * See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * */#ifndef PC_H_INCLUDED#define PC_H_INCLUDED#define byte unsigned char#define word unsigned short#define dword unsigned long#if !defined(MIN)#define MIN(a,b) ((a)>(b) ? (b) : (a))#endif#if !defined(MAX)#define MAX(a,b) ((a)>(b) ? (a) : (b))#endif/*------------------------------------------------------------------*//* buffer definition                                                *//*------------------------------------------------------------------*/typedef struct {  word length;          /* length of data/parameter field           */  byte P[270];          /* data/parameter field                     */} PBUFFER;/*------------------------------------------------------------------*//* dual port ram structure                                          *//*------------------------------------------------------------------*/struct dual{  byte Req;             /* request register                         */  byte ReqId;           /* request task/entity identification       */  byte Rc;              /* return code register                     */  byte RcId;            /* return code task/entity identification   */  byte Ind;             /* Indication register                      */  byte IndId;           /* Indication task/entity identification    */  byte IMask;           /* Interrupt Mask Flag                      */  byte RNR;             /* Receiver Not Ready (set by PC)           */  byte XLock;           /* XBuffer locked Flag                      */  byte Int;             /* ISDN-S interrupt                         */  byte ReqCh;           /* Channel field for layer-3 Requests       */  byte RcCh;            /* Channel field for layer-3 Returncodes    */  byte IndCh;           /* Channel field for layer-3 Indications    */  byte MInd;            /* more data indication field               */  word MLength;         /* more data total packet length            */  byte ReadyInt;        /* request field for ready interrupt        */  byte SWReg;           /* Software register for special purposes   */    byte Reserved[11];    /* reserved space                           */  byte InterfaceType;   /* interface type 1=16K interface           */  word Signature;       /* ISDN-S adapter Signature (GD)            */  PBUFFER XBuffer;      /* Transmit Buffer                          */  PBUFFER RBuffer;      /* Receive Buffer                           */};/*------------------------------------------------------------------*//* SWReg Values (0 means no command)                                *//*------------------------------------------------------------------*/#define SWREG_DIE_WITH_LEDON  0x01#define SWREG_HALT_CPU        0x02 /* Push CPU into a while(1) loop */         /*------------------------------------------------------------------*//* Id Fields Coding                                                 *//*------------------------------------------------------------------*/#define ID_MASK 0xe0    /* Mask for the ID field                    */#define GL_ERR_ID 0x1f  /* ID for error reporting on global requests*/#define DSIG_ID  0x00   /* ID for D-channel signaling               */#define NL_ID    0x20   /* ID for network-layer access (B or D)     */#define BLLC_ID  0x60   /* ID for B-channel link level access       */#define TASK_ID  0x80   /* ID for dynamic user tasks                */#define TIMER_ID 0xa0   /* ID for timer task                        */#define TEL_ID   0xc0   /* ID for telephone support                 */#define MAN_ID   0xe0   /* ID for management                        *//*------------------------------------------------------------------*//* ASSIGN and REMOVE requests are the same for all entities         *//*------------------------------------------------------------------*/#define ASSIGN  0x01#define UREMOVE  0xfe   /* without returncode */  #define REMOVE  0xff/*------------------------------------------------------------------*//* Timer Interrupt Task Interface                                   *//*------------------------------------------------------------------*/#define ASSIGN_TIM 0x01#define REMOVE_TIM 0xff/*------------------------------------------------------------------*//* dynamic user task interface                                      *//*------------------------------------------------------------------*/#define ASSIGN_TSK 0x01#define REMOVE_TSK 0xff#define LOAD 0xf0#define RELOCATE 0xf1#define START 0xf2#define LOAD2 0xf3#define RELOCATE2 0xf4/*------------------------------------------------------------------*//* dynamic user task messages                                       *//*------------------------------------------------------------------*/#define TSK_B2          0x0000#define TSK_WAKEUP      0x2000#define TSK_TIMER       0x4000#define TSK_TSK         0x6000#define TSK_PC          0xe000/*------------------------------------------------------------------*//* LL management primitives                                         *//*------------------------------------------------------------------*/#define ASSIGN_LL 1     /* assign logical link                      */#define REMOVE_LL 0xff  /* remove logical link                      *//*------------------------------------------------------------------*//* LL service primitives                                            *//*------------------------------------------------------------------*/#define LL_UDATA 1      /* link unit data request/indication        */#define LL_ESTABLISH 2  /* link establish request/indication        */#define LL_RELEASE 3    /* link release request/indication          */#define LL_DATA 4       /* data request/indication                  */#define LL_LOCAL 5      /* switch to local operation (COM only)     */#define LL_DATA_PEND 5  /* data pending indication (SDLC SHM only)  */#define LL_REMOTE 6     /* switch to remote operation (COM only)    */#define LL_TEST 8       /* link test request                        */#define LL_MDATA 9      /* more data request/indication             */#define LL_BUDATA 10    /* broadcast unit data request/indication   */#define LL_XID 12       /* XID command request/indication           */

⌨️ 快捷键说明

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