1 | /* $Id: header.h 142 2000-04-23 14:55:46Z ktk $ */
|
---|
2 |
|
---|
3 | /* SCCSID = %W% %E% */
|
---|
4 | /****************************************************************************
|
---|
5 | * *
|
---|
6 | * Copyright (c) IBM Corporation 1994 - 1997. *
|
---|
7 | * *
|
---|
8 | * The following IBM OS/2 source code is provided to you solely for the *
|
---|
9 | * the purpose of assisting you in your development of OS/2 device drivers. *
|
---|
10 | * You may use this code in accordance with the IBM License Agreement *
|
---|
11 | * provided in the IBM Device Driver Source Kit for OS/2. *
|
---|
12 | * *
|
---|
13 | ****************************************************************************/
|
---|
14 | /**@internal %W%
|
---|
15 | * Defines for the Device Driver Header
|
---|
16 | * @version %I%
|
---|
17 | * @context Unless otherwise noted, all interfaces are Ring-0, 16-bit,
|
---|
18 | * <stack context>.
|
---|
19 | * @history
|
---|
20 | *
|
---|
21 | */
|
---|
22 | #ifndef HEADER_INCLUDED
|
---|
23 | #define HEADER_INCLUDED
|
---|
24 |
|
---|
25 | #define DA_CHAR 0x8000 // Character PDD
|
---|
26 | #define DA_IDCSET 0x4000 // IDC entry point set
|
---|
27 | #define DA_BLOCK 0x2000 // Block device driver
|
---|
28 | #define DA_SHARED 0x1000 // Shared device
|
---|
29 | #define DA_NEEDOPEN 0x800 // Open/Close required
|
---|
30 |
|
---|
31 | #define DA_OS2DRVR 0x0080 // Standard OS/2 driver
|
---|
32 | #define DA_IOCTL2 0x0100 // Supports IOCTL2
|
---|
33 | #define DA_USESCAP 0x0180 // Uses Capabilities bits
|
---|
34 |
|
---|
35 | #define DA_CLOCK 8 // Clock device
|
---|
36 | #define DA_NULL 4 // NULL device
|
---|
37 | #define DA_STDOUT 2 // STDOUT device
|
---|
38 | #define DA_STDIN 1 // STDIN device
|
---|
39 |
|
---|
40 | #define DC_INITCPLT 0x10 // Supports Init Complete
|
---|
41 | #define DC_ADD 8 // ADD driver
|
---|
42 | #define DC_PARALLEL 4 // Supports parallel ports
|
---|
43 | #define DC_32BIT 2 // Supports 32-bit addressing
|
---|
44 | #define DC_IOCTL2 1 // Supports DosDevIOCtl2 and Shutdown (1C)
|
---|
45 |
|
---|
46 | typedef void (__near *PFNENTRY) (void);
|
---|
47 |
|
---|
48 | #pragma pack(1);
|
---|
49 |
|
---|
50 | typedef struct {
|
---|
51 | unsigned long ulNextDD;
|
---|
52 | unsigned short usAttribs;
|
---|
53 | PFNENTRY pfnStrategy;
|
---|
54 | PFNENTRY pfnIDC;
|
---|
55 | char abName[8];
|
---|
56 | unsigned long ulReserved[2];
|
---|
57 | unsigned long ulCaps;
|
---|
58 | } DEV_HEADER;
|
---|
59 |
|
---|
60 | #pragma pack();
|
---|
61 |
|
---|
62 | // pseudo-variable that points to device header
|
---|
63 | #define phdr ((DEV_HEADER *) 0)
|
---|
64 |
|
---|
65 | #endif
|
---|