Synchronize with trunk revision 59636 (just before Alex's CreateProcess revamp).
[reactos.git] / drivers / bus / isapnp / isapnp.h
1
2 #include <wdm.h>
3
4 #ifdef __cplusplus
5 extern "C" {
6 #endif
7
8 #define TAG_ISAPNP 'PNPI'
9
10 typedef enum {
11 dsStopped,
12 dsStarted
13 } ISAPNP_DEVICE_STATE;
14
15 typedef struct _ISAPNP_COMMON_EXTENSION {
16 PDEVICE_OBJECT Self;
17 BOOLEAN IsFdo;
18 ISAPNP_DEVICE_STATE State;
19 } ISAPNP_COMMON_EXTENSION, *PISAPNP_COMMON_EXTENSION;
20
21 typedef struct _ISAPNP_FDO_EXTENSION {
22 ISAPNP_COMMON_EXTENSION Common;
23 PDEVICE_OBJECT Ldo;
24 PDEVICE_OBJECT Pdo;
25 LIST_ENTRY DeviceListHead;
26 ULONG DeviceCount;
27 PUCHAR ReadDataPort;
28 KSPIN_LOCK Lock;
29 } ISAPNP_FDO_EXTENSION, *PISAPNP_FDO_EXTENSION;
30
31 typedef struct _ISAPNP_LOGICAL_DEVICE {
32 ISAPNP_COMMON_EXTENSION Common;
33 USHORT VendorId;
34 USHORT ProdId;
35 USHORT IoAddr;
36 UCHAR IrqNo;
37 UCHAR CSN;
38 UCHAR LDN;
39 LIST_ENTRY ListEntry;
40 } ISAPNP_LOGICAL_DEVICE, *PISAPNP_LOGICAL_DEVICE;
41
42 /* isapnp.c */
43
44 DRIVER_INITIALIZE DriverEntry;
45
46 NTSTATUS
47 NTAPI
48 DriverEntry(
49 IN PDRIVER_OBJECT DriverObject,
50 IN PUNICODE_STRING RegistryPath);
51
52 NTSTATUS
53 NTAPI
54 IsaForwardIrpSynchronous(
55 IN PISAPNP_FDO_EXTENSION FdoExt,
56 IN PIRP Irp);
57
58 /* fdo.c */
59 NTSTATUS
60 NTAPI
61 IsaFdoPnp(
62 IN PISAPNP_FDO_EXTENSION FdoExt,
63 IN PIRP Irp,
64 IN PIO_STACK_LOCATION IrpSp);
65
66 /* pdo.c */
67 NTSTATUS
68 NTAPI
69 IsaPdoPnp(
70 IN PISAPNP_LOGICAL_DEVICE LogDev,
71 IN PIRP Irp,
72 IN PIO_STACK_LOCATION IrpSp);
73
74 /* hardware.c */
75 NTSTATUS
76 NTAPI
77 IsaHwDetectReadDataPort(
78 IN PISAPNP_FDO_EXTENSION FdoExt);
79
80 NTSTATUS
81 NTAPI
82 IsaHwFillDeviceList(
83 IN PISAPNP_FDO_EXTENSION FdoExt);
84
85 NTSTATUS
86 NTAPI
87 IsaHwDeactivateDevice(
88 IN PISAPNP_LOGICAL_DEVICE LogicalDevice);
89
90 NTSTATUS
91 NTAPI
92 IsaHwActivateDevice(
93 IN PISAPNP_LOGICAL_DEVICE LogicalDevice);
94
95 #ifdef __cplusplus
96 }
97 #endif