Sync with trunk r58740.
[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 NTSTATUS
44 NTAPI
45 DriverEntry(
46 IN PDRIVER_OBJECT DriverObject,
47 IN PUNICODE_STRING RegistryPath);
48
49 NTSTATUS
50 NTAPI
51 IsaForwardIrpSynchronous(
52 IN PISAPNP_FDO_EXTENSION FdoExt,
53 IN PIRP Irp);
54
55 /* fdo.c */
56 NTSTATUS
57 NTAPI
58 IsaFdoPnp(
59 IN PISAPNP_FDO_EXTENSION FdoExt,
60 IN PIRP Irp,
61 IN PIO_STACK_LOCATION IrpSp);
62
63 /* pdo.c */
64 NTSTATUS
65 NTAPI
66 IsaPdoPnp(
67 IN PISAPNP_LOGICAL_DEVICE LogDev,
68 IN PIRP Irp,
69 IN PIO_STACK_LOCATION IrpSp);
70
71 /* hardware.c */
72 NTSTATUS
73 NTAPI
74 IsaHwDetectReadDataPort(
75 IN PISAPNP_FDO_EXTENSION FdoExt);
76
77 NTSTATUS
78 NTAPI
79 IsaHwFillDeviceList(
80 IN PISAPNP_FDO_EXTENSION FdoExt);
81
82 NTSTATUS
83 NTAPI
84 IsaHwDeactivateDevice(
85 IN PISAPNP_LOGICAL_DEVICE LogicalDevice);
86
87 NTSTATUS
88 NTAPI
89 IsaHwActivateDevice(
90 IN PISAPNP_LOGICAL_DEVICE LogicalDevice);
91
92 #ifdef __cplusplus
93 }
94 #endif