Fixed Issue 97.
authormoel.mich
Tue, 17 Aug 2010 21:44:02 +0000
changeset 17031858ba46e9c
parent 169 3b2bcba8c02d
child 171 81ab5e53122e
Fixed Issue 97.
Hardware/LPC/Chip.cs
Hardware/LPC/IT87XX.cs
Hardware/LPC/LPCIO.cs
Hardware/Mainboard/SuperIOHardware.cs
     1.1 --- a/Hardware/LPC/Chip.cs	Tue Aug 17 20:25:27 2010 +0000
     1.2 +++ b/Hardware/LPC/Chip.cs	Tue Aug 17 21:44:02 2010 +0000
     1.3 @@ -11,6 +11,7 @@
     1.4      IT8716F = 0x8716,
     1.5      IT8718F = 0x8718,
     1.6      IT8720F = 0x8720,
     1.7 +    IT8721F = 0x8721,
     1.8      IT8726F = 0x8726,
     1.9      W83627DHG = 0xA020,
    1.10      W83627DHGP = 0xB070,
    1.11 @@ -43,6 +44,7 @@
    1.12          case Chip.IT8712F: return "ITE IT8712F";
    1.13          case Chip.IT8716F: return "ITE IT8716F";
    1.14          case Chip.IT8718F: return "ITE IT8718F";
    1.15 +        case Chip.IT8721F: return "ITE IT8721F";
    1.16          case Chip.IT8720F: return "ITE IT8720F";
    1.17          case Chip.IT8726F: return "ITE IT8726F";
    1.18          case Chip.W83627DHG: return "Winbond W83627DHG";
     2.1 --- a/Hardware/LPC/IT87XX.cs	Tue Aug 17 20:25:27 2010 +0000
     2.2 +++ b/Hardware/LPC/IT87XX.cs	Tue Aug 17 21:44:02 2010 +0000
     2.3 @@ -53,6 +53,8 @@
     2.4      private float?[] voltages = new float?[0];
     2.5      private float?[] temperatures = new float?[0];
     2.6      private float?[] fans = new float?[0];
     2.7 +
     2.8 +    private readonly float voltageGain;
     2.9     
    2.10      // Consts
    2.11      private const byte ITE_VENDOR_ID = 0x90;
    2.12 @@ -102,6 +104,13 @@
    2.13        voltages = new float?[9];
    2.14        temperatures = new float?[3];
    2.15        fans = new float?[5];
    2.16 +
    2.17 +      // The IT8721F uses a 12mV resultion ADC, all others 16mV
    2.18 +      if (chip == Chip.IT8721F) {
    2.19 +        voltageGain = 0.012f;
    2.20 +      } else {
    2.21 +        voltageGain = 0.016f;
    2.22 +      }
    2.23      }
    2.24  
    2.25      public Chip Chip { get { return chip; } }
    2.26 @@ -156,8 +165,10 @@
    2.27  
    2.28        for (int i = 0; i < voltages.Length; i++) {
    2.29          bool valid;
    2.30 -        float value = 0.001f * ((int)ReadByte(
    2.31 -          (byte)(VOLTAGE_BASE_REG + i), out valid) << 4);
    2.32 +        
    2.33 +        float value = 
    2.34 +          voltageGain * ReadByte((byte)(VOLTAGE_BASE_REG + i), out valid);   
    2.35 +
    2.36          if (!valid)
    2.37            continue;
    2.38          if (value > 0)
     3.1 --- a/Hardware/LPC/LPCIO.cs	Tue Aug 17 20:25:27 2010 +0000
     3.2 +++ b/Hardware/LPC/LPCIO.cs	Tue Aug 17 21:44:02 2010 +0000
     3.3 @@ -334,6 +334,7 @@
     3.4          case 0x8716: chip = Chip.IT8716F; break;
     3.5          case 0x8718: chip = Chip.IT8718F; break;
     3.6          case 0x8720: chip = Chip.IT8720F; break;
     3.7 +        case 0x8721: chip = Chip.IT8721F; break;
     3.8          case 0x8726: chip = Chip.IT8726F; break;
     3.9          default: chip = Chip.Unknown; break;
    3.10        }
     4.1 --- a/Hardware/Mainboard/SuperIOHardware.cs	Tue Aug 17 20:25:27 2010 +0000
     4.2 +++ b/Hardware/Mainboard/SuperIOHardware.cs	Tue Aug 17 21:44:02 2010 +0000
     4.3 @@ -65,7 +65,7 @@
     4.4          case Chip.IT8712F:
     4.5          case Chip.IT8716F:
     4.6          case Chip.IT8718F:
     4.7 -        case Chip.IT8720F:
     4.8 +        case Chip.IT8720F:        
     4.9          case Chip.IT8726F:
    4.10            switch (manufacturer) {
    4.11              case Manufacturer.ASUS:
    4.12 @@ -319,6 +319,22 @@
    4.13                break;
    4.14            }
    4.15            break;
    4.16 +
    4.17 +        case Chip.IT8721F:
    4.18 +          v.Add(new Voltage("Voltage #1", 0, true));
    4.19 +          v.Add(new Voltage("Voltage #2", 1, true));
    4.20 +          v.Add(new Voltage("Voltage #3", 2, true));
    4.21 +          v.Add(new Voltage("Analog +3.3V", 3, 10, 10, 0, true));
    4.22 +          v.Add(new Voltage("Voltage #5", 4, true));
    4.23 +          v.Add(new Voltage("Voltage #6", 5, true));
    4.24 +          v.Add(new Voltage("Voltage #7", 6, true));
    4.25 +          v.Add(new Voltage("Standby +3.3V", 7, 10, 10, 0, true));
    4.26 +          v.Add(new Voltage("VBat", 8, 10, 10, 0));
    4.27 +          for (int i = 0; i < superIO.Temperatures.Length; i++)
    4.28 +            t.Add(new Temperature("Temperature #" + (i + 1), i));
    4.29 +          for (int i = 0; i < superIO.Fans.Length; i++)
    4.30 +            f.Add(new Fan("Fan #" + (i + 1), i));
    4.31 +          break;
    4.32            
    4.33          case Chip.F71858:
    4.34            v.Add(new Voltage("VCC3V", 0, 150, 150, 0));