C# Class Mosa.DeviceDriver.ISA.FloppyDiskController

Inheritance: HardwareDevice, IDevice, IHardwareDevice, IDiskControllerDevice
Afficher le fichier Open project: tgiphil/MOSA-Project

Protected Properties

Свойство Type Description
commandPort IReadWriteIOPort
configPort IReadWriteIOPort
dataPort IReadWriteIOPort
enchancedController bool
floppyDMA IDMAChannel
floppyDrives FloppyDriveInfo[]
floppyMedia FloppyMediaInfo[]
interruptSet bool
lastSeek LastSeek[]
spinLock SpinLock
statusPort IReadWriteIOPort
trackCache TrackCache[]

Méthodes publiques

Méthode Description
CanWrite ( uint drive ) : bool

Determines whether this instance can write the specified drive NBR.

FloppyDiskController ( ) : Mosa.DeviceSystem

Initializes a new instance of the FloppyDiskController class.

GetSectorSize ( uint drive ) : uint

Gets the size of the sector.

GetTotalSectors ( uint drive ) : uint

Gets the total sectors.

OnInterrupt ( ) : bool

Called when an interrupt is received.

Open ( uint drive ) : bool

Opens the specified drive.

ReadBlock ( uint drive, uint block, uint count, byte data ) : bool

Reads the block.

Release ( uint drive ) : bool

Releases the specified drive.

Setup ( HardwareResources hardwareResources ) : bool

Setups this hardware device driver

Start ( ) : DeviceDriverStartStatus

Starts this hardware device.

WriteBlock ( uint drive, uint block, uint count, byte data ) : bool

Writes the block.

Méthodes protégées

Méthode Description
CHSToLBA ( uint drive, uint cylinder, uint head, uint sector ) : uint

CHSs to LBA.

ClearInterrupt ( ) : void

Clears the interrupt.

DetectDrives ( ) : void

Detects the drives.

DetermineByType ( byte type ) : FloppyDriveInfo

Determines the type of the by.

GetByte ( ) : byte

Gets the byte.

LBAToHead ( uint drive, uint lba ) : byte

LBAs to head.

LBAToSector ( uint drive, uint lba ) : byte

LBAs to sector.

LBAToTrack ( uint drive, uint lba ) : byte

LBAs to track.

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

Performs the IO.

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

Reads the block2.

Recalibrate ( uint drive ) : bool

Re-calibrates the specified drive.

ResetController ( ) : void

Resets the controller.

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

Seeks the specified drive.

SendByte ( byte command ) : void

Sends the byte.

TurnOffMotor ( uint drive ) : void

Turns the off motor.

TurnOnMotor ( uint drive ) : void

Turns the on motor.

WaitForInterrupt ( uint milliseconds ) : bool

Waits for interrupt.

WaitForReqisterReady ( ) : bool

Waits for register ready.

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

Writes the block.

Method Details

CHSToLBA() protected méthode

CHSs to LBA.
protected CHSToLBA ( uint drive, uint cylinder, uint head, uint sector ) : uint
drive uint The drive.
cylinder uint The cylinder.
head uint The head.
sector uint The sector.
Résultat uint

CanWrite() public méthode

Determines whether this instance can write the specified drive NBR.
public CanWrite ( uint drive ) : bool
drive uint The drive NBR.
Résultat bool

ClearInterrupt() protected méthode

Clears the interrupt.
protected ClearInterrupt ( ) : void
Résultat void

DetectDrives() protected méthode

Detects the drives.
protected DetectDrives ( ) : void
Résultat void

DetermineByType() protected static méthode

Determines the type of the by.
protected static DetermineByType ( byte type ) : FloppyDriveInfo
type byte The type.
Résultat FloppyDriveInfo

FloppyDiskController() public méthode

Initializes a new instance of the FloppyDiskController class.
public FloppyDiskController ( ) : Mosa.DeviceSystem
Résultat Mosa.DeviceSystem

GetByte() protected méthode

Gets the byte.
protected GetByte ( ) : byte
Résultat byte

GetSectorSize() public méthode

Gets the size of the sector.
public GetSectorSize ( uint drive ) : uint
drive uint The drive.
Résultat uint

GetTotalSectors() public méthode

Gets the total sectors.
public GetTotalSectors ( uint drive ) : uint
drive uint The drive NBR.
Résultat uint

LBAToHead() protected méthode

LBAs to head.
protected LBAToHead ( uint drive, uint lba ) : byte
drive uint The drive.
lba uint The lba.
Résultat byte

LBAToSector() protected méthode

LBAs to sector.
protected LBAToSector ( uint drive, uint lba ) : byte
drive uint The drive.
lba uint The lba.
Résultat byte

LBAToTrack() protected méthode

LBAs to track.
protected LBAToTrack ( uint drive, uint lba ) : byte
drive uint The drive.
lba uint The lba.
Résultat byte

OnInterrupt() public méthode

Called when an interrupt is received.
public OnInterrupt ( ) : bool
Résultat bool

Open() public méthode

Opens the specified drive.
public Open ( uint drive ) : bool
drive uint The drive NBR.
Résultat bool

PerformIO() protected méthode

Performs the IO.
protected PerformIO ( SectorOperation operation, uint drive, byte sector, byte track, byte head, uint count, byte data, uint offset ) : bool
operation SectorOperation The operation.
drive uint The drive.
sector byte The sector.
track byte The track.
head byte The head.
count uint The count.
data byte The data.
offset uint The offset.
Résultat bool

ReadBlock() public méthode

Reads the block.
public ReadBlock ( uint drive, uint block, uint count, byte data ) : bool
drive uint The drive NBR.
block uint The block.
count uint The count.
data byte The data.
Résultat bool

ReadBlock2() protected méthode

Reads the block2.
protected ReadBlock2 ( uint drive, uint lba, byte data, uint offset ) : bool
drive uint The drive.
lba uint The lba.
data byte The data.
offset uint The offset.
Résultat bool

Recalibrate() protected méthode

Re-calibrates the specified drive.
protected Recalibrate ( uint drive ) : bool
drive uint The drive.
Résultat bool

Release() public méthode

Releases the specified drive.
public Release ( uint drive ) : bool
drive uint The drive.
Résultat bool

ResetController() protected méthode

Resets the controller.
protected ResetController ( ) : void
Résultat void

Seek() protected méthode

Seeks the specified drive.
protected Seek ( uint drive, byte track, byte head ) : bool
drive uint The drive.
track byte The track.
head byte The head.
Résultat bool

SendByte() protected méthode

Sends the byte.
protected SendByte ( byte command ) : void
command byte The command.
Résultat void

Setup() public méthode

Setups this hardware device driver
public Setup ( HardwareResources hardwareResources ) : bool
hardwareResources HardwareResources
Résultat bool

Start() public méthode

Starts this hardware device.
public Start ( ) : DeviceDriverStartStatus
Résultat DeviceDriverStartStatus

TurnOffMotor() protected méthode

Turns the off motor.
protected TurnOffMotor ( uint drive ) : void
drive uint The drive.
Résultat void

TurnOnMotor() protected méthode

Turns the on motor.
protected TurnOnMotor ( uint drive ) : void
drive uint The drive.
Résultat void

WaitForInterrupt() protected méthode

Waits for interrupt.
protected WaitForInterrupt ( uint milliseconds ) : bool
milliseconds uint The milliseconds.
Résultat bool

WaitForReqisterReady() protected méthode

Waits for register ready.
protected WaitForReqisterReady ( ) : bool
Résultat bool

WriteBlock() public méthode

Writes the block.
public WriteBlock ( uint drive, uint block, uint count, byte data ) : bool
drive uint The drive NBR.
block uint The block.
count uint The count.
data byte The data.
Résultat bool

WriteBlock2() protected méthode

Writes the block.
protected WriteBlock2 ( uint drive, uint lba, uint count, byte data, uint offset ) : bool
drive uint The drive.
lba uint The lba.
count uint The count.
data byte The data.
offset uint The offset.
Résultat bool

Property Details

commandPort protected_oe property

protected IReadWriteIOPort commandPort
Résultat IReadWriteIOPort

configPort protected_oe property

protected IReadWriteIOPort configPort
Résultat IReadWriteIOPort

dataPort protected_oe property

protected IReadWriteIOPort dataPort
Résultat IReadWriteIOPort

enchancedController protected_oe property

protected bool enchancedController
Résultat bool

floppyDMA protected_oe property

protected IDMAChannel floppyDMA
Résultat IDMAChannel

floppyDrives protected_oe property

protected FloppyDriveInfo[] floppyDrives
Résultat FloppyDriveInfo[]

floppyMedia protected_oe property

protected FloppyMediaInfo[] floppyMedia
Résultat FloppyMediaInfo[]

interruptSet protected_oe property

protected bool interruptSet
Résultat bool

lastSeek protected_oe property

protected LastSeek[] lastSeek
Résultat LastSeek[]

spinLock protected_oe property

protected SpinLock spinLock
Résultat SpinLock

statusPort protected_oe property

protected IReadWriteIOPort statusPort
Résultat IReadWriteIOPort

trackCache protected_oe property

protected TrackCache[] trackCache
Résultat TrackCache[]