1.1 --- a/Hardware/LPC/LPCIO.cs Mon Oct 18 07:18:14 2010 +0000
1.2 +++ b/Hardware/LPC/LPCIO.cs Sun Oct 31 22:08:47 2010 +0000
1.3 @@ -62,8 +62,8 @@
1.4 private const byte BASE_ADDRESS_REGISTER = 0x60;
1.5
1.6 private byte ReadByte(byte register) {
1.7 - WinRing0.WriteIoPortByte(registerPort, register);
1.8 - return WinRing0.ReadIoPortByte(valuePort);
1.9 + Ring0.WriteIoPort(registerPort, register);
1.10 + return Ring0.ReadIoPort(valuePort);
1.11 }
1.12
1.13 private ushort ReadWord(byte register) {
1.14 @@ -72,8 +72,8 @@
1.15 }
1.16
1.17 private void Select(byte logicalDeviceNumber) {
1.18 - WinRing0.WriteIoPortByte(registerPort, DEVCIE_SELECT_REGISTER);
1.19 - WinRing0.WriteIoPortByte(valuePort, logicalDeviceNumber);
1.20 + Ring0.WriteIoPort(registerPort, DEVCIE_SELECT_REGISTER);
1.21 + Ring0.WriteIoPort(valuePort, logicalDeviceNumber);
1.22 }
1.23
1.24 private void ReportUnknownChip(string type, int chip) {
1.25 @@ -99,12 +99,12 @@
1.26 private const byte FINTEK_HARDWARE_MONITOR_LDN = 0x04;
1.27
1.28 private void WinbondFintekEnter() {
1.29 - WinRing0.WriteIoPortByte(registerPort, 0x87);
1.30 - WinRing0.WriteIoPortByte(registerPort, 0x87);
1.31 + Ring0.WriteIoPort(registerPort, 0x87);
1.32 + Ring0.WriteIoPort(registerPort, 0x87);
1.33 }
1.34
1.35 private void WinbondFintekExit() {
1.36 - WinRing0.WriteIoPortByte(registerPort, 0xAA);
1.37 + Ring0.WriteIoPort(registerPort, 0xAA);
1.38 }
1.39
1.40 private bool DetectWinbondFintek() {
1.41 @@ -308,15 +308,15 @@
1.42 private const byte IT87_CHIP_VERSION_REGISTER = 0x22;
1.43
1.44 private void IT87Enter() {
1.45 - WinRing0.WriteIoPortByte(registerPort, 0x87);
1.46 - WinRing0.WriteIoPortByte(registerPort, 0x01);
1.47 - WinRing0.WriteIoPortByte(registerPort, 0x55);
1.48 - WinRing0.WriteIoPortByte(registerPort, 0x55);
1.49 + Ring0.WriteIoPort(registerPort, 0x87);
1.50 + Ring0.WriteIoPort(registerPort, 0x01);
1.51 + Ring0.WriteIoPort(registerPort, 0x55);
1.52 + Ring0.WriteIoPort(registerPort, 0x55);
1.53 }
1.54
1.55 private void IT87Exit() {
1.56 - WinRing0.WriteIoPortByte(registerPort, CONFIGURATION_CONTROL_REGISTER);
1.57 - WinRing0.WriteIoPortByte(valuePort, 0x02);
1.58 + Ring0.WriteIoPort(registerPort, CONFIGURATION_CONTROL_REGISTER);
1.59 + Ring0.WriteIoPort(valuePort, 0x02);
1.60 }
1.61
1.62 private bool DetectIT87() {
1.63 @@ -392,11 +392,11 @@
1.64 #region SMSC
1.65
1.66 private void SMSCEnter() {
1.67 - WinRing0.WriteIoPortByte(registerPort, 0x55);
1.68 + Ring0.WriteIoPort(registerPort, 0x55);
1.69 }
1.70
1.71 private void SMSCExit() {
1.72 - WinRing0.WriteIoPortByte(registerPort, 0xAA);
1.73 + Ring0.WriteIoPort(registerPort, 0xAA);
1.74 }
1.75
1.76 private bool DetectSMSC() {
1.77 @@ -438,15 +438,15 @@
1.78 }
1.79
1.80 public LPCIO() {
1.81 - if (!WinRing0.IsAvailable)
1.82 + if (!Ring0.IsOpen)
1.83 return;
1.84
1.85 - if (!WinRing0.WaitIsaBusMutex(100))
1.86 + if (!Ring0.WaitIsaBusMutex(100))
1.87 return;
1.88
1.89 Detect();
1.90
1.91 - WinRing0.ReleaseIsaBusMutex();
1.92 + Ring0.ReleaseIsaBusMutex();
1.93 }
1.94
1.95 public ISuperIO[] SuperIO {