ReactOS 0.4.16-dev-197-g92996da
fdc.h
Go to the documentation of this file.
1/*
2 * PROJECT: ReactOS Floppy Disk Controller Driver
3 * LICENSE: GNU GPLv2 only as published by the Free Software Foundation
4 * FILE: drivers/storage/fdc/fdc/fdc.h
5 * PURPOSE: Common header file
6 * PROGRAMMERS: Eric Kohl
7 */
8
9#ifndef _FDC_PCH_
10#define _FDC_PCH_
11
12#include <ntifs.h>
13
14#define MAX_DEVICE_NAME 255
15#define MAX_ARC_PATH_LEN 255
16#define MAX_DRIVES_PER_CONTROLLER 4
17#define MAX_CONTROLLERS 4
18
19struct _CONTROLLER_INFO;
20
21typedef struct _DRIVE_INFO
22{
24 UCHAR UnitNumber; /* 0,1,2,3 */
28// LARGE_INTEGER MotorStartTime;
29// DISK_GEOMETRY DiskGeometry;
30// UCHAR BytesPerSectorCode;
31// WCHAR SymLinkBuffer[MAX_DEVICE_NAME];
32// WCHAR ArcPathBuffer[MAX_ARC_PATH_LEN];
33// ULONG DiskChangeCount;
34// BOOLEAN Initialized;
36
37typedef struct _CONTROLLER_INFO
38{
40// BOOLEAN Initialized;
41// ULONG ControllerNumber;
42// INTERFACE_TYPE InterfaceType;
43// ULONG BusNumber;
44// ULONG Level;
45// KIRQL MappedLevel;
46// ULONG Vector;
47// ULONG MappedVector;
48// KINTERRUPT_MODE InterruptMode;
50// ULONG Dma;
51// ULONG MapRegisters;
52// PVOID MapRegisterBase;
53// BOOLEAN Master;
54// KEVENT SynchEvent;
55// KDPC Dpc;
56// PKINTERRUPT InterruptObject;
57// PADAPTER_OBJECT AdapterObject;
59// BOOLEAN ImpliedSeeks;
61// PDRIVE_INFO CurrentDrive;
62// BOOLEAN Model30;
63// KEVENT MotorStoppedEvent;
64// KTIMER MotorTimer;
65// KDPC MotorStopDpc;
66// BOOLEAN StopDpcQueued;
68
69
70typedef struct _COMMON_DEVICE_EXTENSION
71{
75
76typedef struct _FDO_DEVICE_EXTENSION
77{
79
82
84
86
87
88typedef struct _PDO_DEVICE_EXTENSION
89{
91
94
96 UNICODE_STRING DeviceId; // REG_SZ
97 UNICODE_STRING InstanceId; // REG_SZ
98 UNICODE_STRING HardwareIds; // REG_MULTI_SZ
99 UNICODE_STRING CompatibleIds; // REG_MULTI_SZ
101
102#define FDC_TAG 'acdF'
103
104/* fdo.c */
105
107NTAPI
110 IN PIRP Irp);
111
112/* misc.c */
113
116 IN ULONG Flags,
119
120/* pdo.c */
121
123NTAPI
126 IN PIRP Irp);
127
128#endif /* _FDC_PCH_ */
unsigned char BOOLEAN
LONG NTSTATUS
Definition: precomp.h:26
_In_ PIRP Irp
Definition: csq.h:116
struct _FDO_DEVICE_EXTENSION FDO_DEVICE_EXTENSION
struct _DRIVE_INFO DRIVE_INFO
struct _FDO_DEVICE_EXTENSION * PFDO_DEVICE_EXTENSION
NTSTATUS NTAPI FdcPdoPnp(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
Definition: pdo.c:98
struct _DRIVE_INFO * PDRIVE_INFO
NTSTATUS DuplicateUnicodeString(IN ULONG Flags, IN PCUNICODE_STRING SourceString, OUT PUNICODE_STRING DestinationString)
Definition: misc.c:31
struct _CONTROLLER_INFO * PCONTROLLER_INFO
NTSTATUS NTAPI FdcFdoPnp(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
Definition: fdo.c:444
struct _PDO_DEVICE_EXTENSION PDO_DEVICE_EXTENSION
struct _PDO_DEVICE_EXTENSION * PPDO_DEVICE_EXTENSION
struct _CONTROLLER_INFO CONTROLLER_INFO
struct _COMMON_DEVICE_EXTENSION COMMON_DEVICE_EXTENSION
struct _COMMON_DEVICE_EXTENSION * PCOMMON_DEVICE_EXTENSION
#define MAX_DRIVES_PER_CONTROLLER
Definition: floppy.h:31
_Out_ _Inout_ POEM_STRING _In_ PCUNICODE_STRING SourceString
Definition: rtlfuncs.h:1922
_Out_ _Inout_ POEM_STRING DestinationString
Definition: rtlfuncs.h:1921
PDEVICE_OBJECT DeviceObject
Definition: pci.h:46
UCHAR NumberOfDrives
Definition: fdc.h:58
DRIVE_INFO DriveInfo[MAX_DRIVES_PER_CONTROLLER]
Definition: fdc.h:60
PUCHAR BaseAddress
Definition: fdc.h:49
BOOLEAN Populated
Definition: fdc.h:39
struct _CONTROLLER_INFO * ControllerInfo
Definition: fdc.h:23
PDEVICE_OBJECT DeviceObject
Definition: fdc.h:26
CM_FLOPPY_DEVICE_DATA FloppyDeviceData
Definition: fdc.h:27
ULONG PeripheralNumber
Definition: fdc.h:25
UCHAR UnitNumber
Definition: fdc.h:24
PDEVICE_OBJECT LowerDevice
Definition: i8042prt.h:130
COMMON_DEVICE_EXTENSION Common
Definition: pci.h:84
CONTROLLER_INFO ControllerInfo
Definition: fdc.h:83
PDEVICE_OBJECT Pdo
Definition: i8042prt.h:128
PDEVICE_OBJECT Fdo
Definition: pci.h:61
UNICODE_STRING InstanceId
Definition: serenum.h:53
UNICODE_STRING DeviceDescription
Definition: pci.h:73
UNICODE_STRING HardwareIds
Definition: serenum.h:54
COMMON_DEVICE_EXTENSION Common
Definition: pci.h:59
UNICODE_STRING CompatibleIds
Definition: serenum.h:55
PDRIVE_INFO DriveInfo
Definition: fdc.h:93
UNICODE_STRING DeviceId
Definition: serenum.h:52
#define NTAPI
Definition: typedefs.h:36
#define IN
Definition: typedefs.h:39
unsigned char * PUCHAR
Definition: typedefs.h:53
uint32_t ULONG
Definition: typedefs.h:59
#define OUT
Definition: typedefs.h:40
_In_ PDEVICE_OBJECT DeviceObject
Definition: wdfdevice.h:2055
_Must_inspect_result_ _In_ ULONG Flags
Definition: wsk.h:170
unsigned char UCHAR
Definition: xmlstorage.h:181