1.1 --- a/Hardware/LPC/LPCIO.cs Sun Jun 27 20:49:29 2010 +0000
1.2 +++ b/Hardware/LPC/LPCIO.cs Mon Jun 28 20:39:49 2010 +0000
1.3 @@ -78,7 +78,8 @@
1.4 }
1.5
1.6 // ITE
1.7 - private const byte IT87_ENVIRONMENT_CONTROLLER_LDN = 0x04;
1.8 + private const byte IT87_ENVIRONMENT_CONTROLLER_LDN = 0x04;
1.9 + private const byte IT87_CHIP_VERSION_REGISTER = 0x22;
1.10
1.11 private void IT87Enter() {
1.12 WinRing0.WriteIoPortByte(registerPort, 0x87);
1.13 @@ -332,12 +333,14 @@
1.14 report.AppendLine(chipID.ToString("X"));
1.15 report.AppendLine();
1.16 }
1.17 - } else {
1.18 + } else {
1.19 Select(IT87_ENVIRONMENT_CONTROLLER_LDN);
1.20 ushort address = ReadWord(BASE_ADDRESS_REGISTER);
1.21 Thread.Sleep(1);
1.22 ushort verify = ReadWord(BASE_ADDRESS_REGISTER);
1.23
1.24 + byte version = (byte)(ReadByte(IT87_CHIP_VERSION_REGISTER) & 0x0F);
1.25 +
1.26 IT87Exit();
1.27
1.28 if (address != verify || address < 0x100 || (address & 0xF007) != 0) {
1.29 @@ -349,7 +352,7 @@
1.30 return;
1.31 }
1.32
1.33 - superIOs.Add(new IT87XX(chip, address));
1.34 + superIOs.Add(new IT87XX(chip, address, version));
1.35
1.36 return;
1.37 }