C# Class SharpOS.Kernel.DeviceSystem.DiskController.FloppyDiskDriver

Inheritance: SharpOS.Kernel.DeviceSystem.HardwareDevice, IDiskControllerDevice
Show file Open project: sharpos/SharpOS

Protected Properties

Property Type Description
CMOSComand IReadWriteIOPort
CMOSResponse IReadWriteIOPort
ConfigPort IReadWriteIOPort
ControllerCommands IReadWriteIOPort
DataPort IReadWriteIOPort
StatusPort IReadWriteIOPort
enchancedController bool
floppyDMA IDMAChannel
floppyDrives FloppyDriveInfo[]
floppyIRQ IRQHandler
floppyMedia FloppyMediaInfo[]
ioBase ushort
lastSeek LastSeek[]
spinLock SharpOS.Kernel.ADC.SpinLock
trackCache TrackCache[]
verbose bool

Public Methods

Method Description
CanWrite ( uint driveNbr ) : bool
FloppyDiskDriver ( ) : System
FloppyDiskDriver ( ushort ioBase ) : System
GetSectorSize ( uint driveNbr ) : uint
GetTotalSectors ( uint driveNbr ) : uint
Initialize ( ) : void
Open ( uint driveNbr ) : bool
ReadBlock ( uint driveNbr, uint block, uint count, byte data ) : bool
Release ( uint driveNbr ) : bool
WriteBlock ( uint driveNbr, uint block, uint count, byte data ) : bool

Protected Methods

Method Description
CHSToLBA ( uint drive, uint cylinder, uint head, uint sector ) : uint
DetectDrives ( ) : void
DetermineByType ( byte type ) : FloppyDriveInfo
GetByte ( ) : byte
LBAToHead ( uint drive, uint lba ) : byte
LBAToSector ( uint drive, uint lba ) : byte
LBAToTrack ( uint drive, uint lba ) : byte
PerformIO ( SectorOperation operation, uint drive, byte sector, byte track, byte head, uint count, byte data, uint offset ) : bool
ReadBlock2 ( uint drive, uint lba, byte data, uint offset ) : bool
Recalibrate ( uint drive ) : bool
ResetController ( ) : void
Seek ( uint drive, byte track, byte head ) : bool
SendByte ( byte command ) : void
TurnOffMotor ( uint drive ) : void
TurnOnMotor ( uint drive ) : void
WaitForReqisterReady ( ) : bool
WriteBlock2 ( uint drive, uint lba, uint count, byte data, uint offset ) : bool

Method Details

CHSToLBA() protected method

protected CHSToLBA ( uint drive, uint cylinder, uint head, uint sector ) : uint
drive uint
cylinder uint
head uint
sector uint
return uint

CanWrite() public method

public CanWrite ( uint driveNbr ) : bool
driveNbr uint
return bool

DetectDrives() protected method

protected DetectDrives ( ) : void
return void

DetermineByType() protected static method

protected static DetermineByType ( byte type ) : FloppyDriveInfo
type byte
return FloppyDriveInfo

FloppyDiskDriver() public method

public FloppyDiskDriver ( ) : System
return System

FloppyDiskDriver() public method

public FloppyDiskDriver ( ushort ioBase ) : System
ioBase ushort
return System

GetByte() protected method

protected GetByte ( ) : byte
return byte

GetSectorSize() public method

public GetSectorSize ( uint driveNbr ) : uint
driveNbr uint
return uint

GetTotalSectors() public method

public GetTotalSectors ( uint driveNbr ) : uint
driveNbr uint
return uint

Initialize() public method

public Initialize ( ) : void
return void

LBAToHead() protected method

protected LBAToHead ( uint drive, uint lba ) : byte
drive uint
lba uint
return byte

LBAToSector() protected method

protected LBAToSector ( uint drive, uint lba ) : byte
drive uint
lba uint
return byte

LBAToTrack() protected method

protected LBAToTrack ( uint drive, uint lba ) : byte
drive uint
lba uint
return byte

Open() public method

public Open ( uint driveNbr ) : bool
driveNbr uint
return bool

PerformIO() protected method

protected PerformIO ( SectorOperation operation, uint drive, byte sector, byte track, byte head, uint count, byte data, uint offset ) : bool
operation SectorOperation
drive uint
sector byte
track byte
head byte
count uint
data byte
offset uint
return bool

ReadBlock() public method

public ReadBlock ( uint driveNbr, uint block, uint count, byte data ) : bool
driveNbr uint
block uint
count uint
data byte
return bool

ReadBlock2() protected method

protected ReadBlock2 ( uint drive, uint lba, byte data, uint offset ) : bool
drive uint
lba uint
data byte
offset uint
return bool

Recalibrate() protected method

protected Recalibrate ( uint drive ) : bool
drive uint
return bool

Release() public method

public Release ( uint driveNbr ) : bool
driveNbr uint
return bool

ResetController() protected method

protected ResetController ( ) : void
return void

Seek() protected method

protected Seek ( uint drive, byte track, byte head ) : bool
drive uint
track byte
head byte
return bool

SendByte() protected method

protected SendByte ( byte command ) : void
command byte
return void

TurnOffMotor() protected method

protected TurnOffMotor ( uint drive ) : void
drive uint
return void

TurnOnMotor() protected method

protected TurnOnMotor ( uint drive ) : void
drive uint
return void

WaitForReqisterReady() protected method

protected WaitForReqisterReady ( ) : bool
return bool

WriteBlock() public method

public WriteBlock ( uint driveNbr, uint block, uint count, byte data ) : bool
driveNbr uint
block uint
count uint
data byte
return bool

WriteBlock2() protected method

protected WriteBlock2 ( uint drive, uint lba, uint count, byte data, uint offset ) : bool
drive uint
lba uint
count uint
data byte
offset uint
return bool

Property Details

CMOSComand protected property

protected IReadWriteIOPort CMOSComand
return IReadWriteIOPort

CMOSResponse protected property

protected IReadWriteIOPort CMOSResponse
return IReadWriteIOPort

ConfigPort protected property

protected IReadWriteIOPort ConfigPort
return IReadWriteIOPort

ControllerCommands protected property

protected IReadWriteIOPort ControllerCommands
return IReadWriteIOPort

DataPort protected property

protected IReadWriteIOPort DataPort
return IReadWriteIOPort

StatusPort protected property

protected IReadWriteIOPort StatusPort
return IReadWriteIOPort

enchancedController protected property

protected bool enchancedController
return bool

floppyDMA protected property

protected IDMAChannel floppyDMA
return IDMAChannel

floppyDrives protected property

protected FloppyDriveInfo[] floppyDrives
return FloppyDriveInfo[]

floppyIRQ protected property

protected IRQHandler floppyIRQ
return IRQHandler

floppyMedia protected property

protected FloppyMediaInfo[] floppyMedia
return FloppyMediaInfo[]

ioBase protected property

protected ushort ioBase
return ushort

lastSeek protected property

protected LastSeek[] lastSeek
return LastSeek[]

spinLock protected property

protected SpinLock,SharpOS.Kernel.ADC spinLock
return SharpOS.Kernel.ADC.SpinLock

trackCache protected property

protected TrackCache[] trackCache
return TrackCache[]

verbose protected property

protected bool verbose
return bool