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