moel@135: /* moel@130: moel@344: This Source Code Form is subject to the terms of the Mozilla Public moel@344: License, v. 2.0. If a copy of the MPL was not distributed with this moel@344: file, You can obtain one at http://mozilla.org/MPL/2.0/. moel@130: moel@344: Copyright (C) 2009-2012 Michael Möller moel@344: moel@130: */ moel@130: moel@228: using System; moel@130: using System.Collections.Generic; moel@166: using System.Globalization; moel@228: using System.Threading; moel@130: using OpenHardwareMonitor.Hardware.LPC; moel@130: moel@130: namespace OpenHardwareMonitor.Hardware.Mainboard { moel@165: internal class SuperIOHardware : Hardware { moel@130: moel@195: private readonly Mainboard mainboard; moel@195: private readonly ISuperIO superIO; moel@130: moel@195: private readonly List voltages = new List(); moel@195: private readonly List temperatures = new List(); moel@195: private readonly List fans = new List(); moel@323: private readonly List controls = new List(); moel@167: moel@228: private delegate float? ReadValueDelegate(int index); moel@228: private delegate void UpdateDelegate(); moel@228: moel@228: // delegates for mainboard specific sensor reading code moel@228: private readonly ReadValueDelegate readVoltage; moel@228: private readonly ReadValueDelegate readTemperature; moel@228: private readonly ReadValueDelegate readFan; moel@323: private readonly ReadValueDelegate readControl; moel@228: moel@228: // delegate for post update mainboard specific code moel@228: private readonly UpdateDelegate postUpdate; moel@228: moel@228: // mainboard specific mutex moel@228: private readonly Mutex mutex; moel@228: moel@176: public SuperIOHardware(Mainboard mainboard, ISuperIO superIO, moel@176: Manufacturer manufacturer, Model model, ISettings settings) moel@275: : base(ChipName.GetName(superIO.Chip), new Identifier("lpc", moel@275: superIO.Chip.ToString().ToLower(CultureInfo.InvariantCulture)), moel@275: settings) moel@130: { moel@176: this.mainboard = mainboard; moel@130: this.superIO = superIO; moel@130: moel@228: this.readVoltage = (index) => superIO.Voltages[index]; moel@228: this.readTemperature = (index) => superIO.Temperatures[index]; moel@228: this.readFan = (index) => superIO.Fans[index]; moel@323: this.readControl = (index) => superIO.Controls[index]; moel@228: moel@228: this.postUpdate = () => { }; moel@228: moel@130: List v = new List(); moel@130: List t = new List(); moel@130: List f = new List(); moel@323: List c = new List(); moel@130: moel@130: switch (superIO.Chip) { moel@353: case Chip.IT8705F: moel@130: case Chip.IT8712F: moel@130: case Chip.IT8716F: moel@130: case Chip.IT8718F: moel@177: case Chip.IT8720F: moel@319: case Chip.IT8726F: moel@130: switch (manufacturer) { moel@133: case Manufacturer.ASUS: moel@133: switch (model) { moel@168: case Model.Crosshair_III_Formula: // IT8720F moel@133: v.Add(new Voltage("VBat", 8)); moel@133: t.Add(new Temperature("CPU", 0)); moel@133: for (int i = 0; i < superIO.Fans.Length; i++) moel@133: f.Add(new Fan("Fan #" + (i + 1), i)); moel@133: break; moel@144: case Model.M2N_SLI_DELUXE: moel@133: v.Add(new Voltage("CPU VCore", 0)); moel@133: v.Add(new Voltage("+3.3V", 1)); moel@195: v.Add(new Voltage("+5V", 3, 6.8f, 10)); moel@195: v.Add(new Voltage("+12V", 4, 30, 10)); moel@195: v.Add(new Voltage("+5VSB", 7, 6.8f, 10)); moel@133: v.Add(new Voltage("VBat", 8)); moel@133: t.Add(new Temperature("CPU", 0)); moel@133: t.Add(new Temperature("Motherboard", 1)); moel@133: f.Add(new Fan("CPU Fan", 0)); moel@133: f.Add(new Fan("Chassis Fan #1", 1)); moel@133: f.Add(new Fan("Power Fan", 2)); moel@133: break; moel@168: case Model.M4A79XTD_EVO: // IT8720F moel@195: v.Add(new Voltage("+5V", 3, 6.8f, 10)); moel@144: v.Add(new Voltage("VBat", 8)); moel@144: t.Add(new Temperature("CPU", 0)); moel@144: t.Add(new Temperature("Motherboard", 1)); moel@144: f.Add(new Fan("CPU Fan", 0)); moel@144: f.Add(new Fan("Chassis Fan #1", 1)); moel@144: f.Add(new Fan("Chassis Fan #2", 2)); moel@144: break; moel@133: default: moel@133: v.Add(new Voltage("CPU VCore", 0)); moel@133: v.Add(new Voltage("Voltage #2", 1, true)); moel@133: v.Add(new Voltage("Voltage #3", 2, true)); moel@133: v.Add(new Voltage("Voltage #4", 3, true)); moel@133: v.Add(new Voltage("Voltage #5", 4, true)); moel@133: v.Add(new Voltage("Voltage #6", 5, true)); moel@133: v.Add(new Voltage("Voltage #7", 6, true)); moel@133: v.Add(new Voltage("Voltage #8", 7, true)); moel@133: v.Add(new Voltage("VBat", 8)); moel@133: for (int i = 0; i < superIO.Temperatures.Length; i++) moel@133: t.Add(new Temperature("Temperature #" + (i + 1), i)); moel@133: for (int i = 0; i < superIO.Fans.Length; i++) moel@133: f.Add(new Fan("Fan #" + (i + 1), i)); moel@133: break; moel@133: } moel@133: break; moel@221: moel@221: case Manufacturer.ASRock: moel@221: switch (model) { moel@221: case Model.P55_Deluxe: // IT8720F moel@228: moel@221: v.Add(new Voltage("CPU VCore", 0)); moel@221: v.Add(new Voltage("+3.3V", 2)); moel@221: v.Add(new Voltage("+12V", 4, 30, 10)); moel@221: v.Add(new Voltage("+5V", 5, 6.8f, 10)); moel@221: v.Add(new Voltage("VBat", 8)); moel@221: t.Add(new Temperature("CPU", 0)); moel@221: t.Add(new Temperature("Motherboard", 1)); moel@221: f.Add(new Fan("CPU Fan", 0)); moel@221: f.Add(new Fan("Chassis Fan #1", 1)); moel@228: moel@228: // this mutex is also used by the official ASRock tool moel@228: mutex = new Mutex(false, "ASRockOCMark"); moel@228: moel@228: bool exclusiveAccess = false; moel@228: try { moel@228: exclusiveAccess = mutex.WaitOne(10, false); moel@228: } catch (AbandonedMutexException) { } moel@228: catch (InvalidOperationException) { } moel@228: moel@228: // only read additional fans if we get exclusive access moel@228: if (exclusiveAccess) { moel@228: moel@228: f.Add(new Fan("Chassis Fan #2", 2)); moel@228: f.Add(new Fan("Chassis Fan #3", 3)); moel@228: f.Add(new Fan("Power Fan", 4)); moel@228: moel@228: readFan = (index) => { moel@228: if (index < 2) { moel@228: return superIO.Fans[index]; moel@228: } else { moel@228: // get GPIO 80-87 moel@228: byte? gpio = superIO.ReadGPIO(7); moel@228: if (!gpio.HasValue) moel@228: return null; moel@228: moel@228: // read the last 3 fans based on GPIO 83-85 moel@228: int[] masks = { 0x05, 0x03, 0x06 }; moel@228: return (((gpio.Value >> 3) & 0x07) == moel@228: masks[index - 2]) ? superIO.Fans[2] : null; moel@228: } moel@228: }; moel@228: moel@228: int fanIndex = 0; moel@228: postUpdate = () => { moel@228: // get GPIO 80-87 moel@228: byte? gpio = superIO.ReadGPIO(7); moel@228: if (!gpio.HasValue) moel@228: return; moel@228: moel@228: // prepare the GPIO 83-85 for the next update moel@228: int[] masks = { 0x05, 0x03, 0x06 }; moel@228: superIO.WriteGPIO(7, moel@228: (byte)((gpio.Value & 0xC7) | (masks[fanIndex] << 3))); moel@228: fanIndex = (fanIndex + 1) % 3; moel@228: }; moel@228: } moel@228: moel@221: break; moel@221: default: moel@221: v.Add(new Voltage("CPU VCore", 0)); moel@221: v.Add(new Voltage("Voltage #2", 1, true)); moel@221: v.Add(new Voltage("Voltage #3", 2, true)); moel@221: v.Add(new Voltage("Voltage #4", 3, true)); moel@221: v.Add(new Voltage("Voltage #5", 4, true)); moel@221: v.Add(new Voltage("Voltage #6", 5, true)); moel@221: v.Add(new Voltage("Voltage #7", 6, true)); moel@221: v.Add(new Voltage("Voltage #8", 7, true)); moel@221: v.Add(new Voltage("VBat", 8)); moel@221: for (int i = 0; i < superIO.Temperatures.Length; i++) moel@221: t.Add(new Temperature("Temperature #" + (i + 1), i)); moel@221: for (int i = 0; i < superIO.Fans.Length; i++) moel@221: f.Add(new Fan("Fan #" + (i + 1), i)); moel@221: break; moel@221: }; moel@221: break; moel@221: moel@130: case Manufacturer.DFI: moel@130: switch (model) { moel@168: case Model.LP_BI_P45_T2RS_Elite: // IT8718F moel@130: v.Add(new Voltage("CPU VCore", 0)); moel@130: v.Add(new Voltage("FSB VTT", 1)); moel@130: v.Add(new Voltage("+3.3V", 2)); moel@195: v.Add(new Voltage("+5V", 3, 6.8f, 10)); moel@195: v.Add(new Voltage("+12V", 4, 30, 10)); moel@130: v.Add(new Voltage("NB Core", 5)); moel@130: v.Add(new Voltage("VDIMM", 6)); moel@195: v.Add(new Voltage("+5VSB", 7, 6.8f, 10)); moel@130: v.Add(new Voltage("VBat", 8)); moel@130: t.Add(new Temperature("CPU", 0)); moel@130: t.Add(new Temperature("System", 1)); moel@130: t.Add(new Temperature("Chipset", 2)); moel@130: f.Add(new Fan("Fan #1", 0)); moel@130: f.Add(new Fan("Fan #2", 1)); moel@130: f.Add(new Fan("Fan #3", 2)); moel@130: break; moel@168: case Model.LP_DK_P55_T3eH9: // IT8720F moel@130: v.Add(new Voltage("CPU VCore", 0)); moel@130: v.Add(new Voltage("VTT", 1)); moel@130: v.Add(new Voltage("+3.3V", 2)); moel@195: v.Add(new Voltage("+5V", 3, 6.8f, 10)); moel@195: v.Add(new Voltage("+12V", 4, 30, 10)); moel@130: v.Add(new Voltage("CPU PLL", 5)); moel@130: v.Add(new Voltage("DRAM", 6)); moel@195: v.Add(new Voltage("+5VSB", 7, 6.8f, 10)); moel@130: v.Add(new Voltage("VBat", 8)); moel@130: t.Add(new Temperature("Chipset", 0)); moel@130: t.Add(new Temperature("CPU PWM", 1)); moel@130: t.Add(new Temperature("CPU", 2)); moel@130: f.Add(new Fan("Fan #1", 0)); moel@130: f.Add(new Fan("Fan #2", 1)); moel@130: f.Add(new Fan("Fan #3", 2)); moel@130: break; moel@130: default: moel@130: v.Add(new Voltage("CPU VCore", 0)); moel@130: v.Add(new Voltage("VTT", 1, true)); moel@130: v.Add(new Voltage("+3.3V", 2, true)); moel@130: v.Add(new Voltage("+5V", 3, 6.8f, 10, 0, true)); moel@130: v.Add(new Voltage("+12V", 4, 30, 10, 0, true)); moel@130: v.Add(new Voltage("Voltage #6", 5, true)); moel@130: v.Add(new Voltage("DRAM", 6, true)); moel@130: v.Add(new Voltage("+5VSB", 7, 6.8f, 10, 0, true)); moel@130: v.Add(new Voltage("VBat", 8)); moel@130: for (int i = 0; i < superIO.Temperatures.Length; i++) moel@130: t.Add(new Temperature("Temperature #" + (i + 1), i)); moel@130: for (int i = 0; i < superIO.Fans.Length; i++) moel@130: f.Add(new Fan("Fan #" + (i + 1), i)); moel@130: break; moel@130: } moel@130: break; moel@130: moel@130: case Manufacturer.Gigabyte: moel@130: switch (model) { moel@168: case Model._965P_S3: // IT8718F moel@130: v.Add(new Voltage("CPU VCore", 0)); moel@130: v.Add(new Voltage("DRAM", 1)); moel@130: v.Add(new Voltage("+3.3V", 2)); moel@195: v.Add(new Voltage("+5V", 3, 6.8f, 10)); moel@357: v.Add(new Voltage("+12V", 7, 24.3f, 8.2f)); moel@130: v.Add(new Voltage("VBat", 8)); moel@130: t.Add(new Temperature("System", 0)); moel@130: t.Add(new Temperature("CPU", 1)); moel@130: f.Add(new Fan("CPU Fan", 0)); moel@130: f.Add(new Fan("System Fan", 1)); moel@130: break; moel@168: case Model.EP45_DS3R: // IT8718F moel@130: case Model.EP45_UD3R: moel@138: case Model.X38_DS5: moel@130: v.Add(new Voltage("CPU VCore", 0)); moel@130: v.Add(new Voltage("DRAM", 1)); moel@130: v.Add(new Voltage("+3.3V", 2)); moel@195: v.Add(new Voltage("+5V", 3, 6.8f, 10)); moel@357: v.Add(new Voltage("+12V", 7, 24.3f, 8.2f)); moel@130: v.Add(new Voltage("VBat", 8)); moel@130: t.Add(new Temperature("System", 0)); moel@130: t.Add(new Temperature("CPU", 1)); moel@130: f.Add(new Fan("CPU Fan", 0)); moel@130: f.Add(new Fan("System Fan #2", 1)); moel@130: f.Add(new Fan("Power Fan", 2)); moel@130: f.Add(new Fan("System Fan #1", 3)); moel@130: break; moel@357: case Model.EX58_EXTREME: // IT8720F moel@133: v.Add(new Voltage("CPU VCore", 0)); moel@133: v.Add(new Voltage("DRAM", 1)); moel@195: v.Add(new Voltage("+5V", 3, 6.8f, 10)); moel@133: v.Add(new Voltage("VBat", 8)); moel@133: t.Add(new Temperature("System", 0)); moel@133: t.Add(new Temperature("CPU", 1)); moel@138: t.Add(new Temperature("Northbridge", 2)); moel@133: f.Add(new Fan("CPU Fan", 0)); moel@133: f.Add(new Fan("System Fan #2", 1)); moel@133: f.Add(new Fan("Power Fan", 2)); moel@133: f.Add(new Fan("System Fan #1", 3)); moel@133: break; moel@168: case Model.P35_DS3: // IT8718F moel@168: case Model.P35_DS3L: // IT8718F moel@130: v.Add(new Voltage("CPU VCore", 0)); moel@130: v.Add(new Voltage("DRAM", 1)); moel@130: v.Add(new Voltage("+3.3V", 2)); moel@195: v.Add(new Voltage("+5V", 3, 6.8f, 10)); moel@357: v.Add(new Voltage("+12V", 7, 24.3f, 8.2f)); moel@130: v.Add(new Voltage("VBat", 8)); moel@130: t.Add(new Temperature("System", 0)); moel@130: t.Add(new Temperature("CPU", 1)); moel@130: f.Add(new Fan("CPU Fan", 0)); moel@130: f.Add(new Fan("System Fan #1", 1)); moel@130: f.Add(new Fan("System Fan #2", 2)); moel@130: f.Add(new Fan("Power Fan", 3)); moel@130: break; moel@168: case Model.P55_UD4: // IT8720F moel@357: case Model.P55A_UD3: // IT8720F moel@357: case Model.P55M_UD4: // IT8720F moel@357: case Model.H55_USB3: // IT8720F moel@357: case Model.EX58_UD3R: // IT8720F moel@148: v.Add(new Voltage("CPU VCore", 0)); moel@148: v.Add(new Voltage("DRAM", 1)); moel@148: v.Add(new Voltage("+3.3V", 2)); moel@195: v.Add(new Voltage("+5V", 3, 6.8f, 10)); moel@357: v.Add(new Voltage("+12V", 5, 24.3f, 8.2f)); moel@148: v.Add(new Voltage("VBat", 8)); moel@148: t.Add(new Temperature("System", 0)); moel@148: t.Add(new Temperature("CPU", 2)); moel@148: f.Add(new Fan("CPU Fan", 0)); moel@148: f.Add(new Fan("System Fan #2", 1)); moel@148: f.Add(new Fan("Power Fan", 2)); moel@148: f.Add(new Fan("System Fan #1", 3)); moel@148: break; moel@357: case Model.H55N_USB3: // IT8720F moel@154: v.Add(new Voltage("CPU VCore", 0)); moel@154: v.Add(new Voltage("DRAM", 1)); moel@154: v.Add(new Voltage("+3.3V", 2)); moel@195: v.Add(new Voltage("+5V", 3, 6.8f, 10)); moel@357: v.Add(new Voltage("+12V", 5, 24.3f, 8.2f)); moel@357: v.Add(new Voltage("VBat", 8)); moel@357: t.Add(new Temperature("System", 0)); moel@357: t.Add(new Temperature("CPU", 2)); moel@357: f.Add(new Fan("CPU Fan", 0)); moel@357: f.Add(new Fan("System Fan", 1)); moel@357: break; moel@357: case Model.G41M_Combo: // IT8718F moel@357: case Model.G41MT_S2: // IT8718F moel@357: case Model.G41MT_S2P: // IT8718F moel@357: v.Add(new Voltage("CPU VCore", 0)); moel@357: v.Add(new Voltage("DRAM", 1)); moel@357: v.Add(new Voltage("+3.3V", 2)); moel@357: v.Add(new Voltage("+5V", 3, 6.8f, 10)); moel@357: v.Add(new Voltage("+12V", 7, 24.3f, 8.2f)); moel@357: v.Add(new Voltage("VBat", 8)); moel@357: t.Add(new Temperature("CPU", 2)); moel@357: f.Add(new Fan("CPU Fan", 0)); moel@357: f.Add(new Fan("System Fan", 1)); moel@357: break; moel@357: case Model.GA_MA770T_UD3: // IT8720F moel@359: case Model.GA_MA770T_UD3P: // IT8720F moel@357: case Model.GA_MA790X_UD3P: // IT8720F moel@357: v.Add(new Voltage("CPU VCore", 0)); moel@357: v.Add(new Voltage("DRAM", 1)); moel@357: v.Add(new Voltage("+3.3V", 2)); moel@357: v.Add(new Voltage("+5V", 3, 6.8f, 10)); moel@357: v.Add(new Voltage("+12V", 4, 24.3f, 8.2f)); moel@154: v.Add(new Voltage("VBat", 8)); moel@154: t.Add(new Temperature("System", 0)); moel@154: t.Add(new Temperature("CPU", 1)); moel@154: f.Add(new Fan("CPU Fan", 0)); moel@154: f.Add(new Fan("System Fan #1", 1)); moel@154: f.Add(new Fan("System Fan #2", 2)); moel@154: f.Add(new Fan("Power Fan", 3)); moel@154: break; moel@359: case Model.GA_MA78LM_S2H: // IT8718F moel@359: v.Add(new Voltage("CPU VCore", 0)); moel@359: v.Add(new Voltage("DRAM", 1)); moel@359: v.Add(new Voltage("+3.3V", 2)); moel@359: v.Add(new Voltage("+5V", 3, 6.8f, 10)); moel@359: v.Add(new Voltage("+12V", 4, 24.3f, 8.2f)); moel@359: v.Add(new Voltage("VBat", 8)); moel@359: t.Add(new Temperature("System", 0)); moel@359: t.Add(new Temperature("CPU", 1)); moel@359: t.Add(new Temperature("VRM", 2)); moel@359: f.Add(new Fan("CPU Fan", 0)); moel@359: f.Add(new Fan("System Fan #1", 1)); moel@359: f.Add(new Fan("System Fan #2", 2)); moel@359: f.Add(new Fan("Power Fan", 3)); moel@359: break; moel@357: case Model.GA_MA785GM_US2H: // IT8718F moel@168: case Model.GA_MA785GMT_UD2H: // IT8718F moel@130: v.Add(new Voltage("CPU VCore", 0)); moel@130: v.Add(new Voltage("DRAM", 1)); moel@130: v.Add(new Voltage("+3.3V", 2)); moel@195: v.Add(new Voltage("+5V", 3, 6.8f, 10)); moel@357: v.Add(new Voltage("+12V", 4, 24.3f, 8.2f)); moel@130: v.Add(new Voltage("VBat", 8)); moel@130: t.Add(new Temperature("System", 0)); moel@130: t.Add(new Temperature("CPU", 1)); moel@130: f.Add(new Fan("CPU Fan", 0)); moel@130: f.Add(new Fan("System Fan", 1)); moel@130: f.Add(new Fan("NB Fan", 2)); moel@130: break; moel@168: case Model.X58A_UD3R: // IT8720F moel@138: v.Add(new Voltage("CPU VCore", 0)); moel@138: v.Add(new Voltage("DRAM", 1)); moel@138: v.Add(new Voltage("+3.3V", 2)); moel@195: v.Add(new Voltage("+5V", 3, 6.8f, 10)); moel@357: v.Add(new Voltage("+12V", 5, 24.3f, 8.2f)); moel@138: v.Add(new Voltage("VBat", 8)); moel@138: t.Add(new Temperature("System", 0)); moel@138: t.Add(new Temperature("CPU", 1)); moel@138: t.Add(new Temperature("Northbridge", 2)); moel@138: f.Add(new Fan("CPU Fan", 0)); moel@138: f.Add(new Fan("System Fan #2", 1)); moel@138: f.Add(new Fan("Power Fan", 2)); moel@138: f.Add(new Fan("System Fan #1", 3)); moel@138: break; moel@130: default: moel@130: v.Add(new Voltage("CPU VCore", 0)); moel@130: v.Add(new Voltage("DRAM", 1, true)); moel@130: v.Add(new Voltage("+3.3V", 2, true)); moel@130: v.Add(new Voltage("+5V", 3, 6.8f, 10, 0, true)); moel@130: v.Add(new Voltage("Voltage #5", 4, true)); moel@130: v.Add(new Voltage("Voltage #6", 5, true)); moel@130: v.Add(new Voltage("Voltage #7", 6, true)); moel@257: v.Add(new Voltage("Voltage #8", 7, true)); moel@130: v.Add(new Voltage("VBat", 8)); moel@130: for (int i = 0; i < superIO.Temperatures.Length; i++) moel@130: t.Add(new Temperature("Temperature #" + (i + 1), i)); moel@130: for (int i = 0; i < superIO.Fans.Length; i++) moel@130: f.Add(new Fan("Fan #" + (i + 1), i)); moel@130: break; moel@130: } moel@130: break; moel@130: moel@130: default: moel@130: v.Add(new Voltage("CPU VCore", 0)); moel@130: v.Add(new Voltage("Voltage #2", 1, true)); moel@130: v.Add(new Voltage("Voltage #3", 2, true)); moel@130: v.Add(new Voltage("Voltage #4", 3, true)); moel@130: v.Add(new Voltage("Voltage #5", 4, true)); moel@130: v.Add(new Voltage("Voltage #6", 5, true)); moel@130: v.Add(new Voltage("Voltage #7", 6, true)); moel@130: v.Add(new Voltage("Voltage #8", 7, true)); moel@130: v.Add(new Voltage("VBat", 8)); moel@130: for (int i = 0; i < superIO.Temperatures.Length; i++) moel@130: t.Add(new Temperature("Temperature #" + (i + 1), i)); moel@130: for (int i = 0; i < superIO.Fans.Length; i++) moel@130: f.Add(new Fan("Fan #" + (i + 1), i)); moel@130: break; moel@130: } moel@130: break; moel@170: moel@170: case Chip.IT8721F: moel@277: case Chip.IT8728F: moel@341: case Chip.IT8771E: moel@319: case Chip.IT8772E: moel@177: switch (manufacturer) { moel@177: case Manufacturer.ECS: moel@177: switch (model) { moel@177: case Model.A890GXM_A: // IT8721F moel@177: v.Add(new Voltage("CPU VCore", 0)); moel@177: v.Add(new Voltage("VDIMM", 1)); moel@177: v.Add(new Voltage("NB Voltage", 2)); moel@195: v.Add(new Voltage("Analog +3.3V", 3, 10, 10)); moel@177: // v.Add(new Voltage("VDIMM", 6, true)); moel@195: v.Add(new Voltage("Standby +3.3V", 7, 10, 10)); moel@195: v.Add(new Voltage("VBat", 8, 10, 10)); moel@177: t.Add(new Temperature("CPU", 0)); moel@177: t.Add(new Temperature("System", 1)); moel@177: t.Add(new Temperature("Northbridge", 2)); moel@177: f.Add(new Fan("CPU Fan", 0)); moel@177: f.Add(new Fan("System Fan", 1)); moel@177: f.Add(new Fan("Power Fan", 2)); moel@177: break; moel@177: default: moel@177: v.Add(new Voltage("Voltage #1", 0, true)); moel@177: v.Add(new Voltage("Voltage #2", 1, true)); moel@177: v.Add(new Voltage("Voltage #3", 2, true)); moel@177: v.Add(new Voltage("Analog +3.3V", 3, 10, 10, 0, true)); moel@177: v.Add(new Voltage("Voltage #5", 4, true)); moel@177: v.Add(new Voltage("Voltage #6", 5, true)); moel@177: v.Add(new Voltage("Voltage #7", 6, true)); moel@177: v.Add(new Voltage("Standby +3.3V", 7, 10, 10, 0, true)); moel@195: v.Add(new Voltage("VBat", 8, 10, 10)); moel@177: for (int i = 0; i < superIO.Temperatures.Length; i++) moel@177: t.Add(new Temperature("Temperature #" + (i + 1), i)); moel@177: for (int i = 0; i < superIO.Fans.Length; i++) moel@177: f.Add(new Fan("Fan #" + (i + 1), i)); moel@177: break; moel@177: } moel@177: break; moel@278: case Manufacturer.Gigabyte: moel@278: switch (model) { moel@357: case Model.H61M_DS2_REV_1_2: // IT8728F moel@357: case Model.H61M_USB3_B3_REV_2_0: // IT8728F moel@357: v.Add(new Voltage("VTT", 0)); moel@357: v.Add(new Voltage("+12V", 2, 30.9f, 10)); moel@278: v.Add(new Voltage("CPU VCore", 5)); moel@278: v.Add(new Voltage("DRAM", 6)); moel@278: v.Add(new Voltage("Standby +3.3V", 7, 10, 10)); moel@278: v.Add(new Voltage("VBat", 8, 10, 10)); moel@278: t.Add(new Temperature("System", 0)); moel@278: t.Add(new Temperature("CPU", 2)); moel@278: f.Add(new Fan("CPU Fan", 0)); moel@357: f.Add(new Fan("System Fan", 1)); moel@278: break; moel@290: case Model.H67A_UD3H_B3: // IT8728F moel@357: case Model.H67A_USB3_B3: // IT8728F moel@290: v.Add(new Voltage("VTT", 0)); moel@290: v.Add(new Voltage("+5V", 1, 15, 10)); moel@357: v.Add(new Voltage("+12V", 2, 30.9f, 10)); moel@290: v.Add(new Voltage("CPU VCore", 5)); moel@290: v.Add(new Voltage("DRAM", 6)); moel@290: v.Add(new Voltage("Standby +3.3V", 7, 10, 10)); moel@290: v.Add(new Voltage("VBat", 8, 10, 10)); moel@290: t.Add(new Temperature("System", 0)); moel@290: t.Add(new Temperature("CPU", 2)); moel@290: f.Add(new Fan("CPU Fan", 0)); moel@290: f.Add(new Fan("System Fan #1", 1)); moel@290: f.Add(new Fan("Power Fan", 2)); moel@290: f.Add(new Fan("System Fan #2", 3)); moel@290: break; moel@357: case Model.Z68A_D3H_B3: // IT8728F moel@357: v.Add(new Voltage("VTT", 0)); moel@357: v.Add(new Voltage("+3.3V", 1, 6.49f, 10)); moel@357: v.Add(new Voltage("+12V", 2, 30.9f, 10)); moel@357: v.Add(new Voltage("+5V", 3, 7.15f, 10)); moel@357: v.Add(new Voltage("CPU VCore", 5)); moel@357: v.Add(new Voltage("DRAM", 6)); moel@357: v.Add(new Voltage("Standby +3.3V", 7, 10, 10)); moel@357: v.Add(new Voltage("VBat", 8, 10, 10)); moel@357: t.Add(new Temperature("System", 0)); moel@357: t.Add(new Temperature("CPU", 2)); moel@357: f.Add(new Fan("CPU Fan", 0)); moel@357: f.Add(new Fan("System Fan #1", 1)); moel@357: f.Add(new Fan("Power Fan", 2)); moel@357: f.Add(new Fan("System Fan #2", 3)); moel@357: break; moel@357: case Model.P67A_UD3_B3: // IT8728F moel@357: case Model.P67A_UD3R_B3: // IT8728F moel@357: case Model.P67A_UD4_B3: // IT8728F moel@357: case Model.Z68AP_D3: // IT8728F moel@357: case Model.Z68X_UD3H_B3: // IT8728F moel@357: v.Add(new Voltage("VTT", 0)); moel@357: v.Add(new Voltage("+3.3V", 1, 6.49f, 10)); moel@357: v.Add(new Voltage("+12V", 2, 30.9f, 10)); moel@357: v.Add(new Voltage("+5V", 3, 7.15f, 10)); moel@357: v.Add(new Voltage("CPU VCore", 5)); moel@357: v.Add(new Voltage("DRAM", 6)); moel@357: v.Add(new Voltage("Standby +3.3V", 7, 10, 10)); moel@357: v.Add(new Voltage("VBat", 8, 10, 10)); moel@357: t.Add(new Temperature("System", 0)); moel@357: t.Add(new Temperature("CPU", 2)); moel@357: f.Add(new Fan("CPU Fan", 0)); moel@357: f.Add(new Fan("System Fan #2", 1)); moel@357: f.Add(new Fan("Power Fan", 2)); moel@357: f.Add(new Fan("System Fan #1", 3)); moel@357: break; moel@305: case Model.Z68X_UD7_B3: // IT8728F moel@305: v.Add(new Voltage("VTT", 0)); moel@357: v.Add(new Voltage("+3.3V", 1, 6.49f, 10)); moel@357: v.Add(new Voltage("+12V", 2, 30.9f, 10)); moel@357: v.Add(new Voltage("+5V", 3, 7.15f, 10)); moel@305: v.Add(new Voltage("CPU VCore", 5)); moel@305: v.Add(new Voltage("DRAM", 6)); moel@305: v.Add(new Voltage("Standby +3.3V", 7, 10, 10)); moel@305: v.Add(new Voltage("VBat", 8, 10, 10)); moel@305: t.Add(new Temperature("System", 0)); moel@305: t.Add(new Temperature("CPU", 1)); moel@305: t.Add(new Temperature("System 3", 2)); moel@305: f.Add(new Fan("CPU Fan", 0)); moel@305: f.Add(new Fan("Power Fan", 1)); moel@305: f.Add(new Fan("System Fan #1", 2)); moel@305: f.Add(new Fan("System Fan #2", 3)); moel@305: f.Add(new Fan("System Fan #3", 4)); moel@305: break; moel@278: default: moel@278: v.Add(new Voltage("Voltage #1", 0, true)); moel@278: v.Add(new Voltage("Voltage #2", 1, true)); moel@278: v.Add(new Voltage("Voltage #3", 2, true)); moel@278: v.Add(new Voltage("Voltage #4", 3, true)); moel@278: v.Add(new Voltage("Voltage #5", 4, true)); moel@278: v.Add(new Voltage("Voltage #6", 5, true)); moel@278: v.Add(new Voltage("Voltage #7", 6, true)); moel@278: v.Add(new Voltage("Standby +3.3V", 7, 10, 10, 0, true)); moel@278: v.Add(new Voltage("VBat", 8, 10, 10)); moel@278: for (int i = 0; i < superIO.Temperatures.Length; i++) moel@278: t.Add(new Temperature("Temperature #" + (i + 1), i)); moel@278: for (int i = 0; i < superIO.Fans.Length; i++) moel@278: f.Add(new Fan("Fan #" + (i + 1), i)); moel@278: break; moel@278: } moel@278: break; moel@320: case Manufacturer.Shuttle: moel@320: switch (model) { moel@320: case Model.FH67: // IT8772E moel@320: v.Add(new Voltage("CPU VCore", 0)); moel@320: v.Add(new Voltage("DRAM", 1)); moel@320: v.Add(new Voltage("PCH VCCIO", 2)); moel@320: v.Add(new Voltage("CPU VCCIO", 3)); moel@320: v.Add(new Voltage("Graphic Voltage", 4)); moel@320: v.Add(new Voltage("Standby +3.3V", 7, 10, 10)); moel@320: v.Add(new Voltage("VBat", 8, 10, 10)); moel@320: t.Add(new Temperature("System", 0)); moel@320: t.Add(new Temperature("CPU", 1)); moel@320: f.Add(new Fan("Fan #1", 0)); moel@320: f.Add(new Fan("CPU Fan", 1)); moel@320: break; moel@320: default: moel@320: v.Add(new Voltage("Voltage #1", 0, true)); moel@320: v.Add(new Voltage("Voltage #2", 1, true)); moel@320: v.Add(new Voltage("Voltage #3", 2, true)); moel@320: v.Add(new Voltage("Voltage #4", 3, true)); moel@320: v.Add(new Voltage("Voltage #5", 4, true)); moel@320: v.Add(new Voltage("Voltage #6", 5, true)); moel@320: v.Add(new Voltage("Voltage #7", 6, true)); moel@320: v.Add(new Voltage("Standby +3.3V", 7, 10, 10, 0, true)); moel@320: v.Add(new Voltage("VBat", 8, 10, 10)); moel@320: for (int i = 0; i < superIO.Temperatures.Length; i++) moel@320: t.Add(new Temperature("Temperature #" + (i + 1), i)); moel@320: for (int i = 0; i < superIO.Fans.Length; i++) moel@320: f.Add(new Fan("Fan #" + (i + 1), i)); moel@320: break; moel@320: } moel@320: break; moel@177: default: moel@177: v.Add(new Voltage("Voltage #1", 0, true)); moel@177: v.Add(new Voltage("Voltage #2", 1, true)); moel@177: v.Add(new Voltage("Voltage #3", 2, true)); moel@277: v.Add(new Voltage("Voltage #4", 3, true)); moel@177: v.Add(new Voltage("Voltage #5", 4, true)); moel@177: v.Add(new Voltage("Voltage #6", 5, true)); moel@177: v.Add(new Voltage("Voltage #7", 6, true)); moel@177: v.Add(new Voltage("Standby +3.3V", 7, 10, 10, 0, true)); moel@195: v.Add(new Voltage("VBat", 8, 10, 10)); moel@177: for (int i = 0; i < superIO.Temperatures.Length; i++) moel@177: t.Add(new Temperature("Temperature #" + (i + 1), i)); moel@177: for (int i = 0; i < superIO.Fans.Length; i++) moel@177: f.Add(new Fan("Fan #" + (i + 1), i)); moel@177: break; moel@177: } moel@170: break; moel@130: moel@130: case Chip.F71858: moel@195: v.Add(new Voltage("VCC3V", 0, 150, 150)); moel@195: v.Add(new Voltage("VSB3V", 1, 150, 150)); moel@195: v.Add(new Voltage("Battery", 2, 150, 150)); moel@130: for (int i = 0; i < superIO.Temperatures.Length; i++) moel@130: t.Add(new Temperature("Temperature #" + (i + 1), i)); moel@130: for (int i = 0; i < superIO.Fans.Length; i++) moel@130: f.Add(new Fan("Fan #" + (i + 1), i)); moel@130: break; moel@130: case Chip.F71862: moel@130: case Chip.F71869: moel@130: case Chip.F71882: moel@296: case Chip.F71889AD: moel@130: case Chip.F71889ED: moel@130: case Chip.F71889F: moel@352: case Chip.F71808E: moel@132: switch (manufacturer) { moel@132: case Manufacturer.EVGA: moel@132: switch (model) { moel@168: case Model.X58_SLI_Classified: // F71882 moel@195: v.Add(new Voltage("VCC3V", 0, 150, 150)); moel@195: v.Add(new Voltage("CPU VCore", 1, 47, 100)); moel@195: v.Add(new Voltage("DIMM", 2, 47, 100)); moel@195: v.Add(new Voltage("CPU VTT", 3, 24, 100)); moel@195: v.Add(new Voltage("IOH Vcore", 4, 24, 100)); moel@195: v.Add(new Voltage("+5V", 5, 51, 12)); moel@195: v.Add(new Voltage("+12V", 6, 56, 6.8f)); moel@195: v.Add(new Voltage("3VSB", 7, 150, 150)); moel@195: v.Add(new Voltage("VBat", 8, 150, 150)); moel@132: t.Add(new Temperature("CPU", 0)); moel@132: t.Add(new Temperature("VREG", 1)); moel@132: t.Add(new Temperature("System", 2)); moel@132: f.Add(new Fan("CPU Fan", 0)); moel@132: f.Add(new Fan("Power Fan", 1)); moel@132: f.Add(new Fan("Chassis Fan", 2)); moel@132: break; moel@132: default: moel@195: v.Add(new Voltage("VCC3V", 0, 150, 150)); moel@132: v.Add(new Voltage("CPU VCore", 1)); moel@132: v.Add(new Voltage("Voltage #3", 2, true)); moel@132: v.Add(new Voltage("Voltage #4", 3, true)); moel@132: v.Add(new Voltage("Voltage #5", 4, true)); moel@132: v.Add(new Voltage("Voltage #6", 5, true)); moel@132: v.Add(new Voltage("Voltage #7", 6, true)); moel@195: v.Add(new Voltage("VSB3V", 7, 150, 150)); moel@195: v.Add(new Voltage("VBat", 8, 150, 150)); moel@132: for (int i = 0; i < superIO.Temperatures.Length; i++) moel@132: t.Add(new Temperature("Temperature #" + (i + 1), i)); moel@132: for (int i = 0; i < superIO.Fans.Length; i++) moel@132: f.Add(new Fan("Fan #" + (i + 1), i)); moel@132: break; moel@132: } moel@132: break; moel@132: default: moel@195: v.Add(new Voltage("VCC3V", 0, 150, 150)); moel@132: v.Add(new Voltage("CPU VCore", 1)); moel@132: v.Add(new Voltage("Voltage #3", 2, true)); moel@132: v.Add(new Voltage("Voltage #4", 3, true)); moel@132: v.Add(new Voltage("Voltage #5", 4, true)); moel@132: v.Add(new Voltage("Voltage #6", 5, true)); moel@352: if (superIO.Chip != Chip.F71808E) moel@352: v.Add(new Voltage("Voltage #7", 6, true)); moel@195: v.Add(new Voltage("VSB3V", 7, 150, 150)); moel@195: v.Add(new Voltage("VBat", 8, 150, 150)); moel@132: for (int i = 0; i < superIO.Temperatures.Length; i++) moel@132: t.Add(new Temperature("Temperature #" + (i + 1), i)); moel@132: for (int i = 0; i < superIO.Fans.Length; i++) moel@132: f.Add(new Fan("Fan #" + (i + 1), i)); moel@132: break; moel@132: } moel@130: break; moel@130: moel@220: case Chip.W83627EHF: moel@220: switch (manufacturer) { moel@220: case Manufacturer.ASRock: moel@220: switch (model) { moel@220: case Model.AOD790GX_128M: // W83627EHF moel@220: v.Add(new Voltage("CPU VCore", 0)); moel@220: v.Add(new Voltage("Analog +3.3V", 2, 34, 34)); moel@220: v.Add(new Voltage("+3.3V", 4, 10, 10)); moel@220: v.Add(new Voltage("+5V", 5, 20, 10)); moel@220: v.Add(new Voltage("+12V", 6, 28, 5)); moel@220: v.Add(new Voltage("Standby +3.3V", 7, 34, 34)); moel@220: v.Add(new Voltage("VBAT", 8, 34, 34)); moel@220: t.Add(new Temperature("CPU", 0)); moel@220: t.Add(new Temperature("Motherboard", 2)); moel@221: f.Add(new Fan("CPU Fan", 0)); moel@221: f.Add(new Fan("Chassis Fan", 1)); moel@220: break; moel@220: default: moel@220: v.Add(new Voltage("CPU VCore", 0)); moel@220: v.Add(new Voltage("Voltage #2", 1, true)); moel@220: v.Add(new Voltage("AVCC", 2, 34, 34)); moel@220: v.Add(new Voltage("3VCC", 3, 34, 34)); moel@220: v.Add(new Voltage("Voltage #5", 4, true)); moel@220: v.Add(new Voltage("Voltage #6", 5, true)); moel@220: v.Add(new Voltage("Voltage #7", 6, true)); moel@220: v.Add(new Voltage("3VSB", 7, 34, 34)); moel@220: v.Add(new Voltage("VBAT", 8, 34, 34)); moel@220: v.Add(new Voltage("Voltage #10", 9, true)); moel@220: t.Add(new Temperature("CPU", 0)); moel@220: t.Add(new Temperature("Auxiliary", 1)); moel@220: t.Add(new Temperature("System", 2)); moel@220: f.Add(new Fan("System Fan", 0)); moel@220: f.Add(new Fan("CPU Fan", 1)); moel@220: f.Add(new Fan("Auxiliary Fan", 2)); moel@220: f.Add(new Fan("CPU Fan #2", 3)); moel@220: f.Add(new Fan("Auxiliary Fan #2", 4)); moel@220: break; moel@220: } break; moel@220: default: moel@220: v.Add(new Voltage("CPU VCore", 0)); moel@220: v.Add(new Voltage("Voltage #2", 1, true)); moel@220: v.Add(new Voltage("AVCC", 2, 34, 34)); moel@220: v.Add(new Voltage("3VCC", 3, 34, 34)); moel@220: v.Add(new Voltage("Voltage #5", 4, true)); moel@220: v.Add(new Voltage("Voltage #6", 5, true)); moel@220: v.Add(new Voltage("Voltage #7", 6, true)); moel@220: v.Add(new Voltage("3VSB", 7, 34, 34)); moel@220: v.Add(new Voltage("VBAT", 8, 34, 34)); moel@220: v.Add(new Voltage("Voltage #10", 9, true)); moel@220: t.Add(new Temperature("CPU", 0)); moel@220: t.Add(new Temperature("Auxiliary", 1)); moel@220: t.Add(new Temperature("System", 2)); moel@220: f.Add(new Fan("System Fan", 0)); moel@220: f.Add(new Fan("CPU Fan", 1)); moel@220: f.Add(new Fan("Auxiliary Fan", 2)); moel@220: f.Add(new Fan("CPU Fan #2", 3)); moel@220: f.Add(new Fan("Auxiliary Fan #2", 4)); moel@220: break; moel@220: } moel@130: break; moel@130: case Chip.W83627DHG: moel@130: case Chip.W83627DHGP: moel@130: case Chip.W83667HG: moel@130: case Chip.W83667HGB: moel@152: switch (manufacturer) { moel@153: case Manufacturer.ASRock: moel@153: switch (model) { moel@168: case Model._880GMH_USB3: // W83627DHG-P moel@153: v.Add(new Voltage("CPU VCore", 0)); moel@195: v.Add(new Voltage("+3.3V", 3, 34, 34)); moel@195: v.Add(new Voltage("+5V", 5, 15, 7.5f)); moel@195: v.Add(new Voltage("+12V", 6, 56, 10)); moel@195: v.Add(new Voltage("Standby +3.3V", 7, 34, 34)); moel@195: v.Add(new Voltage("VBAT", 8, 34, 34)); moel@153: t.Add(new Temperature("CPU", 0)); moel@153: t.Add(new Temperature("Motherboard", 2)); moel@153: f.Add(new Fan("Chassis Fan", 0)); moel@153: f.Add(new Fan("CPU Fan", 1)); moel@153: f.Add(new Fan("Power Fan", 2)); moel@153: break; moel@153: default: moel@153: v.Add(new Voltage("CPU VCore", 0)); moel@153: v.Add(new Voltage("Voltage #2", 1, true)); moel@195: v.Add(new Voltage("AVCC", 2, 34, 34)); moel@195: v.Add(new Voltage("3VCC", 3, 34, 34)); moel@153: v.Add(new Voltage("Voltage #5", 4, true)); moel@153: v.Add(new Voltage("Voltage #6", 5, true)); moel@153: v.Add(new Voltage("Voltage #7", 6, true)); moel@195: v.Add(new Voltage("3VSB", 7, 34, 34)); moel@195: v.Add(new Voltage("VBAT", 8, 34, 34)); moel@153: t.Add(new Temperature("CPU", 0)); moel@153: t.Add(new Temperature("Auxiliary", 1)); moel@153: t.Add(new Temperature("System", 2)); moel@153: f.Add(new Fan("System Fan", 0)); moel@153: f.Add(new Fan("CPU Fan", 1)); moel@153: f.Add(new Fan("Auxiliary Fan", 2)); moel@153: f.Add(new Fan("CPU Fan #2", 3)); moel@153: f.Add(new Fan("Auxiliary Fan #2", 4)); moel@153: break; moel@153: } moel@153: break; moel@152: case Manufacturer.ASUS: moel@152: switch (model) { moel@336: case Model.P6T: // W83667HG moel@174: case Model.P6X58D_E: // W83667HG moel@174: case Model.Rampage_II_GENE: // W83667HG moel@152: v.Add(new Voltage("CPU VCore", 0)); moel@195: v.Add(new Voltage("+12V", 1, 11.5f, 1.91f)); moel@195: v.Add(new Voltage("Analog +3.3V", 2, 34, 34)); moel@195: v.Add(new Voltage("+3.3V", 3, 34, 34)); moel@195: v.Add(new Voltage("+5V", 4, 15, 7.5f)); moel@195: v.Add(new Voltage("Standby +3.3V", 7, 34, 34)); moel@195: v.Add(new Voltage("VBAT", 8, 34, 34)); moel@174: t.Add(new Temperature("CPU", 0)); moel@174: t.Add(new Temperature("Motherboard", 2)); moel@174: f.Add(new Fan("Chassis Fan #1", 0)); moel@174: f.Add(new Fan("CPU Fan", 1)); moel@174: f.Add(new Fan("Power Fan", 2)); moel@174: f.Add(new Fan("Chassis Fan #2", 3)); moel@174: f.Add(new Fan("Chassis Fan #3", 4)); moel@174: break; moel@174: case Model.Rampage_Extreme: // W83667HG moel@174: v.Add(new Voltage("CPU VCore", 0)); moel@195: v.Add(new Voltage("+12V", 1, 12, 2)); moel@195: v.Add(new Voltage("Analog +3.3V", 2, 34, 34)); moel@195: v.Add(new Voltage("+3.3V", 3, 34, 34)); moel@195: v.Add(new Voltage("+5V", 4, 15, 7.5f)); moel@195: v.Add(new Voltage("Standby +3.3V", 7, 34, 34)); moel@195: v.Add(new Voltage("VBAT", 8, 34, 34)); moel@152: t.Add(new Temperature("CPU", 0)); moel@152: t.Add(new Temperature("Motherboard", 2)); moel@152: f.Add(new Fan("Chassis Fan #1", 0)); moel@153: f.Add(new Fan("CPU Fan", 1)); moel@153: f.Add(new Fan("Power Fan", 2)); moel@152: f.Add(new Fan("Chassis Fan #2", 3)); moel@152: f.Add(new Fan("Chassis Fan #3", 4)); moel@152: break; moel@152: default: moel@152: v.Add(new Voltage("CPU VCore", 0)); moel@152: v.Add(new Voltage("Voltage #2", 1, true)); moel@195: v.Add(new Voltage("AVCC", 2, 34, 34)); moel@195: v.Add(new Voltage("3VCC", 3, 34, 34)); moel@152: v.Add(new Voltage("Voltage #5", 4, true)); moel@152: v.Add(new Voltage("Voltage #6", 5, true)); moel@152: v.Add(new Voltage("Voltage #7", 6, true)); moel@195: v.Add(new Voltage("3VSB", 7, 34, 34)); moel@195: v.Add(new Voltage("VBAT", 8, 34, 34)); moel@152: t.Add(new Temperature("CPU", 0)); moel@152: t.Add(new Temperature("Auxiliary", 1)); moel@152: t.Add(new Temperature("System", 2)); moel@153: f.Add(new Fan("System Fan", 0)); moel@153: f.Add(new Fan("CPU Fan", 1)); moel@153: f.Add(new Fan("Auxiliary Fan", 2)); moel@153: f.Add(new Fan("CPU Fan #2", 3)); moel@153: f.Add(new Fan("Auxiliary Fan #2", 4)); moel@152: break; moel@152: } moel@152: break; moel@152: default: moel@152: v.Add(new Voltage("CPU VCore", 0)); moel@152: v.Add(new Voltage("Voltage #2", 1, true)); moel@195: v.Add(new Voltage("AVCC", 2, 34, 34)); moel@195: v.Add(new Voltage("3VCC", 3, 34, 34)); moel@152: v.Add(new Voltage("Voltage #5", 4, true)); moel@152: v.Add(new Voltage("Voltage #6", 5, true)); moel@152: v.Add(new Voltage("Voltage #7", 6, true)); moel@195: v.Add(new Voltage("3VSB", 7, 34, 34)); moel@195: v.Add(new Voltage("VBAT", 8, 34, 34)); moel@152: t.Add(new Temperature("CPU", 0)); moel@152: t.Add(new Temperature("Auxiliary", 1)); moel@152: t.Add(new Temperature("System", 2)); moel@153: f.Add(new Fan("System Fan", 0)); moel@153: f.Add(new Fan("CPU Fan", 1)); moel@153: f.Add(new Fan("Auxiliary Fan", 2)); moel@153: f.Add(new Fan("CPU Fan #2", 3)); moel@153: f.Add(new Fan("Auxiliary Fan #2", 4)); moel@152: break; moel@152: } moel@130: break; moel@130: case Chip.W83627HF: moel@130: case Chip.W83627THF: moel@130: case Chip.W83687THF: moel@130: v.Add(new Voltage("CPU VCore", 0)); moel@130: v.Add(new Voltage("Voltage #2", 1, true)); moel@130: v.Add(new Voltage("Voltage #3", 2, true)); moel@195: v.Add(new Voltage("AVCC", 3, 34, 51)); moel@130: v.Add(new Voltage("Voltage #5", 4, true)); moel@195: v.Add(new Voltage("5VSB", 5, 34, 51)); moel@130: v.Add(new Voltage("VBAT", 6)); moel@130: t.Add(new Temperature("CPU", 0)); moel@130: t.Add(new Temperature("Auxiliary", 1)); moel@130: t.Add(new Temperature("System", 2)); moel@153: f.Add(new Fan("System Fan", 0)); moel@153: f.Add(new Fan("CPU Fan", 1)); moel@153: f.Add(new Fan("Auxiliary Fan", 2)); moel@130: break; moel@245: case Chip.NCT6771F: moel@265: case Chip.NCT6776F: moel@265: switch (manufacturer) { moel@265: case Manufacturer.ASUS: moel@265: switch (model) { moel@312: case Model.P8P67: // NCT6776F moel@311: case Model.P8P67_EVO: // NCT6776F moel@265: case Model.P8P67_PRO: // NCT6776F moel@265: v.Add(new Voltage("CPU VCore", 0)); moel@310: v.Add(new Voltage("+12V", 1, 11, 1)); moel@310: v.Add(new Voltage("Analog +3.3V", 2, 34, 34)); moel@310: v.Add(new Voltage("+3.3V", 3, 34, 34)); moel@310: v.Add(new Voltage("+5V", 4, 12, 3)); moel@310: v.Add(new Voltage("Standby +3.3V", 7, 34, 34)); moel@265: v.Add(new Voltage("VBAT", 8, 34, 34)); moel@310: t.Add(new Temperature("CPU", 0)); moel@276: t.Add(new Temperature("Auxiliary", 2)); moel@310: t.Add(new Temperature("Motherboard", 3)); moel@310: f.Add(new Fan("Chassis Fan #1", 0)); moel@265: f.Add(new Fan("CPU Fan", 1)); moel@310: f.Add(new Fan("Power Fan", 2)); moel@310: f.Add(new Fan("Chassis Fan #2", 3)); moel@323: c.Add(new Ctrl("Chassis Fan #2", 0)); moel@323: c.Add(new Ctrl("CPU Fan", 1)); moel@323: c.Add(new Ctrl("Chassis Fan #1", 2)); moel@265: break; moel@276: case Model.P8P67_M_PRO: // NCT6776F moel@276: v.Add(new Voltage("CPU VCore", 0)); moel@276: v.Add(new Voltage("+12V", 1, 11, 1)); moel@276: v.Add(new Voltage("Analog +3.3V", 2, 34, 34)); moel@310: v.Add(new Voltage("+3.3V", 3, 34, 34)); moel@276: v.Add(new Voltage("+5V", 4, 12, 3)); moel@276: v.Add(new Voltage("Voltage #6", 5, true)); moel@276: v.Add(new Voltage("Voltage #7", 6, true)); moel@276: v.Add(new Voltage("Standby +3.3V", 7, 34, 34)); moel@276: v.Add(new Voltage("VBAT", 8, 34, 34)); moel@276: t.Add(new Temperature("CPU", 0)); moel@276: t.Add(new Temperature("Motherboard", 3)); moel@276: f.Add(new Fan("Chassis Fan #1", 0)); moel@276: f.Add(new Fan("CPU Fan", 1)); moel@276: f.Add(new Fan("Chassis Fan #2", 2)); moel@276: f.Add(new Fan("Power Fan", 3)); moel@276: f.Add(new Fan("Auxiliary Fan", 4)); moel@276: break; moel@337: case Model.P8Z68_V_PRO: // NCT6776F moel@337: v.Add(new Voltage("CPU VCore", 0)); moel@337: v.Add(new Voltage("+12V", 1, 11, 1)); moel@337: v.Add(new Voltage("Analog +3.3V", 2, 34, 34)); moel@337: v.Add(new Voltage("+3.3V", 3, 34, 34)); moel@337: v.Add(new Voltage("+5V", 4, 12, 3)); moel@337: v.Add(new Voltage("Standby +3.3V", 7, 34, 34)); moel@337: v.Add(new Voltage("VBAT", 8, 34, 34)); moel@337: t.Add(new Temperature("CPU", 0)); moel@337: t.Add(new Temperature("Auxiliary", 2)); moel@337: t.Add(new Temperature("Motherboard", 3)); moel@337: for (int i = 0; i < superIO.Fans.Length; i++) moel@337: f.Add(new Fan("Fan #" + (i + 1), i)); moel@337: for (int i = 0; i < superIO.Controls.Length; i++) moel@337: c.Add(new Ctrl("Fan #" + (i + 1), i)); moel@337: break; moel@332: case Model.P9X79: // NCT6776F moel@332: v.Add(new Voltage("CPU VCore", 0)); moel@332: v.Add(new Voltage("+12V", 1, 11, 1)); moel@332: v.Add(new Voltage("Analog +3.3V", 2, 34, 34)); moel@332: v.Add(new Voltage("+3.3V", 3, 34, 34)); moel@332: v.Add(new Voltage("+5V", 4, 12, 3)); moel@332: v.Add(new Voltage("Standby +3.3V", 7, 34, 34)); moel@332: v.Add(new Voltage("VBAT", 8, 34, 34)); moel@332: t.Add(new Temperature("CPU", 0)); moel@332: t.Add(new Temperature("Motherboard", 3)); moel@332: for (int i = 0; i < superIO.Fans.Length; i++) moel@332: f.Add(new Fan("Fan #" + (i + 1), i)); moel@332: break; moel@265: default: moel@265: v.Add(new Voltage("CPU VCore", 0)); moel@265: v.Add(new Voltage("Voltage #2", 1, true)); moel@265: v.Add(new Voltage("AVCC", 2, 34, 34)); moel@265: v.Add(new Voltage("3VCC", 3, 34, 34)); moel@265: v.Add(new Voltage("Voltage #5", 4, true)); moel@265: v.Add(new Voltage("Voltage #6", 5, true)); moel@265: v.Add(new Voltage("Voltage #7", 6, true)); moel@265: v.Add(new Voltage("3VSB", 7, 34, 34)); moel@265: v.Add(new Voltage("VBAT", 8, 34, 34)); moel@354: t.Add(new Temperature("CPU Core", 0)); moel@354: t.Add(new Temperature("Temperature #1", 1)); moel@354: t.Add(new Temperature("Temperature #2", 2)); moel@354: t.Add(new Temperature("Temperature #3", 3)); moel@265: for (int i = 0; i < superIO.Fans.Length; i++) moel@265: f.Add(new Fan("Fan #" + (i + 1), i)); moel@265: break; moel@265: } moel@265: break; moel@265: default: moel@265: v.Add(new Voltage("CPU VCore", 0)); moel@265: v.Add(new Voltage("Voltage #2", 1, true)); moel@265: v.Add(new Voltage("AVCC", 2, 34, 34)); moel@265: v.Add(new Voltage("3VCC", 3, 34, 34)); moel@265: v.Add(new Voltage("Voltage #5", 4, true)); moel@265: v.Add(new Voltage("Voltage #6", 5, true)); moel@265: v.Add(new Voltage("Voltage #7", 6, true)); moel@265: v.Add(new Voltage("3VSB", 7, 34, 34)); moel@265: v.Add(new Voltage("VBAT", 8, 34, 34)); moel@354: t.Add(new Temperature("CPU Core", 0)); moel@354: t.Add(new Temperature("Temperature #1", 1)); moel@354: t.Add(new Temperature("Temperature #2", 2)); moel@354: t.Add(new Temperature("Temperature #3", 3)); moel@265: for (int i = 0; i < superIO.Fans.Length; i++) moel@265: f.Add(new Fan("Fan #" + (i + 1), i)); moel@265: break; moel@265: } moel@245: break; moel@356: case Chip.NCT6779D: moel@359: switch (manufacturer) { moel@359: case Manufacturer.ASUS: moel@359: switch (model) { moel@359: case Model.P8Z77_V: moel@359: v.Add(new Voltage("CPU VCore", 0)); moel@359: v.Add(new Voltage("Voltage #2", 1, true)); moel@359: v.Add(new Voltage("AVCC", 2, 34, 34)); moel@359: v.Add(new Voltage("3VCC", 3, 34, 34)); moel@359: v.Add(new Voltage("Voltage #5", 4, true)); moel@359: v.Add(new Voltage("Voltage #6", 5, true)); moel@359: v.Add(new Voltage("Voltage #7", 6, true)); moel@359: v.Add(new Voltage("3VSB", 7, 34, 34)); moel@359: v.Add(new Voltage("VBAT", 8, 34, 34)); moel@359: v.Add(new Voltage("VTT", 9)); moel@359: v.Add(new Voltage("Voltage #11", 10, true)); moel@359: v.Add(new Voltage("Voltage #12", 11, true)); moel@359: v.Add(new Voltage("Voltage #13", 12, true)); moel@359: v.Add(new Voltage("Voltage #14", 13, true)); moel@359: v.Add(new Voltage("Voltage #15", 14, true)); moel@359: t.Add(new Temperature("CPU Core", 0)); moel@359: t.Add(new Temperature("Auxiliary", 1)); moel@359: t.Add(new Temperature("Motherboard", 2)); moel@359: f.Add(new Fan("Chassis Fan #1", 0)); moel@359: f.Add(new Fan("CPU Fan", 1)); moel@359: f.Add(new Fan("Chassis Fan #2", 2)); moel@359: f.Add(new Fan("Chassis Fan #3", 3)); moel@359: c.Add(new Ctrl("Chassis Fan #1", 0)); moel@359: c.Add(new Ctrl("CPU Fan", 1)); moel@359: c.Add(new Ctrl("Chassis Fan #2", 2)); moel@359: c.Add(new Ctrl("Chassis Fan #3", 3)); moel@359: break; moel@359: } moel@359: break; moel@359: default: moel@359: v.Add(new Voltage("CPU VCore", 0)); moel@359: v.Add(new Voltage("Voltage #2", 1, true)); moel@359: v.Add(new Voltage("AVCC", 2, 34, 34)); moel@359: v.Add(new Voltage("3VCC", 3, 34, 34)); moel@359: v.Add(new Voltage("Voltage #5", 4, true)); moel@359: v.Add(new Voltage("Voltage #6", 5, true)); moel@359: v.Add(new Voltage("Voltage #7", 6, true)); moel@359: v.Add(new Voltage("3VSB", 7, 34, 34)); moel@359: v.Add(new Voltage("VBAT", 8, 34, 34)); moel@359: v.Add(new Voltage("VTT", 9)); moel@359: v.Add(new Voltage("Voltage #11", 10, true)); moel@359: v.Add(new Voltage("Voltage #12", 11, true)); moel@359: v.Add(new Voltage("Voltage #13", 12, true)); moel@359: v.Add(new Voltage("Voltage #14", 13, true)); moel@359: v.Add(new Voltage("Voltage #15", 14, true)); moel@359: t.Add(new Temperature("CPU Core", 0)); moel@359: t.Add(new Temperature("Temperature #1", 1)); moel@359: t.Add(new Temperature("Temperature #2", 2)); moel@359: t.Add(new Temperature("Temperature #3", 3)); moel@359: t.Add(new Temperature("Temperature #4", 4)); moel@359: t.Add(new Temperature("Temperature #5", 5)); moel@359: t.Add(new Temperature("Temperature #6", 6)); moel@359: for (int i = 0; i < superIO.Fans.Length; i++) moel@359: f.Add(new Fan("Fan #" + (i + 1), i)); moel@359: for (int i = 0; i < superIO.Controls.Length; i++) moel@359: c.Add(new Ctrl("Fan Control #" + (i + 1), i)); moel@359: break; moel@359: } moel@356: break; moel@130: default: moel@130: for (int i = 0; i < superIO.Voltages.Length; i++) moel@130: v.Add(new Voltage("Voltage #" + (i + 1), i, true)); moel@130: for (int i = 0; i < superIO.Temperatures.Length; i++) moel@130: t.Add(new Temperature("Temperature #" + (i + 1), i)); moel@130: for (int i = 0; i < superIO.Fans.Length; i++) moel@130: f.Add(new Fan("Fan #" + (i + 1), i)); moel@323: for (int i = 0; i < superIO.Controls.Length; i++) moel@323: c.Add(new Ctrl("Fan Control #" + (i + 1), i)); moel@130: break; moel@130: } moel@130: moel@195: const string formula = "Voltage = value + (value - Vf) * Ri / Rf."; moel@130: foreach (Voltage voltage in v) moel@130: if (voltage.Index < superIO.Voltages.Length) { moel@130: Sensor sensor = new Sensor(voltage.Name, voltage.Index, moel@195: voltage.Hidden, SensorType.Voltage, this, new [] { moel@130: new ParameterDescription("Ri [kΩ]", "Input resistance.\n" + moel@130: formula, voltage.Ri), moel@130: new ParameterDescription("Rf [kΩ]", "Reference resistance.\n" + moel@130: formula, voltage.Rf), moel@130: new ParameterDescription("Vf [V]", "Reference voltage.\n" + moel@130: formula, voltage.Vf) moel@165: }, settings); moel@130: voltages.Add(sensor); moel@130: } moel@130: moel@130: foreach (Temperature temperature in t) moel@130: if (temperature.Index < superIO.Temperatures.Length) { moel@134: Sensor sensor = new Sensor(temperature.Name, temperature.Index, moel@195: SensorType.Temperature, this, new [] { moel@130: new ParameterDescription("Offset [°C]", "Temperature offset.", 0) moel@165: }, settings); moel@130: temperatures.Add(sensor); moel@130: } moel@130: moel@130: foreach (Fan fan in f) moel@130: if (fan.Index < superIO.Fans.Length) { moel@134: Sensor sensor = new Sensor(fan.Name, fan.Index, SensorType.Fan, moel@165: this, settings); moel@130: fans.Add(sensor); moel@130: } moel@323: moel@323: foreach (Ctrl ctrl in c) { moel@323: int index = ctrl.Index; moel@323: if (index < superIO.Controls.Length) { moel@323: Sensor sensor = new Sensor(ctrl.Name, index, SensorType.Control, moel@323: this, settings); moel@323: Control control = new Control(sensor, settings, 0, 100); moel@323: control.ControlModeChanged += (cc) => { moel@323: if (cc.ControlMode == ControlMode.Default) { moel@323: superIO.SetControl(index, null); moel@323: } else { moel@323: superIO.SetControl(index, (byte)(cc.SoftwareValue * 2.55)); moel@323: } moel@323: }; moel@323: control.SoftwareControlValueChanged += (cc) => { moel@323: if (cc.ControlMode == ControlMode.Software) moel@323: superIO.SetControl(index, (byte)(cc.SoftwareValue * 2.55)); moel@323: }; moel@323: if (control.ControlMode == ControlMode.Software) moel@323: superIO.SetControl(index, (byte)(control.SoftwareValue * 2.55)); moel@323: sensor.Control = control; moel@323: controls.Add(sensor); moel@323: } moel@323: } moel@130: } moel@130: moel@165: public override HardwareType HardwareType { moel@165: get { return HardwareType.SuperIO; } moel@130: } moel@130: moel@176: public override IHardware Parent { moel@176: get { return mainboard; } moel@176: } moel@176: moel@130: moel@130: public override string GetReport() { moel@130: return superIO.GetReport(); moel@130: } moel@130: moel@130: public override void Update() { moel@130: superIO.Update(); moel@130: moel@130: foreach (Sensor sensor in voltages) { moel@228: float? value = readVoltage(sensor.Index); moel@130: if (value.HasValue) { moel@130: sensor.Value = value + (value - sensor.Parameters[2].Value) * moel@130: sensor.Parameters[0].Value / sensor.Parameters[1].Value; moel@130: ActivateSensor(sensor); moel@130: } moel@130: } moel@130: moel@130: foreach (Sensor sensor in temperatures) { moel@228: float? value = readTemperature(sensor.Index); moel@130: if (value.HasValue) { moel@130: sensor.Value = value + sensor.Parameters[0].Value; moel@130: ActivateSensor(sensor); moel@130: } moel@130: } moel@130: moel@130: foreach (Sensor sensor in fans) { moel@228: float? value = readFan(sensor.Index); moel@130: if (value.HasValue) { moel@130: sensor.Value = value; moel@130: if (value.Value > 0) moel@130: ActivateSensor(sensor); moel@130: } moel@130: } moel@228: moel@323: foreach (Sensor sensor in controls) { moel@323: float? value = readControl(sensor.Index); moel@323: if (value.HasValue) { moel@323: sensor.Value = value; moel@323: ActivateSensor(sensor); moel@323: } moel@323: } moel@323: moel@228: postUpdate(); moel@130: } moel@130: moel@323: public override void Close() { moel@323: foreach (Sensor sensor in controls) { moel@323: // restore all controls back to default moel@323: superIO.SetControl(sensor.Index, null); moel@323: } moel@323: base.Close(); moel@323: } moel@323: moel@130: private class Voltage { moel@130: public readonly string Name; moel@130: public readonly int Index; moel@130: public readonly float Ri; moel@130: public readonly float Rf; moel@130: public readonly float Vf; moel@130: public readonly bool Hidden; moel@130: moel@202: public Voltage(string name, int index) : moel@202: this(name, index, false) { } moel@202: moel@130: public Voltage(string name, int index, bool hidden) : moel@130: this(name, index, 0, 1, 0, hidden) { } moel@202: moel@202: public Voltage(string name, int index, float ri, float rf) : moel@202: this(name, index, ri, rf, 0, false) { } moel@202: moel@202: // float ri = 0, float rf = 1, float vf = 0, bool hidden = false) moel@202: moel@195: public Voltage(string name, int index, moel@202: float ri, float rf, float vf, bool hidden) moel@195: { moel@130: this.Name = name; moel@130: this.Index = index; moel@130: this.Ri = ri; moel@130: this.Rf = rf; moel@130: this.Vf = vf; moel@130: this.Hidden = hidden; moel@130: } moel@130: } moel@130: moel@130: private class Temperature { moel@130: public readonly string Name; moel@130: public readonly int Index; moel@130: moel@167: public Temperature(string name, int index) { moel@130: this.Name = name; moel@130: this.Index = index; moel@130: } moel@130: } moel@130: moel@130: private class Fan { moel@130: public readonly string Name; moel@130: public readonly int Index; moel@130: moel@130: public Fan(string name, int index) { moel@130: this.Name = name; moel@130: this.Index = index; moel@130: } moel@130: } moel@323: moel@323: private class Ctrl { moel@323: public readonly string Name; moel@323: public readonly int Index; moel@323: moel@323: public Ctrl(string name, int index) { moel@323: this.Name = name; moel@323: this.Index = index; moel@323: } moel@323: } moel@130: } moel@130: }