Changeset 588 for GPL/branches/uniaud32-2.1.x/include/strategy.h
- Timestamp:
- Feb 10, 2017, 2:50:49 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GPL/branches/uniaud32-2.1.x/include/strategy.h
r32 r588 1 /* $Id: strategy.h,v 1.1.1.1 2003/07/02 13:56:58 eleph Exp $ */ 2 /* 3 * OS/2 strategy handler definitions 4 * 5 * (C) 2000-2002 InnoTek Systemberatung GmbH 6 * (C) 2000-2001 Sander van Leeuwen (sandervl@xs4all.nl) 7 * 8 * This program is free software; you can redistribute it and/or 9 * modify it under the terms of the GNU General Public License as 10 * published by the Free Software Foundation; either version 2 of 11 * the License, or (at your option) any later version. 12 * 13 * This program is distributed in the hope that it will be useful, 14 * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 * GNU General Public License for more details. 17 * 18 * You should have received a copy of the GNU General Public 19 * License along with this program; if not, write to the Free 20 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, 21 * USA. 22 * 23 */ 24 1 /**************************************************************************** 2 * * 3 * Copyright (c) IBM Corporation 1994 - 1997. * 4 * * 5 * The following IBM OS/2 source code is provided to you solely for the * 6 * the purpose of assisting you in your development of OS/2 device drivers. * 7 * You may use this code in accordance with the IBM License Agreement * 8 * provided in the IBM Device Driver Source Kit for OS/2. * 9 * * 10 * Copyright (c) 2013 David Azarewicz david@88watts.net * 11 * Modified to fix problems and for OpenWatcom compatibility * 12 ****************************************************************************/ 25 13 #ifndef STRATEGY_INCLUDED 26 14 #define STRATEGY_INCLUDED 27 15 16 #pragma pack(1); 28 17 29 /* Constants relating to the Strategy Routines 30 */ 18 typedef struct { /* template for request header */ 19 BYTE bLength; /* 00 request packet length */ 20 BYTE bUnit; /* 01 unit code for block DD only */ 21 BYTE bCommand; /* 02 command code */ 22 USHORT usStatus; /* 03 return status */ 23 ULONG dwReserved; /* 05 reserved bytes */ 24 ULONG ulQlink; /* 09 queue linkage */ 25 union { /* command-specific data */ 26 struct { 27 BYTE b; /* 0D */ 28 PFN ulDevHlp; /* 0E dev help address */ 29 ULONG szArgs; /* 12 argument pointer */ 30 BYTE bDrive; /* 16 */ 31 } init_in; 32 struct { 33 BYTE bUnits; 34 USHORT usCodeEnd; // final code offset 35 USHORT usDataEnd; // final data offset 36 ULONG ul; 37 } init_out; 38 struct { 39 BYTE bMedia; 40 ULONG ulAddress; 41 USHORT usCount; 42 ULONG ulStartSector; 43 USHORT usSysFileNum; 44 } io; 45 struct { 46 BYTE bData; 47 } peek; 48 struct { 49 BYTE bCategory; // category code 50 BYTE bFunction; // function code 51 ULONG pvParm; // address of parameter buffer 52 ULONG pvData; // address of data buffer 53 USHORT usSysFileNum; // system file number 54 USHORT usParmLen; // length of parameter buffer 55 USHORT usDataLen; // length of data buffer 56 } ioctl; 57 struct { 58 USHORT usSysFileNum; // system file number 59 } open_close; 60 struct { 61 BYTE Function; // Shutdown code: 0 = start, 1 = end 62 ULONG Reserved; // Reserved 63 } shutdown; 64 struct { 65 BYTE Function; 66 } save_restore; 67 }; 68 } REQPACKET; 69 70 #pragma pack(); 71 72 /* Constants relating to the Strategy Routines */ 31 73 32 74 #define RPDONE 0x0100 // return successful, must be set … … 35 77 #define RPERR 0x8000 // return error 36 78 37 // List of error codes, from chapter 8 of PDD reference 38 #define RPNOTREADY 0x0002 39 #define RPBADCMD 0x0003 40 #define RPGENFAIL 0x000c 41 #define RPDEVINUSE 0x0014 42 #define RPINITFAIL 0x0015 79 #define RPERR_PROTECT 0x8000 80 #define RPERR_UNIT 0x8001 81 #define RPERR_NOTREADY 0x8002 82 #define RPERR_BADCOMMAND 0x8003 83 #define RPERR_CRC 0x8004 84 #define RPERR_LENGTH 0x8005 85 #define RPERR_SEEK 0x8006 86 #define RPERR_FORMAT 0x8007 87 #define RPERR_SECTOR 0x8008 88 #define RPERR_PAPER 0x8009 89 #define RPERR_WRITE 0x800A 90 #define RPERR_READ 0x800B 91 #define RPERR_GENERAL 0x800C 92 #define RPERR_DISK 0x800D 93 #define RPERR_MEDIA 0x8010 94 #define RPERR_INTERRUPTED 0x8011 95 #define RPERR_MONITOR 0x8012 96 #define RPERR_PARAMETER 0x8013 97 #define RPERR_DEVINUSE 0x8014 98 #define RPERR_INITFAIL 0x8015 43 99 44 100 // list of Strategy commands from PDD reference 45 // Note this is only the list of commands audio device drivers care about 46 #define STRATEGY_INIT 0x00 47 #define STRATEGY_OPEN 0x0D 48 #define STRATEGY_CLOSE 0x0E 49 #define STRATEGY_GENIOCTL 0x10 50 #define STRATEGY_DEINSTALL 0x14 51 #define STRATEGY_INITCOMPLETE 0x1F 101 #define STRATEGY_INIT 0x00 102 #define STRATEGY_MEDIACHECK 0x01 103 #define STRATEGY_BUILDBPB 0x02 104 #define STRATEGY_IOCTLR 0x03 105 #define STRATEGY_READ 0x04 106 #define STRATEGY_NDR 0x05 107 #define STRATEGY_INPUTSTATUS 0x06 108 #define STRATEGY_FLUSHINPUT 0x07 109 #define STRATEGY_WRITE 0x08 110 #define STRATEGY_WRITEVERIFY 0x09 111 #define STRATEGY_OUTPUTSTATUS 0x0A 112 #define STRATEGY_FLUSHOUTPUT 0x0B 113 #define STRATEGY_IOCTLW 0x0C 114 #define STRATEGY_OPEN 0x0D 115 #define STRATEGY_CLOSE 0x0E 116 #define STRATEGY_REMOVEABLEMEDIA 0x0F 117 #define STRATEGY_GENIOCTL 0x10 118 #define STRATEGY_RESETMEDIA 0x11 119 #define STRATEGY_GETLOGMAP 0x12 120 #define STRATEGY_SETLOGMAP 0x13 121 #define STRATEGY_DEINSTALL 0x14 122 #define STRATEGY_PARTFIXEDDISKS 0x16 123 #define STRATEGY_GETFDLOGUNITMAP 0x17 124 #define STRATEGY_INPUTBYPASS 0x18 125 #define STRATEGY_OUTPUTBYPASS 0x19 126 #define STRATEGY_OUTPUTBYPASSV 0x1A 127 #define STRATEGY_BASEDEVINIT 0x1B 128 #define STRATEGY_SHUTDOWN 0x1C 129 #define STRATEGY_GETDRIVERCAPS 0x1D 130 #define STRATEGY_INITCOMPLETE 0x1F 131 #define STRATEGY_SAVERESTORE 0x20 132 133 #define IOCTL_ASYNC 0x0001 134 #define IOCTL_SCR_AND_PTRDRAW 0x0003 135 #define IOCTL_KEYBOARD 0x0004 136 #define IOCTL_PRINTER 0x0005 137 #define IOCTL_LIGHTPEN 0x0006 138 #define IOCTL_POINTINGDEVICE 0x0007 139 #define IOCTL_DISK 0x0008 140 #define IOCTL_PHYSICALDISK 0x0009 141 #define IOCTL_MONITOR 0x000A 142 #define IOCTL_GENERAL 0x000B 143 #define IOCTL_POWER 0x000C 144 #define IOCTL_OEMHLP 0x0080 145 #define IOCTL_TESTCFG_SYS 0x0080 146 #define IOCTL_CDROMDISK 0x0080 147 #define IOCTL_CDROMAUDIO 0x0081 148 #define IOCTL_TOUCH_DEVDEP 0x0081 149 #define IOCTL_TOUCH_DEVINDEP 0x0081 52 150 53 151 #endif
Note:
See TracChangeset
for help on using the changeset viewer.