Corrected the temperature reading on NCT6779D super I/O chips. Added a default mainboard specific configuration for NCT6779D super I/O chips.
1.1 --- a/Hardware/LPC/NCT677X.cs Sun Jul 01 21:44:07 2012 +0000
1.2 +++ b/Hardware/LPC/NCT677X.cs Mon Jul 02 12:50:03 2012 +0000
1.3 @@ -46,7 +46,7 @@
1.4 Ring0.WriteIoPort(port + DATA_REGISTER_OFFSET, bank);
1.5 Ring0.WriteIoPort(port + ADDRESS_REGISTER_OFFSET, register);
1.6 Ring0.WriteIoPort(port + DATA_REGISTER_OFFSET, value);
1.7 - }
1.8 + }
1.9
1.10 // Consts
1.11 private const ushort NUVOTON_VENDOR_ID = 0x5CA3;
1.12 @@ -215,6 +215,7 @@
1.13 alternateTemperatureRegister = new ushort?[]
1.14 { null, null, null, null };
1.15 break;
1.16 +
1.17 case Chip.NCT6779D:
1.18 fans = new float?[5];
1.19 fanRpmBaseRegister = 0x4C0;
1.20 @@ -354,7 +355,13 @@
1.21 if ((temperatureSourceMask & (1 << temperaturesSource[i])) > 0)
1.22 continue;
1.23
1.24 - temperatures[i] = ReadByte(alternateTemperatureRegister[i].Value);
1.25 + float? temperature = (sbyte)
1.26 + ReadByte(alternateTemperatureRegister[i].Value);
1.27 +
1.28 + if (temperature > 125 || temperature < -55)
1.29 + temperature = null;
1.30 +
1.31 + temperatures[i] = temperature;
1.32 }
1.33
1.34 for (int i = 0; i < fans.Length; i++) {
2.1 --- a/Hardware/Mainboard/SuperIOHardware.cs Sun Jul 01 21:44:07 2012 +0000
2.2 +++ b/Hardware/Mainboard/SuperIOHardware.cs Mon Jul 02 12:50:03 2012 +0000
2.3 @@ -941,6 +941,34 @@
2.4 break;
2.5 }
2.6 break;
2.7 + case Chip.NCT6779D:
2.8 + v.Add(new Voltage("CPU VCore", 0));
2.9 + v.Add(new Voltage("Voltage #2", 1, true));
2.10 + v.Add(new Voltage("AVCC", 2, 34, 34));
2.11 + v.Add(new Voltage("3VCC", 3, 34, 34));
2.12 + v.Add(new Voltage("Voltage #5", 4, true));
2.13 + v.Add(new Voltage("Voltage #6", 5, true));
2.14 + v.Add(new Voltage("Voltage #7", 6, true));
2.15 + v.Add(new Voltage("3VSB", 7, 34, 34));
2.16 + v.Add(new Voltage("VBAT", 8, 34, 34));
2.17 + v.Add(new Voltage("VTT", 9));
2.18 + v.Add(new Voltage("Voltage #11", 10, true));
2.19 + v.Add(new Voltage("Voltage #12", 11, true));
2.20 + v.Add(new Voltage("Voltage #13", 12, true));
2.21 + v.Add(new Voltage("Voltage #14", 13, true));
2.22 + v.Add(new Voltage("Voltage #15", 14, true));
2.23 + t.Add(new Temperature("CPU Core", 0));
2.24 + t.Add(new Temperature("Temperature #1", 1));
2.25 + t.Add(new Temperature("Temperature #2", 2));
2.26 + t.Add(new Temperature("Temperature #3", 3));
2.27 + t.Add(new Temperature("Temperature #4", 4));
2.28 + t.Add(new Temperature("Temperature #5", 5));
2.29 + t.Add(new Temperature("Temperature #6", 6));
2.30 + for (int i = 0; i < superIO.Fans.Length; i++)
2.31 + f.Add(new Fan("Fan #" + (i + 1), i));
2.32 + for (int i = 0; i < superIO.Controls.Length; i++)
2.33 + c.Add(new Ctrl("Fan Control #" + (i + 1), i));
2.34 + break;
2.35 default:
2.36 for (int i = 0; i < superIO.Voltages.Length; i++)
2.37 v.Add(new Voltage("Voltage #" + (i + 1), i, true));