本文整理汇总了C#中IHardwareResources类的典型用法代码示例。如果您正苦于以下问题:C# IHardwareResources类的具体用法?C# IHardwareResources怎么用?C# IHardwareResources使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
IHardwareResources类属于命名空间,在下文中一共展示了IHardwareResources类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: Setup
/// <summary>
/// Setups this hardware device driver
/// </summary>
/// <returns></returns>
public override bool Setup(IHardwareResources hardwareResources)
{
this.hardwareResources = hardwareResources;
base.name = "IntelHSUART";
return true;
}
开发者ID:Profi-Concept,项目名称:MOSA-Project,代码行数:11,代码来源:IntelHSUART.cs
示例2: Setup
/// <summary>
/// Setups this hardware device driver
/// </summary>
/// <returns></returns>
public override bool Setup(IHardwareResources hardwareResources)
{
this.hardwareResources = hardwareResources;
base.name = "CMOS";
commandPort = base.hardwareResources.GetIOPort(0, 0);
dataPort = base.hardwareResources.GetIOPort(0, 4);
return true;
}
开发者ID:hj1980,项目名称:Mosa,代码行数:14,代码来源:CMOS.cs
示例3: Setup
/// <summary>
/// Setups this hardware device driver
/// </summary>
/// <returns></returns>
public override bool Setup(IHardwareResources hardwareResources)
{
this.hardwareResources = hardwareResources;
base.name = "TEST_" + hardwareResources.GetIOPortRegion(0).BaseIOPort.ToString("X");
TestPort = hardwareResources.GetIOPort(0, 0);
Command = new CommandRegister(TestPort, 8);
Command.Enabled = true;
return true;
}
开发者ID:rtownsend,项目名称:MOSA-Project,代码行数:17,代码来源:TestDriver.cs
示例4: ClaimResources
/// <summary>
/// Claims the resources.
/// </summary>
/// <returns></returns>
public bool ClaimResources(IHardwareResources hardwareResources)
{
if (!ioPortResources.ClaimResources(hardwareResources))
return false;
if (!memoryResources.ClaimResources(hardwareResources))
{
ioPortResources.ReleaseResources(hardwareResources);
return false;
}
return true;
}
开发者ID:tea,项目名称:MOSA-Project,代码行数:17,代码来源:ResourceManager.cs
示例5: ClaimResources
/// <summary>
/// Claims the resources.
/// </summary>
/// <param name="hardwareResources">The hardware resources.</param>
/// <returns></returns>
public bool ClaimResources(IHardwareResources hardwareResources)
{
spinLock.Enter();
for (byte r = 0; r < hardwareResources.MemoryRegionCount; r++)
{
IMemoryRegion region = hardwareResources.GetMemoryRegion(r);
foreach (IMemoryRegion memoryRegion in memoryRegions)
if ((memoryRegion.Contains(region.BaseAddress) || memoryRegion.Contains(region.BaseAddress + region.Size)))
return false;
}
for (byte r = 0; r < hardwareResources.MemoryRegionCount; r++)
memoryRegions.Add(hardwareResources.GetMemoryRegion(r));
spinLock.Exit();
return true;
}
开发者ID:rtownsend,项目名称:MOSA-Project,代码行数:25,代码来源:MemoryResources.cs
示例6: ClaimResources
/// <summary>
/// Claims the resources.
/// </summary>
/// <param name="hardwareResources">The hardware resources.</param>
/// <returns></returns>
public bool ClaimResources(IHardwareResources hardwareResources)
{
spinLock.Enter();
for (byte r = 0; r < hardwareResources.IOPointRegionCount - 1; r++)
{
IIOPortRegion region = hardwareResources.GetIOPortRegion(r);
for (int p = 0; p < region.Size; p++)
if (portUsed[region.BaseIOPort + p])
return false;
}
for (byte r = 0; r < hardwareResources.IOPointRegionCount; r++)
{
IIOPortRegion region = hardwareResources.GetIOPortRegion(r);
for (int p = 0; p < region.Size; p++)
portUsed[region.BaseIOPort + p] = true;
}
spinLock.Exit();
return true;
}
开发者ID:pacificIT,项目名称:MOSA-Project,代码行数:28,代码来源:IOPortResources.cs
示例7: Setup
/// <summary>
/// Setups this hardware device driver
/// </summary>
/// <returns></returns>
public override bool Setup(IHardwareResources hardwareResources)
{
this.hardwareResources = hardwareResources;
base.name = "DMA_0x" + base.hardwareResources.GetIOPort(0, 0).Address.ToString("X");
statusRegister = base.hardwareResources.GetIOPort(0, 0x08);
commandRegister = base.hardwareResources.GetIOPort(0, 0x08);
requestRegister = base.hardwareResources.GetIOPort(0, 0x09);
channelMaskRegister = base.hardwareResources.GetIOPort(0, 0x0A);
modeRegister = base.hardwareResources.GetIOPort(0, 0x0B);
byteWordRegister = base.hardwareResources.GetIOPort(0, 0x0C);
intermediateRegister = base.hardwareResources.GetIOPort(0, 0x0D);
maskRegister = base.hardwareResources.GetIOPort(0, 0x0F);
channel0Address = base.hardwareResources.GetIOPort(0, 0x00);
channel0Count = base.hardwareResources.GetIOPort(0, 0x01);
channel0Page = base.hardwareResources.GetIOPort(0, 0x87);
channel1Address = base.hardwareResources.GetIOPort(0, 0x02);
channel1Count = base.hardwareResources.GetIOPort(0, 0x03);
channel1Page = base.hardwareResources.GetIOPort(0, 0x83);
channel2Address = base.hardwareResources.GetIOPort(0, 0x04);
channel2Count = base.hardwareResources.GetIOPort(0, 0x05);
channel2Page = base.hardwareResources.GetIOPort(0, 0x81);
channel3Address = base.hardwareResources.GetIOPort(0, 0x06);
channel3Count = base.hardwareResources.GetIOPort(0, 0x07);
channel3Page = base.hardwareResources.GetIOPort(0, 0x82);
memory0 = base.hardwareResources.GetMemory(0);
memory1 = base.hardwareResources.GetMemory(1);
memory2 = base.hardwareResources.GetMemory(2);
memory3 = base.hardwareResources.GetMemory(3);
return true;
}
开发者ID:rtownsend,项目名称:MOSA-Project,代码行数:41,代码来源:DMA8Bit.cs
示例8: ReleaseResources
/// <summary>
/// Releases the resources.
/// </summary>
/// <param name="hardwareResources">The hardware resources.</param>
public void ReleaseResources(IHardwareResources hardwareResources)
{
spinLock.Enter();
for (byte r = 0; r < hardwareResources.IOPointRegionCount; r++)
{
IIOPortRegion region = hardwareResources.GetIOPortRegion(r);
for (int p = 0; p < region.Size; p++)
portUsed[region.BaseIOPort + p] = false;
}
spinLock.Exit();
}
开发者ID:pacificIT,项目名称:MOSA-Project,代码行数:17,代码来源:IOPortResources.cs
示例9: Setup
/// <summary>
/// Setups this hardware device driver
/// </summary>
/// <returns></returns>
public override bool Setup(IHardwareResources hardwareResources)
{
this.hardwareResources = hardwareResources;
base.name = "VMWARE_SVGA_0x" + hardwareResources.GetIOPortRegion(0).BaseIOPort.ToString("X");
indexPort = hardwareResources.GetIOPort(0, 0);
valuePort = hardwareResources.GetIOPort(0, 1);
memory = base.hardwareResources.GetMemory(0);
fifo = base.hardwareResources.GetMemory(1);
return true;
}
开发者ID:hj1980,项目名称:Mosa,代码行数:17,代码来源:VMwareSVGAII.cs
示例10: Setup
/// <summary>
/// Setups this hardware device driver
/// </summary>
/// <returns></returns>
public override bool Setup(IHardwareResources hardwareResources)
{
this.hardwareResources = hardwareResources;
base.name = "PIT_0x" + base.hardwareResources.GetIOPort(0, 0).Address.ToString("X");
modeControlPort = base.hardwareResources.GetIOPort(0, 3);
counter0Divisor = base.hardwareResources.GetIOPort(0, 0);
return true;
}
开发者ID:Boddlnagg,项目名称:MOSA-Project,代码行数:14,代码来源:PIT.cs
示例11: Setup
/// <summary>
/// Setups this hardware device driver
/// </summary>
/// <returns></returns>
public override bool Setup(IHardwareResources hardwareResources)
{
this.hardwareResources = hardwareResources;
base.name = "VGAText";
miscellaneousOutput = base.hardwareResources.GetIOPort(0, 0x1C);
crtControllerIndex = base.hardwareResources.GetIOPort(0, 0x04);
crtControllerData = base.hardwareResources.GetIOPort(0, 0x05);
crtControllerIndexColor = base.hardwareResources.GetIOPort(0, 0x24);
crtControllerDataColor = base.hardwareResources.GetIOPort(0, 0x25);
miscellaneousOutputWrite = base.hardwareResources.GetIOPort(0, 0x12);
sequencerAddress = base.hardwareResources.GetIOPort(0, 0x14);
sequencerData = base.hardwareResources.GetIOPort(0, 0x15);
graphicsControllerAddress = base.hardwareResources.GetIOPort(0, 0x1E);
graphicsControllerData = base.hardwareResources.GetIOPort(0, 0x1F);
inputStatus1ReadB = base.hardwareResources.GetIOPort(0, 0x2A);
attributeAddress = base.hardwareResources.GetIOPort(0, 0x10);
attributeData = base.hardwareResources.GetIOPort(0, 0x11);
memory = base.hardwareResources.GetMemory(0);
return true;
}
开发者ID:rtownsend,项目名称:MOSA-Project,代码行数:28,代码来源:VGAText.cs
示例12: Setup
/// <summary>
/// Setups this hardware device driver
/// </summary>
/// <returns></returns>
public override bool Setup(IHardwareResources hardwareResources)
{
this.hardwareResources = hardwareResources;
base.name = "FDC_0x" + base.hardwareResources.GetIOPort(0, 0).Address.ToString("X");
base.parent = null; // no parent
commandPort = base.hardwareResources.GetIOPort(0, 2);
statusPort = base.hardwareResources.GetIOPort(0, 4);
dataPort = base.hardwareResources.GetIOPort(0, 5);
configPort = base.hardwareResources.GetIOPort(0, 7);
// floppyDMA = base.CreateDMAChannel(2);
// floppyIRQ = base.CreateIRQHandler(6);
return true;
}
开发者ID:davidleon,项目名称:MOSA-Project,代码行数:20,代码来源:FloppyDiskController.cs
示例13: ReleaseResources
/// <summary>
/// Releases the resources.
/// </summary>
/// <param name="hardwareResources">The hardware resources.</param>
/// <returns></returns>
public void ReleaseResources(IHardwareResources hardwareResources)
{
ioPortResources.ReleaseResources(hardwareResources);
memoryResources.ReleaseResources(hardwareResources);
}
开发者ID:hj1980,项目名称:Mosa,代码行数:10,代码来源:ResourceManager.cs
示例14: Setup
/// <summary>
/// Setups this hardware device driver
/// </summary>
/// <param name="hardwareResources"></param>
/// <returns></returns>
public override bool Setup(IHardwareResources hardwareResources)
{
this.hardwareResources = hardwareResources;
base.name = "PIC_0x" + base.hardwareResources.GetIOPort(0, 0).Address.ToString("X");
masterCommandPort = base.hardwareResources.GetIOPort(0, 0);
masterDataPort = base.hardwareResources.GetIOPort(0, 1);
slaveCommandPort = base.hardwareResources.GetIOPort(1, 0);
slaveDataPort = base.hardwareResources.GetIOPort(1, 1);
return true;
}
开发者ID:davidleon,项目名称:MOSA-Project,代码行数:18,代码来源:PIC.cs
示例15: Setup
/// <summary>
/// Setups this hardware device driver
/// </summary>
/// <returns></returns>
public abstract bool Setup(IHardwareResources hardwareResources);
开发者ID:GeroL,项目名称:MOSA-Project,代码行数:5,代码来源:HardwareDevice.cs
示例16: Setup
/// <summary>
/// Setups this hardware device driver
/// </summary>
/// <returns></returns>
public override bool Setup(IHardwareResources hardwareResources)
{
this.hardwareResources = hardwareResources;
base.name = "GenericVGA";
byte portBar = (byte)(base.hardwareResources.IOPointRegionCount - 1);
miscellaneousOutputRead = base.hardwareResources.GetIOPort(portBar, 0x1C);
crtControllerIndex = base.hardwareResources.GetIOPort(portBar, 0x04);
crtControllerData = base.hardwareResources.GetIOPort(portBar, 0x05);
crtControllerIndexColor = base.hardwareResources.GetIOPort(portBar, 0x24);
crtControllerDataColor = base.hardwareResources.GetIOPort(portBar, 0x25);
dacPaletteMask = base.hardwareResources.GetIOPort(portBar, 0x16);
dacIndexRead = base.hardwareResources.GetIOPort(portBar, 0x17);
dacIndexWrite = base.hardwareResources.GetIOPort(portBar, 0x18);
dacData = base.hardwareResources.GetIOPort(portBar, 0x19);
inputStatus1 = base.hardwareResources.GetIOPort(portBar, 0x12);
miscellaneousOutputWrite = base.hardwareResources.GetIOPort(portBar, 0x12);
sequencerAddress = base.hardwareResources.GetIOPort(portBar, 0x14);
sequencerData = base.hardwareResources.GetIOPort(portBar, 0x15);
graphicsControllerAddress = base.hardwareResources.GetIOPort(portBar, 0x1E);
graphicsControllerData = base.hardwareResources.GetIOPort(portBar, 0x1F);
inputStatus1ReadB = base.hardwareResources.GetIOPort(portBar, 0x2A);
attributeAddress = base.hardwareResources.GetIOPort(portBar, 0x10);
attributeData = base.hardwareResources.GetIOPort(portBar, 0x11);
memory = base.hardwareResources.GetMemory((byte)(base.hardwareResources.MemoryRegionCount - 1));
return true;
}
开发者ID:hj1980,项目名称:Mosa,代码行数:34,代码来源:GenericVGA.cs
示例17: Setup
/// <summary>
/// Setups this hardware device driver
/// </summary>
/// <param name="hardwareResources"></param>
/// <returns></returns>
public override bool Setup(IHardwareResources hardwareResources)
{
this.hardwareResources = hardwareResources;
base.name = "IDE_0x" + base.hardwareResources.GetIOPort(0, 0).Address.ToString("X");
DataPort = base.hardwareResources.GetIOPort(0, 0);
ErrorPort = base.hardwareResources.GetIOPort(0, 1);
FeaturePort = base.hardwareResources.GetIOPort(0, 1);
SectorCountPort = base.hardwareResources.GetIOPort(0, 2);
LBALowPort = base.hardwareResources.GetIOPort(0, 3);
LBAMidPort = base.hardwareResources.GetIOPort(0, 4);
LBAHighPort = base.hardwareResources.GetIOPort(0, 5);
DeviceHeadPort = base.hardwareResources.GetIOPort(0, 6);
CommandPort = base.hardwareResources.GetIOPort(0, 7);
StatusPort = base.hardwareResources.GetIOPort(0, 7);
for (int drive = 0; drive < DrivesPerConroller; drive++)
{
driveInfo[drive].Present = false;
driveInfo[drive].MaxLBA = 0;
}
base.deviceStatus = DeviceStatus.Online;
return true;
}
开发者ID:Profi-Concept,项目名称:MOSA-Project,代码行数:30,代码来源:IDEController.cs
示例18: Setup
/// <summary>
/// Setups this hardware device driver
/// </summary>
/// <returns></returns>
public override bool Setup(IHardwareResources hardwareResources)
{
this.hardwareResources = hardwareResources;
base.name = "AMDPCNet_0x" + hardwareResources.GetIOPortRegion(0).BaseIOPort.ToString("X");
ioProm1 = hardwareResources.GetIOPort(0, 0x0);
ioProm4 = hardwareResources.GetIOPort(0, 0x4);
rdp = hardwareResources.GetIOPort(0, 0x10);
rap = hardwareResources.GetIOPort(0, 0x14);
bdp = hardwareResources.GetIOPort(0, 0x1C);
initBlock = hardwareResources.GetMemory(0);
txDescriptor = hardwareResources.GetMemory(1);
rxDescriptor = hardwareResources.GetMemory(2);
buffers = hardwareResources.GetMemory(3);
bufferSize = 2048;
uint len = (ushort)(~bufferSize);
len = (len + 1) & 0x0FFF | 0x8000F000;
physicalBufferAddress = HAL.GetPhysicalAddress(buffers);
for (uint index = 0; index < 16; index++)
{
uint offset = index * 4;
rxDescriptor.Write32((offset + 1) * 4, len);
rxDescriptor.Write32((offset + 2) * 4, physicalBufferAddress + (bufferSize * index));
txDescriptor.Write32((offset + 2) * 4, physicalBufferAddress + (bufferSize * (index + 16)));
}
nextTXDesc = 0;
return true;
}
开发者ID:pacificIT,项目名称:MOSA-Project,代码行数:38,代码来源:AMDPCNetII.cs
示例19: ReleaseResources
/// <summary>
/// Releases the resources.
/// </summary>
/// <param name="hardwareResources">The hardware resources.</param>
public void ReleaseResources(IHardwareResources hardwareResources)
{
spinLock.Enter();
for (byte r = 0; r < hardwareResources.MemoryRegionCount; r++)
memoryRegions.Remove(hardwareResources.GetMemoryRegion(r));
spinLock.Exit();
}
开发者ID:rtownsend,项目名称:MOSA-Project,代码行数:13,代码来源:MemoryResources.cs
示例20: Setup
/// <summary>
/// Setups this hardware device driver
/// </summary>
/// <returns></returns>
public override bool Setup(IHardwareResources hardwareResources)
{
// Store reference to hardware resources
this.hardwareResources = hardwareResources;
// Set the driver's name
base.name = "S3Trio64V2";
// Store portmanager
byte portBar = (byte)(base.hardwareResources.IOPointRegionCount - 1);
vgaEnableController = base.hardwareResources.GetIOPort(portBar, Register.VgaEnable);
miscOutputReader = base.hardwareResources.GetIOPort(portBar, Register.MiscOutRead);
miscOutputWriter = base.hardwareResources.GetIOPort(portBar, Register.MiscOutWrite);
crtcControllerIndex = base.hardwareResources.GetIOPort(portBar, Register.CrtcIndex);
crtcControllerData = base.hardwareResources.GetIOPort(portBar, Register.CrtcData);
seqControllerIndex = base.hardwareResources.GetIOPort(portBar, Register.SequenceIndex);
seqControllerData = base.hardwareResources.GetIOPort(portBar, Register.SequenceData);
// Everything went fine
return true;
}
开发者ID:rtownsend,项目名称:MOSA-Project,代码行数:25,代码来源:S3Trio64V2.cs
注:本文中的IHardwareResources类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论