Home | Info | Community | Development | myReactOS | Contact Us
ReactOS Development > Doxygenfloppy.h
Go to the documentation of this file.
00001 /* 00002 * ReactOS Floppy Driver 00003 * Copyright (C) 2004, Vizzini (vizzini@plasmic.com) 00004 * 00005 * This program is free software; you can redistribute it and/or modify 00006 * it under the terms of the GNU General Public License as published by 00007 * the Free Software Foundation; either version 2 of the License, or 00008 * (at your option) any later version. 00009 * 00010 * This program is distributed in the hope that it will be useful, 00011 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00013 * GNU General Public License for more details. 00014 * 00015 * You should have received a copy of the GNU General Public License along 00016 * with this program; if not, write to the Free Software Foundation, Inc., 00017 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 00018 * 00019 * PROJECT: ReactOS Floppy Driver 00020 * FILE: floppy.h 00021 * PURPOSE: Header for Main floppy driver routines 00022 * PROGRAMMER: Vizzini (vizzini@plasmic.com) 00023 * REVISIONS: 00024 * 15-Feb-2004 vizzini - Created 00025 */ 00026 00027 #define MAX_DEVICE_NAME 255 00028 #define MAX_ARC_PATH_LEN 255 00029 #define MAX_DRIVES_PER_CONTROLLER 4 00030 #define MAX_CONTROLLERS 4 00031 00032 /* MS doesn't prototype this but the w2k kernel exports it */ 00033 int _cdecl swprintf(const WCHAR *, ...); 00034 00035 /* need ioctls in ddk build mode */ 00036 #include <ntdddisk.h> 00037 00038 struct _CONTROLLER_INFO; 00039 00040 typedef struct _DRIVE_INFO 00041 { 00042 struct _CONTROLLER_INFO *ControllerInfo; 00043 UCHAR UnitNumber; /* 0,1,2,3 */ 00044 LARGE_INTEGER MotorStartTime; 00045 PDEVICE_OBJECT DeviceObject; 00046 CM_FLOPPY_DEVICE_DATA FloppyDeviceData; 00047 DISK_GEOMETRY DiskGeometry; 00048 UCHAR BytesPerSectorCode; 00049 WCHAR SymLinkBuffer[MAX_DEVICE_NAME]; 00050 WCHAR ArcPathBuffer[MAX_ARC_PATH_LEN]; 00051 ULONG DiskChangeCount; 00052 BOOLEAN Initialized; 00053 } DRIVE_INFO, *PDRIVE_INFO; 00054 00055 typedef struct _CONTROLLER_INFO 00056 { 00057 BOOLEAN Populated; 00058 BOOLEAN Initialized; 00059 ULONG ControllerNumber; 00060 INTERFACE_TYPE InterfaceType; 00061 ULONG BusNumber; 00062 ULONG Level; 00063 KIRQL MappedLevel; 00064 ULONG Vector; 00065 ULONG MappedVector; 00066 KINTERRUPT_MODE InterruptMode; 00067 PUCHAR BaseAddress; 00068 ULONG Dma; 00069 ULONG MapRegisters; 00070 PVOID MapRegisterBase; 00071 BOOLEAN Master; 00072 KEVENT SynchEvent; 00073 KDPC Dpc; 00074 PKINTERRUPT InterruptObject; 00075 PADAPTER_OBJECT AdapterObject; 00076 UCHAR NumberOfDrives; 00077 BOOLEAN ImpliedSeeks; 00078 DRIVE_INFO DriveInfo[MAX_DRIVES_PER_CONTROLLER]; 00079 PDRIVE_INFO CurrentDrive; 00080 BOOLEAN Model30; 00081 KEVENT MotorStoppedEvent; 00082 KTIMER MotorTimer; 00083 KDPC MotorStopDpc; 00084 BOOLEAN StopDpcQueued; 00085 } CONTROLLER_INFO, *PCONTROLLER_INFO; 00086 00087 NTSTATUS NTAPI 00088 DriverEntry(PDRIVER_OBJECT DriverObject, PUNICODE_STRING RegistryPath); 00089 00090 VOID NTAPI 00091 SignalMediaChanged(PDEVICE_OBJECT DeviceObject, PIRP Irp); 00092 00093 VOID NTAPI 00094 WaitForControllerInterrupt(PCONTROLLER_INFO ControllerInfo); 00095 00096 NTSTATUS NTAPI 00097 ResetChangeFlag(PDRIVE_INFO DriveInfo); 00098 00099 VOID NTAPI 00100 StartMotor(PDRIVE_INFO DriveInfo); 00101 00102 VOID NTAPI 00103 StopMotor(PCONTROLLER_INFO ControllerInfo); 00104 00105 /* 00106 * MEDIA TYPES 00107 * 00108 * This table was found at http://www.nondot.org/sabre/os/files/Disk/FloppyMediaIDs.txt. 00109 * Thanks to raster@indirect.com for this information. 00110 * 00111 * Format Size Cyls Heads Sec/Trk FATs Sec/FAT Sec/Root Media 00112 * 160K 5 1/4 40 1 8 2 ? ? FE 00113 * 180K 5 1/4 40 1 9 2 ? 4 FC 00114 * 320K 5 1/4 40 2 8 2 ? ? FF 00115 * 360K 5 1/4 40 2 9 2 4 7 FD 00116 * 1.2M 5 1/4 80 2 15 2 14 14 F9 00117 * 720K 3 1/2 80 2 9 2 6 7 F9 00118 * 1.44M 3 1/2 80 2 18 2 18 14 F0 00119 */ 00120 00121 #define GEOMETRY_144_MEDIATYPE F3_1Pt44_512 00122 #define GEOMETRY_144_CYLINDERS 80 00123 #define GEOMETRY_144_TRACKSPERCYLINDER 2 00124 #define GEOMETRY_144_SECTORSPERTRACK 18 00125 #define GEOMETRY_144_BYTESPERSECTOR 512 00126 Generated on Sat May 26 2012 04:26:54 for ReactOS by
1.7.6.1
|