source: GPL/trunk/drv32/rmcalls.h@ 587

Last change on this file since 587 was 547, checked in by David Azarewicz, 15 years ago

APIC interrupt transition fixes

File size: 4.4 KB
Line 
1/* $Id: rmcalls.h,v 1.1.1.1 2003/07/02 13:56:56 eleph Exp $ */
2/*
3 * OS/2 Resource Manager API definitions
4 *
5 * (C) 2000-2002 InnoTek Systemberatung GmbH
6 *
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License as
9 * published by the Free Software Foundation; either version 2 of
10 * the License, or (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public
18 * License along with this program; if not, write to the Free
19 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139,
20 * USA.
21 *
22 */
23
24#ifndef __RM_CALLS__
25#define __RM_CALLS__
26
27#pragma pack (1)
28
29#include <rmbase.h>
30#include <rmioctl.h>
31#include <devtype.h>
32
33#pragma pack ()
34
35#ifdef __cplusplus
36 extern "C" {
37#endif
38
39#ifndef APIRET
40#define APIRET ULONG
41#endif
42
43#ifndef CDECL
44#define CDECL _cdecl
45#endif
46
47APIRET CDECL RMCreateDriver(FARPTR16, FARPTR16);
48
49APIRET CDECL RMDestroyDriver(HDRIVER hDriver);
50
51APIRET CDECL RMCreateAdapter(HDRIVER hDriver, FARPTR16 phAdapter,
52 FARPTR16 pAdapterStruct, HDEVICE hDevice,
53 FARPTR16 pahResource);
54
55APIRET CDECL RMDestroyAdapter(HDRIVER hDriver, HADAPTER hAdapter);
56
57APIRET CDECL RMCreateDevice(HDRIVER hDriver, FARPTR16 phDevice,
58 FARPTR16 pDeviceStruct, HADAPTER hAdapter,
59 FARPTR16 pahResource);
60
61APIRET CDECL RMAllocResource(HDRIVER hDriver, FARPTR16 phResource,
62 FARPTR16 pResourceStruct);
63
64APIRET CDECL RMDeallocResource(HDRIVER hDriver, HRESOURCE hResource);
65
66APIRET CDECL RMModifyResources(HDRIVER hDriver, HADAPTER hAdapter, USHORT ModifyAction, HRESOURCE hResource);
67
68APIRET CDECL RMGetNodeInfo(RMHANDLE RMHandle,
69 FARPTR16 pNodeInfo,
70 USHORT BufferSize);
71
72APIRET CDECL RMDevIDToHandleList(RMHANDLE RMHandle,
73 DEVID DeviceID,
74 DEVID FunctionID,
75 DEVID CompatibleID,
76 VENDID VendorID,
77 SERNUM SerialNumber,
78 SEARCHIDFLAGS SearchFlags,
79 HDETECTED hStartNode,
80 FARPTR16 pHndList);
81
82APIRET CDECL RMHandleToResourceHandleList(RMHANDLE hHandle,
83 FARPTR16 pHndList);
84
85#ifdef __cplusplus
86 };
87#endif
88
89/****************************************************************************/
90/* */
91/* Resource Manager Return Codes */
92/* */
93/****************************************************************************/
94#define RMRC_SUCCESS 0x0000
95#define RMRC_NOTINITIALIZED 0x0001
96#define RMRC_BAD_DRIVERHANDLE 0x0002
97#define RMRC_BAD_ADAPTERHANDLE 0x0003
98#define RMRC_BAD_DEVICEHANDLE 0x0004
99#define RMRC_BAD_RESOURCEHANDLE 0x0005
100#define RMRC_BAD_LDEVHANDLE 0x0006
101#define RMRC_BAD_SYSNAMEHANDLE 0x0007
102#define RMRC_BAD_DEVHELP 0x0008
103#define RMRC_NULL_POINTER 0x0009
104#define RMRC_NULL_STRINGS 0x000a
105#define RMRC_BAD_VERSION 0x000b
106#define RMRC_RES_ALREADY_CLAIMED 0x000c
107#define RMRC_DEV_ALREADY_CLAIMED 0x000d
108#define RMRC_INVALID_PARM_VALUE 0x000e
109#define RMRC_OUT_OF_MEMORY 0x000f
110#define RMRC_SEARCH_FAILED 0x0010
111#define RMRC_BUFFER_TOO_SMALL 0x0011
112#define RMRC_GENERAL_FAILURE 0x0012
113#define RMRC_IRQ_ENTRY_ILLEGAL 0x0013
114#define RMRC_NOT_IMPLEMENTED 0x0014
115#define RMRC_NOT_INSTALLED 0x0015
116#define RMRC_BAD_DETECTHANDLE 0x0016
117#define RMRC_BAD_RMHANDLE 0x0017
118#define RMRC_BAD_FLAGS 0x0018
119#define RMRC_NO_DETECTED_DATA 0x0019
120
121
122/*********************/
123/* RM Types */
124/*********************/
125
126typedef struct {
127 UCHAR MajorVersion;
128 UCHAR MinorVersion;
129 USHORT NumRSMEntries;
130} RSMVERSTRUCT;
131
132#endif /* __RM_CALLS__ */
Note: See TracBrowser for help on using the repository browser.