Added the ITE chip version to the report.
1.1 --- a/Hardware/LPC/IT87XX.cs Sun Jun 27 20:49:29 2010 +0000
1.2 +++ b/Hardware/LPC/IT87XX.cs Mon Jun 28 20:39:49 2010 +0000
1.3 @@ -45,6 +45,7 @@
1.4
1.5 private ushort address;
1.6 private Chip chip;
1.7 + private byte version;
1.8
1.9 private readonly ushort addressReg;
1.10 private readonly ushort dataReg;
1.11 @@ -78,10 +79,11 @@
1.12 return value;
1.13 }
1.14
1.15 - public IT87XX(Chip chip, ushort address) {
1.16 + public IT87XX(Chip chip, ushort address, byte version) {
1.17
1.18 this.address = address;
1.19 this.chip = chip;
1.20 + this.version = version;
1.21 this.addressReg = (ushort)(address + ADDRESS_REGISTER_OFFSET);
1.22 this.dataReg = (ushort)(address + DATA_REGISTER_OFFSET);
1.23
1.24 @@ -113,6 +115,7 @@
1.25 r.AppendLine("LPC " + this.GetType().Name);
1.26 r.AppendLine();
1.27 r.Append("Chip ID: 0x"); r.AppendLine(chip.ToString("X"));
1.28 + r.Append("Chip Version: 0x"); r.AppendLine(version.ToString("X"));
1.29 r.Append("Base Address: 0x"); r.AppendLine(address.ToString("X4"));
1.30 r.AppendLine();
1.31 r.AppendLine("Environment Controller Registers");
2.1 --- a/Hardware/LPC/LPCIO.cs Sun Jun 27 20:49:29 2010 +0000
2.2 +++ b/Hardware/LPC/LPCIO.cs Mon Jun 28 20:39:49 2010 +0000
2.3 @@ -78,7 +78,8 @@
2.4 }
2.5
2.6 // ITE
2.7 - private const byte IT87_ENVIRONMENT_CONTROLLER_LDN = 0x04;
2.8 + private const byte IT87_ENVIRONMENT_CONTROLLER_LDN = 0x04;
2.9 + private const byte IT87_CHIP_VERSION_REGISTER = 0x22;
2.10
2.11 private void IT87Enter() {
2.12 WinRing0.WriteIoPortByte(registerPort, 0x87);
2.13 @@ -332,12 +333,14 @@
2.14 report.AppendLine(chipID.ToString("X"));
2.15 report.AppendLine();
2.16 }
2.17 - } else {
2.18 + } else {
2.19 Select(IT87_ENVIRONMENT_CONTROLLER_LDN);
2.20 ushort address = ReadWord(BASE_ADDRESS_REGISTER);
2.21 Thread.Sleep(1);
2.22 ushort verify = ReadWord(BASE_ADDRESS_REGISTER);
2.23
2.24 + byte version = (byte)(ReadByte(IT87_CHIP_VERSION_REGISTER) & 0x0F);
2.25 +
2.26 IT87Exit();
2.27
2.28 if (address != verify || address < 0x100 || (address & 0xF007) != 0) {
2.29 @@ -349,7 +352,7 @@
2.30 return;
2.31 }
2.32
2.33 - superIOs.Add(new IT87XX(chip, address));
2.34 + superIOs.Add(new IT87XX(chip, address, version));
2.35
2.36 return;
2.37 }