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