Added missing properties.
[AROS.git] / rom / isapnp / include / isapnp.h
blobe833835b276091dc811fbd908c6e2f4274488a6e
1 #ifndef RESOURCES_ISAPNP_H
2 #define RESOURCES_ISAPNP_H
4 /*
5 ** $VER: isapnp.h 1.1 (10.5.2001)
6 **
7 ** isapnp.resource definitions.
8 **
9 ** (C) Copyright 2001 Martin Blom
10 ** All Rights Reserved.
14 #include <exec/lists.h>
15 #include <exec/nodes.h>
16 #include <exec/semaphores.h>
18 /*** The name of the exec resource *******************************************/
20 #define ISAPNPNAME "isapnp.resource"
23 /*** A macro usable for ISAPNP_FindCard() and ISAPNP_FindDevice() ************/
25 #define ISAPNP_MAKE_ID(a,b,c) \
26 ( (LONG) (a) << 24 | (LONG) (b) << 16 | (LONG) (c) << 8 )
29 /*** Flags for ISAPNP_LockCardsA() and ISAPNP_LockDevicesA() *****************/
31 #define ISAPNP_LOCKF_NONE 0x00
33 #define ISAPNP_LOCKF_NONBLOCKING 0x01
34 #define ISAPNP_LOCKB_NONBLOCKING 0
36 /*** Node types **************************************************************/
38 #define ISAPNP_NT_CARD ( NT_USER - 1 )
39 #define ISAPNP_NT_DEVICE ( NT_USER - 2 )
40 #define ISAPNP_NT_RESOURCE_GROUP ( NT_USER - 3 )
41 #define ISAPNP_NT_IRQ_RESOURCE ( NT_USER - 4 )
42 #define ISAPNP_NT_DMA_RESOURCE ( NT_USER - 5 )
43 #define ISAPNP_NT_IO_RESOURCE ( NT_USER - 6 )
44 #define ISAPNP_NT_MEMORY_RESOURCE ( NT_USER - 7 )
46 /*** A unique identifier for a card or logical device ************************/
48 struct ISAPNP_Identifier
50 struct MinNode isapnpid_MinNode;
51 char isapnpid_Vendor[ 4 ];
52 UWORD isapnpid_ProductID;
53 UBYTE isapnpid_Revision;
54 UBYTE isapnpid_Pad;
58 /*** A PNP ISA card **********************************************************/
60 struct ISAPNP_Card
62 struct Node isapnpc_Node;
64 BOOL isapnpc_Disabled;
66 struct List isapnpc_Devices;
67 UWORD isapnpc_Pad1;
69 struct SignalSemaphore isapnpc_Lock;
70 UWORD isapnpc_Pad2;
72 struct ISAPNP_Identifier isapnpc_ID;
73 ULONG isapnpc_SerialNumber;
75 UBYTE isapnpc_CSN;
77 UBYTE isapnpc_MajorPnPVersion;
78 UBYTE isapnpc_MinorPnPVersion;
79 UBYTE isapnpc_VendorPnPVersion;
83 /*** A logical device on an ISA card *****************************************/
85 struct ISAPNP_ResourceGroup;
87 struct ISAPNP_Device
89 struct Node isapnpd_Node;
91 BOOL isapnpd_Disabled;
93 struct ISAPNP_Card* isapnpd_Card;
95 struct SignalSemaphore isapnpd_Lock;
96 UWORD isapnpd_Pad1;
98 struct MinList isapnpd_IDs;
99 struct ISAPNP_ResourceGroup* isapnpd_Options;
100 struct MinList isapnpd_Resources;
102 UWORD isapnpd_SupportedCommands;
103 UWORD isapnpd_DeviceNumber;
106 /* Flags for isapnpd_SupportedCommands */
108 #define ISAPNP_DEVICE_SCF_BOOTABLE 0x01
109 #define ISAPNP_DEVICE_SCF_RANGE_CHECK 0x02
110 #define ISAPNP_DEVICE_SCB_BOOTABLE 0
111 #define ISAPNP_DEVICE_SCB_RANGE_CHECK 1
114 /*** A resource group ********************************************************/
116 struct ISAPNP_ResourceGroup
118 struct MinNode isapnprg_MinNode;
119 UBYTE isapnprg_Type;
120 UBYTE isapnprg_Pri;
122 UWORD isapnprg_Pad;
124 struct MinList isapnprg_Resources;
125 struct MinList isapnprg_ResourceGroups;
128 /* Priorities for isapnprg_Pri and PNPISA_AllocResourceGroup() */
130 #define ISAPNP_RG_PRI_GOOD 64
131 #define ISAPNP_RG_PRI_ACCEPTABLE 0
132 #define ISAPNP_RG_PRI_SUBOPTIMAL -64
135 /*** An resource (the "base class") ******************************************/
137 struct ISAPNP_Resource
139 struct MinNode isapnpr_MinNode;
140 UBYTE isapnpr_Type;
144 /*** An IRQ resource *********************************************************/
146 struct ISAPNP_IRQResource
148 struct MinNode isapnpirqr_MinNode;
149 UBYTE isapnpirqr_Type;
151 UBYTE isapnpirqr_IRQType;
152 UWORD isapnpirqr_IRQMask;
155 /* Flags for isapnpirqr_IRQType */
157 #define ISAPNP_IRQRESOURCE_ITF_HIGH_EDGE 0x01
158 #define ISAPNP_IRQRESOURCE_ITF_LOW_EDGE 0x02
159 #define ISAPNP_IRQRESOURCE_ITF_HIGH_LEVEL 0x04
160 #define ISAPNP_IRQRESOURCE_ITF_LOW_LEVEL 0x08
161 #define ISAPNP_IRQRESOURCE_ITB_HIGH_EDGE 0
162 #define ISAPNP_IRQRESOURCE_ITB_LOW_EDGE 1
163 #define ISAPNP_IRQRESOURCE_ITB_HIGH_LEVEL 2
164 #define ISAPNP_IRQRESOURCE_ITB_LOW_LEVEL 3
167 /*** A DMA resource **********************************************************/
169 struct ISAPNP_DMAResource
171 struct MinNode isapnpdmar_MinNode;
172 UBYTE isapnpdmar_Type;
174 UBYTE isapnpdmar_ChannelMask;
175 UBYTE isapnpdmar_Flags;
178 /* Flags for isapnpdmar_Flags */
180 #define ISAPNP_DMARESOURCE_F_TRANSFER_MASK 0x03
181 #define ISAPNP_DMARESOURCE_F_TRANSFER_8BIT 0x00
182 #define ISAPNP_DMARESOURCE_F_TRANSFER_BOTH 0x01
183 #define ISAPNP_DMARESOURCE_F_TRANSFER_16BIT 0x02
185 #define ISAPNP_DMARESOURCE_FF_BUS_MASTER 0x04
186 #define ISAPNP_DMARESOURCE_FF_BYTE_MODE 0x08
187 #define ISAPNP_DMARESOURCE_FF_WORD_MODE 0x10
188 #define ISAPNP_DMARESOURCE_FB_BUS_MASTER 2
189 #define ISAPNP_DMARESOURCE_FB_BYTE_MODE 3
190 #define ISAPNP_DMARESOURCE_FB_WORD_MODE 4
192 #define ISAPNP_DMARESOURCE_F_SPEED_MASK 0x60
193 #define ISAPNP_DMARESOURCE_F_SPEED_COMPATIBLE 0x00
194 #define ISAPNP_DMARESOURCE_F_SPEED_TYPE_A 0x20
195 #define ISAPNP_DMARESOURCE_F_SPEED_TYPE_B 0x40
196 #define ISAPNP_DMARESOURCE_F_SPEED_TYPE_F 0x60
199 /*** An IO resource **********************************************************/
201 struct ISAPNP_IOResource
203 struct MinNode isapnpior_MinNode;
204 UBYTE isapnpior_Type;
206 UBYTE isapnpior_Flags;
208 UBYTE isapnpior_Alignment;
209 UBYTE isapnpior_Length;
211 UWORD isapnpior_MinBase;
212 UWORD isapnpior_MaxBase;
215 /* Flags for isapnpior_Flags */
217 #define ISAPNP_IORESOURCE_FF_FULL_DECODE 0x01
218 #define ISAPNP_IORESOURCE_FB_FULL_DECODE 0
220 #endif /* RESOURCES_ISAPNP_H */