Main Page | Data Structures | Directories | File List | Data Fields | Globals | Related Pages

cbm_driver.h

Go to the documentation of this file.
00001 /*
00002  *  This program is free software; you can redistribute it and/or
00003  *  modify it under the terms of the GNU General Public License
00004  *  as published by the Free Software Foundation; either version
00005  *  2 of the License, or (at your option) any later version.
00006  *
00007  *  Copyright 2004 Spiro Trikaliotis
00008  *
00009  */
00010 
00020 typedef struct _DEVICE_EXTENSION DEVICE_EXTENSION, *PDEVICE_EXTENSION;
00021 
00022 #include "arch_cbm_driver.h"
00023 
00025 #define DBG_KERNELMODE
00026 
00027 #include "debug.h"
00028 
00029 #include "perfeval.h"
00030 
00031 /* The following defines are used if performance evaluation is selected. */
00032 
00034 #define PERF_EVENT_MEASURE_TIME(_x_)    PERF_EVENT(0x1, (ULONG_PTR) _x_)
00035 
00037 #define PERF_EVENT_STARTIO(_x_)         PERF_EVENT(0x10, (ULONG_PTR) _x_)
00038 
00039 #define PERF_EVENT_COMPLETEIRP(_x_)     PERF_EVENT(0x11, (ULONG_PTR) _x_)
00040 
00041 #define PERF_EVENT_CANCELIRP(_x_)       PERF_EVENT(0x12, (ULONG_PTR) _x_)
00042 
00044 #define PERF_EVENT_IOCTL_QUEUE(_x_)     PERF_EVENT(0x20, _x_)
00045 
00046 #define PERF_EVENT_IOCTL_EXECUTE(_x_)   PERF_EVENT(0x21, _x_)
00047 
00048 #define PERF_EVENT_OPEN_QUEUE()         PERF_EVENT(0x30, 0)
00049 
00050 #define PERF_EVENT_OPEN_EXECUTE()       PERF_EVENT(0x31, 0)
00051 
00052 #define PERF_EVENT_CLOSE_QUEUE()        PERF_EVENT(0x40, 0)
00053 
00054 #define PERF_EVENT_CLOSE_EXECUTE()      PERF_EVENT(0x41, 0)
00055 
00056 #define PERF_EVENT_READ_QUEUE(_x_)      PERF_EVENT(0x50, _x_)
00057 
00058 #define PERF_EVENT_READ_EXECUTE(_x_)    PERF_EVENT(0x51, _x_)
00059 
00060 #define PERF_EVENT_WRITE_QUEUE(_x_)     PERF_EVENT(0x60, _x_)
00061 
00062 #define PERF_EVENT_WRITE_EXECUTE(_x_)   PERF_EVENT(0x61, _x_)
00063 
00065 #define PERF_EVENT_THREAD_START_SCHED() PERF_EVENT(0x100, 0)
00066 
00067 #define PERF_EVENT_THREAD_START_EXEC()  PERF_EVENT(0x100, 1)
00068 
00069 #define PERF_EVENT_THREAD_POLL()        PERF_EVENT(0x100, 2)
00070 
00071 #define PERF_EVENT_THREAD_STOP_SCHED()  PERF_EVENT(0x100, 3)
00072 
00073 #define PERF_EVENT_THREAD_STOP_EXEC()   PERF_EVENT(0x100, 4)
00074 
00076 #define PERF_EVENT_READ_BYTE_NO(_x_)    PERF_EVENT(0x200, _x_)
00077 
00078 #define PERF_EVENT_READ_BYTE(_x_)       PERF_EVENT(0x201, _x_)
00079 
00080 #define PERF_EVENT_READ_BIT_NO(_x_)     PERF_EVENT(0x202, _x_)
00081 
00082 #define PERF_EVENT_WRITE_BYTE_NO(_x_)   PERF_EVENT(0x210, _x_)
00083 
00084 #define PERF_EVENT_WRITE_BYTE(_x_)      PERF_EVENT(0x211, _x_)
00085 
00086 #define PERF_EVENT_WRITE_BIT_NO(_x_)    PERF_EVENT(0x212, _x_)
00087 
00089 typedef
00090 struct _DEVICE_EXTENSION {
00091 
00093     ARCH_DEVICE_EXTENSION;
00094 
00096     PUCHAR ParPortPortAddress;
00097 
00103     ULONG IrqCount;
00104 
00106     BOOLEAN IsSMP;
00107 
00108     // IEC related vars:
00109 
00115     USHORT IecCable;
00116 
00118     UCHAR IecOutBits;
00119 
00121     UCHAR IecOutEor;
00122 
00124     BOOLEAN IecBusy;
00125 
00127     BOOLEAN Eoi;
00128 
00129 } DEVICE_EXTENSION, *PDEVICE_EXTENSION;

Generated on Sun Apr 30 18:45:43 2006 for opencbm by  doxygen 1.4.2