Corrected the temperature reading on NCT6779D super I/O chips. Added a default mainboard specific configuration for NCT6779D super I/O chips.
3 This Source Code Form is subject to the terms of the Mozilla Public
4 License, v. 2.0. If a copy of the MPL was not distributed with this
5 file, You can obtain one at http://mozilla.org/MPL/2.0/.
7 Copyright (C) 2009-2012 Michael Möller <mmoeller@openhardwaremonitor.org>
12 using System.Collections.Generic;
13 using System.Globalization;
14 using System.Threading;
15 using OpenHardwareMonitor.Hardware.LPC;
17 namespace OpenHardwareMonitor.Hardware.Mainboard {
18 internal class SuperIOHardware : Hardware {
20 private readonly Mainboard mainboard;
21 private readonly ISuperIO superIO;
23 private readonly List<Sensor> voltages = new List<Sensor>();
24 private readonly List<Sensor> temperatures = new List<Sensor>();
25 private readonly List<Sensor> fans = new List<Sensor>();
26 private readonly List<Sensor> controls = new List<Sensor>();
28 private delegate float? ReadValueDelegate(int index);
29 private delegate void UpdateDelegate();
31 // delegates for mainboard specific sensor reading code
32 private readonly ReadValueDelegate readVoltage;
33 private readonly ReadValueDelegate readTemperature;
34 private readonly ReadValueDelegate readFan;
35 private readonly ReadValueDelegate readControl;
37 // delegate for post update mainboard specific code
38 private readonly UpdateDelegate postUpdate;
40 // mainboard specific mutex
41 private readonly Mutex mutex;
43 public SuperIOHardware(Mainboard mainboard, ISuperIO superIO,
44 Manufacturer manufacturer, Model model, ISettings settings)
45 : base(ChipName.GetName(superIO.Chip), new Identifier("lpc",
46 superIO.Chip.ToString().ToLower(CultureInfo.InvariantCulture)),
49 this.mainboard = mainboard;
50 this.superIO = superIO;
52 this.readVoltage = (index) => superIO.Voltages[index];
53 this.readTemperature = (index) => superIO.Temperatures[index];
54 this.readFan = (index) => superIO.Fans[index];
55 this.readControl = (index) => superIO.Controls[index];
57 this.postUpdate = () => { };
59 List<Voltage> v = new List<Voltage>();
60 List<Temperature> t = new List<Temperature>();
61 List<Fan> f = new List<Fan>();
62 List<Ctrl> c = new List<Ctrl>();
64 switch (superIO.Chip) {
71 switch (manufacturer) {
72 case Manufacturer.ASUS:
74 case Model.Crosshair_III_Formula: // IT8720F
75 v.Add(new Voltage("VBat", 8));
76 t.Add(new Temperature("CPU", 0));
77 for (int i = 0; i < superIO.Fans.Length; i++)
78 f.Add(new Fan("Fan #" + (i + 1), i));
80 case Model.M2N_SLI_DELUXE:
81 v.Add(new Voltage("CPU VCore", 0));
82 v.Add(new Voltage("+3.3V", 1));
83 v.Add(new Voltage("+5V", 3, 6.8f, 10));
84 v.Add(new Voltage("+12V", 4, 30, 10));
85 v.Add(new Voltage("+5VSB", 7, 6.8f, 10));
86 v.Add(new Voltage("VBat", 8));
87 t.Add(new Temperature("CPU", 0));
88 t.Add(new Temperature("Motherboard", 1));
89 f.Add(new Fan("CPU Fan", 0));
90 f.Add(new Fan("Chassis Fan #1", 1));
91 f.Add(new Fan("Power Fan", 2));
93 case Model.M4A79XTD_EVO: // IT8720F
94 v.Add(new Voltage("+5V", 3, 6.8f, 10));
95 v.Add(new Voltage("VBat", 8));
96 t.Add(new Temperature("CPU", 0));
97 t.Add(new Temperature("Motherboard", 1));
98 f.Add(new Fan("CPU Fan", 0));
99 f.Add(new Fan("Chassis Fan #1", 1));
100 f.Add(new Fan("Chassis Fan #2", 2));
103 v.Add(new Voltage("CPU VCore", 0));
104 v.Add(new Voltage("Voltage #2", 1, true));
105 v.Add(new Voltage("Voltage #3", 2, true));
106 v.Add(new Voltage("Voltage #4", 3, true));
107 v.Add(new Voltage("Voltage #5", 4, true));
108 v.Add(new Voltage("Voltage #6", 5, true));
109 v.Add(new Voltage("Voltage #7", 6, true));
110 v.Add(new Voltage("Voltage #8", 7, true));
111 v.Add(new Voltage("VBat", 8));
112 for (int i = 0; i < superIO.Temperatures.Length; i++)
113 t.Add(new Temperature("Temperature #" + (i + 1), i));
114 for (int i = 0; i < superIO.Fans.Length; i++)
115 f.Add(new Fan("Fan #" + (i + 1), i));
120 case Manufacturer.ASRock:
122 case Model.P55_Deluxe: // IT8720F
124 v.Add(new Voltage("CPU VCore", 0));
125 v.Add(new Voltage("+3.3V", 2));
126 v.Add(new Voltage("+12V", 4, 30, 10));
127 v.Add(new Voltage("+5V", 5, 6.8f, 10));
128 v.Add(new Voltage("VBat", 8));
129 t.Add(new Temperature("CPU", 0));
130 t.Add(new Temperature("Motherboard", 1));
131 f.Add(new Fan("CPU Fan", 0));
132 f.Add(new Fan("Chassis Fan #1", 1));
134 // this mutex is also used by the official ASRock tool
135 mutex = new Mutex(false, "ASRockOCMark");
137 bool exclusiveAccess = false;
139 exclusiveAccess = mutex.WaitOne(10, false);
140 } catch (AbandonedMutexException) { }
141 catch (InvalidOperationException) { }
143 // only read additional fans if we get exclusive access
144 if (exclusiveAccess) {
146 f.Add(new Fan("Chassis Fan #2", 2));
147 f.Add(new Fan("Chassis Fan #3", 3));
148 f.Add(new Fan("Power Fan", 4));
150 readFan = (index) => {
152 return superIO.Fans[index];
155 byte? gpio = superIO.ReadGPIO(7);
159 // read the last 3 fans based on GPIO 83-85
160 int[] masks = { 0x05, 0x03, 0x06 };
161 return (((gpio.Value >> 3) & 0x07) ==
162 masks[index - 2]) ? superIO.Fans[2] : null;
169 byte? gpio = superIO.ReadGPIO(7);
173 // prepare the GPIO 83-85 for the next update
174 int[] masks = { 0x05, 0x03, 0x06 };
176 (byte)((gpio.Value & 0xC7) | (masks[fanIndex] << 3)));
177 fanIndex = (fanIndex + 1) % 3;
183 v.Add(new Voltage("CPU VCore", 0));
184 v.Add(new Voltage("Voltage #2", 1, true));
185 v.Add(new Voltage("Voltage #3", 2, true));
186 v.Add(new Voltage("Voltage #4", 3, true));
187 v.Add(new Voltage("Voltage #5", 4, true));
188 v.Add(new Voltage("Voltage #6", 5, true));
189 v.Add(new Voltage("Voltage #7", 6, true));
190 v.Add(new Voltage("Voltage #8", 7, true));
191 v.Add(new Voltage("VBat", 8));
192 for (int i = 0; i < superIO.Temperatures.Length; i++)
193 t.Add(new Temperature("Temperature #" + (i + 1), i));
194 for (int i = 0; i < superIO.Fans.Length; i++)
195 f.Add(new Fan("Fan #" + (i + 1), i));
200 case Manufacturer.DFI:
202 case Model.LP_BI_P45_T2RS_Elite: // IT8718F
203 v.Add(new Voltage("CPU VCore", 0));
204 v.Add(new Voltage("FSB VTT", 1));
205 v.Add(new Voltage("+3.3V", 2));
206 v.Add(new Voltage("+5V", 3, 6.8f, 10));
207 v.Add(new Voltage("+12V", 4, 30, 10));
208 v.Add(new Voltage("NB Core", 5));
209 v.Add(new Voltage("VDIMM", 6));
210 v.Add(new Voltage("+5VSB", 7, 6.8f, 10));
211 v.Add(new Voltage("VBat", 8));
212 t.Add(new Temperature("CPU", 0));
213 t.Add(new Temperature("System", 1));
214 t.Add(new Temperature("Chipset", 2));
215 f.Add(new Fan("Fan #1", 0));
216 f.Add(new Fan("Fan #2", 1));
217 f.Add(new Fan("Fan #3", 2));
219 case Model.LP_DK_P55_T3eH9: // IT8720F
220 v.Add(new Voltage("CPU VCore", 0));
221 v.Add(new Voltage("VTT", 1));
222 v.Add(new Voltage("+3.3V", 2));
223 v.Add(new Voltage("+5V", 3, 6.8f, 10));
224 v.Add(new Voltage("+12V", 4, 30, 10));
225 v.Add(new Voltage("CPU PLL", 5));
226 v.Add(new Voltage("DRAM", 6));
227 v.Add(new Voltage("+5VSB", 7, 6.8f, 10));
228 v.Add(new Voltage("VBat", 8));
229 t.Add(new Temperature("Chipset", 0));
230 t.Add(new Temperature("CPU PWM", 1));
231 t.Add(new Temperature("CPU", 2));
232 f.Add(new Fan("Fan #1", 0));
233 f.Add(new Fan("Fan #2", 1));
234 f.Add(new Fan("Fan #3", 2));
237 v.Add(new Voltage("CPU VCore", 0));
238 v.Add(new Voltage("VTT", 1, true));
239 v.Add(new Voltage("+3.3V", 2, true));
240 v.Add(new Voltage("+5V", 3, 6.8f, 10, 0, true));
241 v.Add(new Voltage("+12V", 4, 30, 10, 0, true));
242 v.Add(new Voltage("Voltage #6", 5, true));
243 v.Add(new Voltage("DRAM", 6, true));
244 v.Add(new Voltage("+5VSB", 7, 6.8f, 10, 0, true));
245 v.Add(new Voltage("VBat", 8));
246 for (int i = 0; i < superIO.Temperatures.Length; i++)
247 t.Add(new Temperature("Temperature #" + (i + 1), i));
248 for (int i = 0; i < superIO.Fans.Length; i++)
249 f.Add(new Fan("Fan #" + (i + 1), i));
254 case Manufacturer.Gigabyte:
256 case Model._965P_S3: // IT8718F
257 v.Add(new Voltage("CPU VCore", 0));
258 v.Add(new Voltage("DRAM", 1));
259 v.Add(new Voltage("+3.3V", 2));
260 v.Add(new Voltage("+5V", 3, 6.8f, 10));
261 v.Add(new Voltage("+12V", 7, 27, 9.1f));
262 v.Add(new Voltage("VBat", 8));
263 t.Add(new Temperature("System", 0));
264 t.Add(new Temperature("CPU", 1));
265 f.Add(new Fan("CPU Fan", 0));
266 f.Add(new Fan("System Fan", 1));
268 case Model.EP45_DS3R: // IT8718F
269 case Model.EP45_UD3R:
271 v.Add(new Voltage("CPU VCore", 0));
272 v.Add(new Voltage("DRAM", 1));
273 v.Add(new Voltage("+3.3V", 2));
274 v.Add(new Voltage("+5V", 3, 6.8f, 10));
275 v.Add(new Voltage("+12V", 7, 27, 9.1f));
276 v.Add(new Voltage("VBat", 8));
277 t.Add(new Temperature("System", 0));
278 t.Add(new Temperature("CPU", 1));
279 f.Add(new Fan("CPU Fan", 0));
280 f.Add(new Fan("System Fan #2", 1));
281 f.Add(new Fan("Power Fan", 2));
282 f.Add(new Fan("System Fan #1", 3));
284 case Model.EX58_EXTREME: // IT8720F
285 v.Add(new Voltage("CPU VCore", 0));
286 v.Add(new Voltage("DRAM", 1));
287 v.Add(new Voltage("+5V", 3, 6.8f, 10));
288 v.Add(new Voltage("VBat", 8));
289 t.Add(new Temperature("System", 0));
290 t.Add(new Temperature("CPU", 1));
291 t.Add(new Temperature("Northbridge", 2));
292 f.Add(new Fan("CPU Fan", 0));
293 f.Add(new Fan("System Fan #2", 1));
294 f.Add(new Fan("Power Fan", 2));
295 f.Add(new Fan("System Fan #1", 3));
297 case Model.P35_DS3: // IT8718F
298 case Model.P35_DS3L: // IT8718F
299 v.Add(new Voltage("CPU VCore", 0));
300 v.Add(new Voltage("DRAM", 1));
301 v.Add(new Voltage("+3.3V", 2));
302 v.Add(new Voltage("+5V", 3, 6.8f, 10));
303 v.Add(new Voltage("+12V", 7, 27, 9.1f));
304 v.Add(new Voltage("VBat", 8));
305 t.Add(new Temperature("System", 0));
306 t.Add(new Temperature("CPU", 1));
307 f.Add(new Fan("CPU Fan", 0));
308 f.Add(new Fan("System Fan #1", 1));
309 f.Add(new Fan("System Fan #2", 2));
310 f.Add(new Fan("Power Fan", 3));
312 case Model.P55_UD4: // IT8720F
313 case Model.P55M_UD4: // IT8720F
314 v.Add(new Voltage("CPU VCore", 0));
315 v.Add(new Voltage("DRAM", 1));
316 v.Add(new Voltage("+3.3V", 2));
317 v.Add(new Voltage("+5V", 3, 6.8f, 10));
318 v.Add(new Voltage("+12V", 5, 27, 9.1f));
319 v.Add(new Voltage("VBat", 8));
320 t.Add(new Temperature("System", 0));
321 t.Add(new Temperature("CPU", 2));
322 f.Add(new Fan("CPU Fan", 0));
323 f.Add(new Fan("System Fan #2", 1));
324 f.Add(new Fan("Power Fan", 2));
325 f.Add(new Fan("System Fan #1", 3));
327 case Model.GA_MA770T_UD3: // IT8720F
328 v.Add(new Voltage("CPU VCore", 0));
329 v.Add(new Voltage("DRAM", 1));
330 v.Add(new Voltage("+3.3V", 2));
331 v.Add(new Voltage("+5V", 3, 6.8f, 10));
332 v.Add(new Voltage("+12V", 4, 27, 9.1f));
333 v.Add(new Voltage("VBat", 8));
334 t.Add(new Temperature("System", 0));
335 t.Add(new Temperature("CPU", 1));
336 f.Add(new Fan("CPU Fan", 0));
337 f.Add(new Fan("System Fan #1", 1));
338 f.Add(new Fan("System Fan #2", 2));
339 f.Add(new Fan("Power Fan", 3));
341 case Model.GA_MA785GMT_UD2H: // IT8718F
342 v.Add(new Voltage("CPU VCore", 0));
343 v.Add(new Voltage("DRAM", 1));
344 v.Add(new Voltage("+3.3V", 2));
345 v.Add(new Voltage("+5V", 3, 6.8f, 10));
346 v.Add(new Voltage("+12V", 4, 27, 9.1f));
347 v.Add(new Voltage("VBat", 8));
348 t.Add(new Temperature("System", 0));
349 t.Add(new Temperature("CPU", 1));
350 f.Add(new Fan("CPU Fan", 0));
351 f.Add(new Fan("System Fan", 1));
352 f.Add(new Fan("NB Fan", 2));
354 case Model.X58A_UD3R: // IT8720F
355 v.Add(new Voltage("CPU VCore", 0));
356 v.Add(new Voltage("DRAM", 1));
357 v.Add(new Voltage("+3.3V", 2));
358 v.Add(new Voltage("+5V", 3, 6.8f, 10));
359 v.Add(new Voltage("+12V", 5, 27, 9.1f));
360 v.Add(new Voltage("VBat", 8));
361 t.Add(new Temperature("System", 0));
362 t.Add(new Temperature("CPU", 1));
363 t.Add(new Temperature("Northbridge", 2));
364 f.Add(new Fan("CPU Fan", 0));
365 f.Add(new Fan("System Fan #2", 1));
366 f.Add(new Fan("Power Fan", 2));
367 f.Add(new Fan("System Fan #1", 3));
370 v.Add(new Voltage("CPU VCore", 0));
371 v.Add(new Voltage("DRAM", 1, true));
372 v.Add(new Voltage("+3.3V", 2, true));
373 v.Add(new Voltage("+5V", 3, 6.8f, 10, 0, true));
374 v.Add(new Voltage("Voltage #5", 4, true));
375 v.Add(new Voltage("Voltage #6", 5, true));
376 v.Add(new Voltage("Voltage #7", 6, true));
377 v.Add(new Voltage("Voltage #8", 7, true));
378 v.Add(new Voltage("VBat", 8));
379 for (int i = 0; i < superIO.Temperatures.Length; i++)
380 t.Add(new Temperature("Temperature #" + (i + 1), i));
381 for (int i = 0; i < superIO.Fans.Length; i++)
382 f.Add(new Fan("Fan #" + (i + 1), i));
388 v.Add(new Voltage("CPU VCore", 0));
389 v.Add(new Voltage("Voltage #2", 1, true));
390 v.Add(new Voltage("Voltage #3", 2, true));
391 v.Add(new Voltage("Voltage #4", 3, true));
392 v.Add(new Voltage("Voltage #5", 4, true));
393 v.Add(new Voltage("Voltage #6", 5, true));
394 v.Add(new Voltage("Voltage #7", 6, true));
395 v.Add(new Voltage("Voltage #8", 7, true));
396 v.Add(new Voltage("VBat", 8));
397 for (int i = 0; i < superIO.Temperatures.Length; i++)
398 t.Add(new Temperature("Temperature #" + (i + 1), i));
399 for (int i = 0; i < superIO.Fans.Length; i++)
400 f.Add(new Fan("Fan #" + (i + 1), i));
409 switch (manufacturer) {
410 case Manufacturer.ECS:
412 case Model.A890GXM_A: // IT8721F
413 v.Add(new Voltage("CPU VCore", 0));
414 v.Add(new Voltage("VDIMM", 1));
415 v.Add(new Voltage("NB Voltage", 2));
416 v.Add(new Voltage("Analog +3.3V", 3, 10, 10));
417 // v.Add(new Voltage("VDIMM", 6, true));
418 v.Add(new Voltage("Standby +3.3V", 7, 10, 10));
419 v.Add(new Voltage("VBat", 8, 10, 10));
420 t.Add(new Temperature("CPU", 0));
421 t.Add(new Temperature("System", 1));
422 t.Add(new Temperature("Northbridge", 2));
423 f.Add(new Fan("CPU Fan", 0));
424 f.Add(new Fan("System Fan", 1));
425 f.Add(new Fan("Power Fan", 2));
428 v.Add(new Voltage("Voltage #1", 0, true));
429 v.Add(new Voltage("Voltage #2", 1, true));
430 v.Add(new Voltage("Voltage #3", 2, true));
431 v.Add(new Voltage("Analog +3.3V", 3, 10, 10, 0, true));
432 v.Add(new Voltage("Voltage #5", 4, true));
433 v.Add(new Voltage("Voltage #6", 5, true));
434 v.Add(new Voltage("Voltage #7", 6, true));
435 v.Add(new Voltage("Standby +3.3V", 7, 10, 10, 0, true));
436 v.Add(new Voltage("VBat", 8, 10, 10));
437 for (int i = 0; i < superIO.Temperatures.Length; i++)
438 t.Add(new Temperature("Temperature #" + (i + 1), i));
439 for (int i = 0; i < superIO.Fans.Length; i++)
440 f.Add(new Fan("Fan #" + (i + 1), i));
444 case Manufacturer.Gigabyte:
446 case Model.P67A_UD4_B3: // IT8728F
447 v.Add(new Voltage("+12V", 0, 100, 10));
448 v.Add(new Voltage("+5V", 1, 15, 10));
449 v.Add(new Voltage("Voltage #3", 2, true));
450 v.Add(new Voltage("Voltage #4", 3, true));
451 v.Add(new Voltage("Voltage #5", 4, true));
452 v.Add(new Voltage("CPU VCore", 5));
453 v.Add(new Voltage("DRAM", 6));
454 v.Add(new Voltage("Standby +3.3V", 7, 10, 10));
455 v.Add(new Voltage("VBat", 8, 10, 10));
456 t.Add(new Temperature("System", 0));
457 t.Add(new Temperature("CPU", 2));
458 f.Add(new Fan("CPU Fan", 0));
459 f.Add(new Fan("System Fan #2", 1));
460 f.Add(new Fan("Power Fan", 2));
461 f.Add(new Fan("System Fan #1", 3));
463 case Model.H67A_UD3H_B3: // IT8728F
464 v.Add(new Voltage("VTT", 0));
465 v.Add(new Voltage("+5V", 1, 15, 10));
466 v.Add(new Voltage("+12V", 2, 68, 22));
467 v.Add(new Voltage("Voltage #4", 3, true));
468 v.Add(new Voltage("Voltage #5", 4, true));
469 v.Add(new Voltage("CPU VCore", 5));
470 v.Add(new Voltage("DRAM", 6));
471 v.Add(new Voltage("Standby +3.3V", 7, 10, 10));
472 v.Add(new Voltage("VBat", 8, 10, 10));
473 t.Add(new Temperature("System", 0));
474 t.Add(new Temperature("CPU", 2));
475 f.Add(new Fan("CPU Fan", 0));
476 f.Add(new Fan("System Fan #1", 1));
477 f.Add(new Fan("Power Fan", 2));
478 f.Add(new Fan("System Fan #2", 3));
480 case Model.Z68X_UD7_B3: // IT8728F
481 v.Add(new Voltage("VTT", 0));
482 v.Add(new Voltage("+3.3V", 1, 13.3f, 20.5f));
483 v.Add(new Voltage("+12V", 2, 68, 22));
484 v.Add(new Voltage("+5V", 3, 14.3f, 20));
485 v.Add(new Voltage("CPU VCore", 5));
486 v.Add(new Voltage("DRAM", 6));
487 v.Add(new Voltage("Standby +3.3V", 7, 10, 10));
488 v.Add(new Voltage("VBat", 8, 10, 10));
489 t.Add(new Temperature("System", 0));
490 t.Add(new Temperature("CPU", 1));
491 t.Add(new Temperature("System 3", 2));
492 f.Add(new Fan("CPU Fan", 0));
493 f.Add(new Fan("Power Fan", 1));
494 f.Add(new Fan("System Fan #1", 2));
495 f.Add(new Fan("System Fan #2", 3));
496 f.Add(new Fan("System Fan #3", 4));
499 v.Add(new Voltage("Voltage #1", 0, true));
500 v.Add(new Voltage("Voltage #2", 1, true));
501 v.Add(new Voltage("Voltage #3", 2, true));
502 v.Add(new Voltage("Voltage #4", 3, true));
503 v.Add(new Voltage("Voltage #5", 4, true));
504 v.Add(new Voltage("Voltage #6", 5, true));
505 v.Add(new Voltage("Voltage #7", 6, true));
506 v.Add(new Voltage("Standby +3.3V", 7, 10, 10, 0, true));
507 v.Add(new Voltage("VBat", 8, 10, 10));
508 for (int i = 0; i < superIO.Temperatures.Length; i++)
509 t.Add(new Temperature("Temperature #" + (i + 1), i));
510 for (int i = 0; i < superIO.Fans.Length; i++)
511 f.Add(new Fan("Fan #" + (i + 1), i));
515 case Manufacturer.Shuttle:
517 case Model.FH67: // IT8772E
518 v.Add(new Voltage("CPU VCore", 0));
519 v.Add(new Voltage("DRAM", 1));
520 v.Add(new Voltage("PCH VCCIO", 2));
521 v.Add(new Voltage("CPU VCCIO", 3));
522 v.Add(new Voltage("Graphic Voltage", 4));
523 v.Add(new Voltage("Standby +3.3V", 7, 10, 10));
524 v.Add(new Voltage("VBat", 8, 10, 10));
525 t.Add(new Temperature("System", 0));
526 t.Add(new Temperature("CPU", 1));
527 f.Add(new Fan("Fan #1", 0));
528 f.Add(new Fan("CPU Fan", 1));
531 v.Add(new Voltage("Voltage #1", 0, true));
532 v.Add(new Voltage("Voltage #2", 1, true));
533 v.Add(new Voltage("Voltage #3", 2, true));
534 v.Add(new Voltage("Voltage #4", 3, true));
535 v.Add(new Voltage("Voltage #5", 4, true));
536 v.Add(new Voltage("Voltage #6", 5, true));
537 v.Add(new Voltage("Voltage #7", 6, true));
538 v.Add(new Voltage("Standby +3.3V", 7, 10, 10, 0, true));
539 v.Add(new Voltage("VBat", 8, 10, 10));
540 for (int i = 0; i < superIO.Temperatures.Length; i++)
541 t.Add(new Temperature("Temperature #" + (i + 1), i));
542 for (int i = 0; i < superIO.Fans.Length; i++)
543 f.Add(new Fan("Fan #" + (i + 1), i));
548 v.Add(new Voltage("Voltage #1", 0, true));
549 v.Add(new Voltage("Voltage #2", 1, true));
550 v.Add(new Voltage("Voltage #3", 2, true));
551 v.Add(new Voltage("Voltage #4", 3, true));
552 v.Add(new Voltage("Voltage #5", 4, true));
553 v.Add(new Voltage("Voltage #6", 5, true));
554 v.Add(new Voltage("Voltage #7", 6, true));
555 v.Add(new Voltage("Standby +3.3V", 7, 10, 10, 0, true));
556 v.Add(new Voltage("VBat", 8, 10, 10));
557 for (int i = 0; i < superIO.Temperatures.Length; i++)
558 t.Add(new Temperature("Temperature #" + (i + 1), i));
559 for (int i = 0; i < superIO.Fans.Length; i++)
560 f.Add(new Fan("Fan #" + (i + 1), i));
566 v.Add(new Voltage("VCC3V", 0, 150, 150));
567 v.Add(new Voltage("VSB3V", 1, 150, 150));
568 v.Add(new Voltage("Battery", 2, 150, 150));
569 for (int i = 0; i < superIO.Temperatures.Length; i++)
570 t.Add(new Temperature("Temperature #" + (i + 1), i));
571 for (int i = 0; i < superIO.Fans.Length; i++)
572 f.Add(new Fan("Fan #" + (i + 1), i));
581 switch (manufacturer) {
582 case Manufacturer.EVGA:
584 case Model.X58_SLI_Classified: // F71882
585 v.Add(new Voltage("VCC3V", 0, 150, 150));
586 v.Add(new Voltage("CPU VCore", 1, 47, 100));
587 v.Add(new Voltage("DIMM", 2, 47, 100));
588 v.Add(new Voltage("CPU VTT", 3, 24, 100));
589 v.Add(new Voltage("IOH Vcore", 4, 24, 100));
590 v.Add(new Voltage("+5V", 5, 51, 12));
591 v.Add(new Voltage("+12V", 6, 56, 6.8f));
592 v.Add(new Voltage("3VSB", 7, 150, 150));
593 v.Add(new Voltage("VBat", 8, 150, 150));
594 t.Add(new Temperature("CPU", 0));
595 t.Add(new Temperature("VREG", 1));
596 t.Add(new Temperature("System", 2));
597 f.Add(new Fan("CPU Fan", 0));
598 f.Add(new Fan("Power Fan", 1));
599 f.Add(new Fan("Chassis Fan", 2));
602 v.Add(new Voltage("VCC3V", 0, 150, 150));
603 v.Add(new Voltage("CPU VCore", 1));
604 v.Add(new Voltage("Voltage #3", 2, true));
605 v.Add(new Voltage("Voltage #4", 3, true));
606 v.Add(new Voltage("Voltage #5", 4, true));
607 v.Add(new Voltage("Voltage #6", 5, true));
608 v.Add(new Voltage("Voltage #7", 6, true));
609 v.Add(new Voltage("VSB3V", 7, 150, 150));
610 v.Add(new Voltage("VBat", 8, 150, 150));
611 for (int i = 0; i < superIO.Temperatures.Length; i++)
612 t.Add(new Temperature("Temperature #" + (i + 1), i));
613 for (int i = 0; i < superIO.Fans.Length; i++)
614 f.Add(new Fan("Fan #" + (i + 1), i));
619 v.Add(new Voltage("VCC3V", 0, 150, 150));
620 v.Add(new Voltage("CPU VCore", 1));
621 v.Add(new Voltage("Voltage #3", 2, true));
622 v.Add(new Voltage("Voltage #4", 3, true));
623 v.Add(new Voltage("Voltage #5", 4, true));
624 v.Add(new Voltage("Voltage #6", 5, true));
625 if (superIO.Chip != Chip.F71808E)
626 v.Add(new Voltage("Voltage #7", 6, true));
627 v.Add(new Voltage("VSB3V", 7, 150, 150));
628 v.Add(new Voltage("VBat", 8, 150, 150));
629 for (int i = 0; i < superIO.Temperatures.Length; i++)
630 t.Add(new Temperature("Temperature #" + (i + 1), i));
631 for (int i = 0; i < superIO.Fans.Length; i++)
632 f.Add(new Fan("Fan #" + (i + 1), i));
638 switch (manufacturer) {
639 case Manufacturer.ASRock:
641 case Model.AOD790GX_128M: // W83627EHF
642 v.Add(new Voltage("CPU VCore", 0));
643 v.Add(new Voltage("Analog +3.3V", 2, 34, 34));
644 v.Add(new Voltage("+3.3V", 4, 10, 10));
645 v.Add(new Voltage("+5V", 5, 20, 10));
646 v.Add(new Voltage("+12V", 6, 28, 5));
647 v.Add(new Voltage("Standby +3.3V", 7, 34, 34));
648 v.Add(new Voltage("VBAT", 8, 34, 34));
649 t.Add(new Temperature("CPU", 0));
650 t.Add(new Temperature("Motherboard", 2));
651 f.Add(new Fan("CPU Fan", 0));
652 f.Add(new Fan("Chassis Fan", 1));
655 v.Add(new Voltage("CPU VCore", 0));
656 v.Add(new Voltage("Voltage #2", 1, true));
657 v.Add(new Voltage("AVCC", 2, 34, 34));
658 v.Add(new Voltage("3VCC", 3, 34, 34));
659 v.Add(new Voltage("Voltage #5", 4, true));
660 v.Add(new Voltage("Voltage #6", 5, true));
661 v.Add(new Voltage("Voltage #7", 6, true));
662 v.Add(new Voltage("3VSB", 7, 34, 34));
663 v.Add(new Voltage("VBAT", 8, 34, 34));
664 v.Add(new Voltage("Voltage #10", 9, true));
665 t.Add(new Temperature("CPU", 0));
666 t.Add(new Temperature("Auxiliary", 1));
667 t.Add(new Temperature("System", 2));
668 f.Add(new Fan("System Fan", 0));
669 f.Add(new Fan("CPU Fan", 1));
670 f.Add(new Fan("Auxiliary Fan", 2));
671 f.Add(new Fan("CPU Fan #2", 3));
672 f.Add(new Fan("Auxiliary Fan #2", 4));
676 v.Add(new Voltage("CPU VCore", 0));
677 v.Add(new Voltage("Voltage #2", 1, true));
678 v.Add(new Voltage("AVCC", 2, 34, 34));
679 v.Add(new Voltage("3VCC", 3, 34, 34));
680 v.Add(new Voltage("Voltage #5", 4, true));
681 v.Add(new Voltage("Voltage #6", 5, true));
682 v.Add(new Voltage("Voltage #7", 6, true));
683 v.Add(new Voltage("3VSB", 7, 34, 34));
684 v.Add(new Voltage("VBAT", 8, 34, 34));
685 v.Add(new Voltage("Voltage #10", 9, true));
686 t.Add(new Temperature("CPU", 0));
687 t.Add(new Temperature("Auxiliary", 1));
688 t.Add(new Temperature("System", 2));
689 f.Add(new Fan("System Fan", 0));
690 f.Add(new Fan("CPU Fan", 1));
691 f.Add(new Fan("Auxiliary Fan", 2));
692 f.Add(new Fan("CPU Fan #2", 3));
693 f.Add(new Fan("Auxiliary Fan #2", 4));
698 case Chip.W83627DHGP:
701 switch (manufacturer) {
702 case Manufacturer.ASRock:
704 case Model._880GMH_USB3: // W83627DHG-P
705 v.Add(new Voltage("CPU VCore", 0));
706 v.Add(new Voltage("+3.3V", 3, 34, 34));
707 v.Add(new Voltage("+5V", 5, 15, 7.5f));
708 v.Add(new Voltage("+12V", 6, 56, 10));
709 v.Add(new Voltage("Standby +3.3V", 7, 34, 34));
710 v.Add(new Voltage("VBAT", 8, 34, 34));
711 t.Add(new Temperature("CPU", 0));
712 t.Add(new Temperature("Motherboard", 2));
713 f.Add(new Fan("Chassis Fan", 0));
714 f.Add(new Fan("CPU Fan", 1));
715 f.Add(new Fan("Power Fan", 2));
718 v.Add(new Voltage("CPU VCore", 0));
719 v.Add(new Voltage("Voltage #2", 1, true));
720 v.Add(new Voltage("AVCC", 2, 34, 34));
721 v.Add(new Voltage("3VCC", 3, 34, 34));
722 v.Add(new Voltage("Voltage #5", 4, true));
723 v.Add(new Voltage("Voltage #6", 5, true));
724 v.Add(new Voltage("Voltage #7", 6, true));
725 v.Add(new Voltage("3VSB", 7, 34, 34));
726 v.Add(new Voltage("VBAT", 8, 34, 34));
727 t.Add(new Temperature("CPU", 0));
728 t.Add(new Temperature("Auxiliary", 1));
729 t.Add(new Temperature("System", 2));
730 f.Add(new Fan("System Fan", 0));
731 f.Add(new Fan("CPU Fan", 1));
732 f.Add(new Fan("Auxiliary Fan", 2));
733 f.Add(new Fan("CPU Fan #2", 3));
734 f.Add(new Fan("Auxiliary Fan #2", 4));
738 case Manufacturer.ASUS:
740 case Model.P6T: // W83667HG
741 case Model.P6X58D_E: // W83667HG
742 case Model.Rampage_II_GENE: // W83667HG
743 v.Add(new Voltage("CPU VCore", 0));
744 v.Add(new Voltage("+12V", 1, 11.5f, 1.91f));
745 v.Add(new Voltage("Analog +3.3V", 2, 34, 34));
746 v.Add(new Voltage("+3.3V", 3, 34, 34));
747 v.Add(new Voltage("+5V", 4, 15, 7.5f));
748 v.Add(new Voltage("Standby +3.3V", 7, 34, 34));
749 v.Add(new Voltage("VBAT", 8, 34, 34));
750 t.Add(new Temperature("CPU", 0));
751 t.Add(new Temperature("Motherboard", 2));
752 f.Add(new Fan("Chassis Fan #1", 0));
753 f.Add(new Fan("CPU Fan", 1));
754 f.Add(new Fan("Power Fan", 2));
755 f.Add(new Fan("Chassis Fan #2", 3));
756 f.Add(new Fan("Chassis Fan #3", 4));
758 case Model.Rampage_Extreme: // W83667HG
759 v.Add(new Voltage("CPU VCore", 0));
760 v.Add(new Voltage("+12V", 1, 12, 2));
761 v.Add(new Voltage("Analog +3.3V", 2, 34, 34));
762 v.Add(new Voltage("+3.3V", 3, 34, 34));
763 v.Add(new Voltage("+5V", 4, 15, 7.5f));
764 v.Add(new Voltage("Standby +3.3V", 7, 34, 34));
765 v.Add(new Voltage("VBAT", 8, 34, 34));
766 t.Add(new Temperature("CPU", 0));
767 t.Add(new Temperature("Motherboard", 2));
768 f.Add(new Fan("Chassis Fan #1", 0));
769 f.Add(new Fan("CPU Fan", 1));
770 f.Add(new Fan("Power Fan", 2));
771 f.Add(new Fan("Chassis Fan #2", 3));
772 f.Add(new Fan("Chassis Fan #3", 4));
775 v.Add(new Voltage("CPU VCore", 0));
776 v.Add(new Voltage("Voltage #2", 1, true));
777 v.Add(new Voltage("AVCC", 2, 34, 34));
778 v.Add(new Voltage("3VCC", 3, 34, 34));
779 v.Add(new Voltage("Voltage #5", 4, true));
780 v.Add(new Voltage("Voltage #6", 5, true));
781 v.Add(new Voltage("Voltage #7", 6, true));
782 v.Add(new Voltage("3VSB", 7, 34, 34));
783 v.Add(new Voltage("VBAT", 8, 34, 34));
784 t.Add(new Temperature("CPU", 0));
785 t.Add(new Temperature("Auxiliary", 1));
786 t.Add(new Temperature("System", 2));
787 f.Add(new Fan("System Fan", 0));
788 f.Add(new Fan("CPU Fan", 1));
789 f.Add(new Fan("Auxiliary Fan", 2));
790 f.Add(new Fan("CPU Fan #2", 3));
791 f.Add(new Fan("Auxiliary Fan #2", 4));
796 v.Add(new Voltage("CPU VCore", 0));
797 v.Add(new Voltage("Voltage #2", 1, true));
798 v.Add(new Voltage("AVCC", 2, 34, 34));
799 v.Add(new Voltage("3VCC", 3, 34, 34));
800 v.Add(new Voltage("Voltage #5", 4, true));
801 v.Add(new Voltage("Voltage #6", 5, true));
802 v.Add(new Voltage("Voltage #7", 6, true));
803 v.Add(new Voltage("3VSB", 7, 34, 34));
804 v.Add(new Voltage("VBAT", 8, 34, 34));
805 t.Add(new Temperature("CPU", 0));
806 t.Add(new Temperature("Auxiliary", 1));
807 t.Add(new Temperature("System", 2));
808 f.Add(new Fan("System Fan", 0));
809 f.Add(new Fan("CPU Fan", 1));
810 f.Add(new Fan("Auxiliary Fan", 2));
811 f.Add(new Fan("CPU Fan #2", 3));
812 f.Add(new Fan("Auxiliary Fan #2", 4));
819 v.Add(new Voltage("CPU VCore", 0));
820 v.Add(new Voltage("Voltage #2", 1, true));
821 v.Add(new Voltage("Voltage #3", 2, true));
822 v.Add(new Voltage("AVCC", 3, 34, 51));
823 v.Add(new Voltage("Voltage #5", 4, true));
824 v.Add(new Voltage("5VSB", 5, 34, 51));
825 v.Add(new Voltage("VBAT", 6));
826 t.Add(new Temperature("CPU", 0));
827 t.Add(new Temperature("Auxiliary", 1));
828 t.Add(new Temperature("System", 2));
829 f.Add(new Fan("System Fan", 0));
830 f.Add(new Fan("CPU Fan", 1));
831 f.Add(new Fan("Auxiliary Fan", 2));
835 switch (manufacturer) {
836 case Manufacturer.ASUS:
838 case Model.P8P67: // NCT6776F
839 case Model.P8P67_EVO: // NCT6776F
840 case Model.P8P67_PRO: // NCT6776F
841 v.Add(new Voltage("CPU VCore", 0));
842 v.Add(new Voltage("+12V", 1, 11, 1));
843 v.Add(new Voltage("Analog +3.3V", 2, 34, 34));
844 v.Add(new Voltage("+3.3V", 3, 34, 34));
845 v.Add(new Voltage("+5V", 4, 12, 3));
846 v.Add(new Voltage("Standby +3.3V", 7, 34, 34));
847 v.Add(new Voltage("VBAT", 8, 34, 34));
848 t.Add(new Temperature("CPU", 0));
849 t.Add(new Temperature("Auxiliary", 2));
850 t.Add(new Temperature("Motherboard", 3));
851 f.Add(new Fan("Chassis Fan #1", 0));
852 f.Add(new Fan("CPU Fan", 1));
853 f.Add(new Fan("Power Fan", 2));
854 f.Add(new Fan("Chassis Fan #2", 3));
855 c.Add(new Ctrl("Chassis Fan #2", 0));
856 c.Add(new Ctrl("CPU Fan", 1));
857 c.Add(new Ctrl("Chassis Fan #1", 2));
859 case Model.P8P67_M_PRO: // NCT6776F
860 v.Add(new Voltage("CPU VCore", 0));
861 v.Add(new Voltage("+12V", 1, 11, 1));
862 v.Add(new Voltage("Analog +3.3V", 2, 34, 34));
863 v.Add(new Voltage("+3.3V", 3, 34, 34));
864 v.Add(new Voltage("+5V", 4, 12, 3));
865 v.Add(new Voltage("Voltage #6", 5, true));
866 v.Add(new Voltage("Voltage #7", 6, true));
867 v.Add(new Voltage("Standby +3.3V", 7, 34, 34));
868 v.Add(new Voltage("VBAT", 8, 34, 34));
869 t.Add(new Temperature("CPU", 0));
870 t.Add(new Temperature("Motherboard", 3));
871 f.Add(new Fan("Chassis Fan #1", 0));
872 f.Add(new Fan("CPU Fan", 1));
873 f.Add(new Fan("Chassis Fan #2", 2));
874 f.Add(new Fan("Power Fan", 3));
875 f.Add(new Fan("Auxiliary Fan", 4));
877 case Model.P8Z68_V_PRO: // NCT6776F
878 v.Add(new Voltage("CPU VCore", 0));
879 v.Add(new Voltage("+12V", 1, 11, 1));
880 v.Add(new Voltage("Analog +3.3V", 2, 34, 34));
881 v.Add(new Voltage("+3.3V", 3, 34, 34));
882 v.Add(new Voltage("+5V", 4, 12, 3));
883 v.Add(new Voltage("Standby +3.3V", 7, 34, 34));
884 v.Add(new Voltage("VBAT", 8, 34, 34));
885 t.Add(new Temperature("CPU", 0));
886 t.Add(new Temperature("Auxiliary", 2));
887 t.Add(new Temperature("Motherboard", 3));
888 for (int i = 0; i < superIO.Fans.Length; i++)
889 f.Add(new Fan("Fan #" + (i + 1), i));
890 for (int i = 0; i < superIO.Controls.Length; i++)
891 c.Add(new Ctrl("Fan #" + (i + 1), i));
893 case Model.P9X79: // NCT6776F
894 v.Add(new Voltage("CPU VCore", 0));
895 v.Add(new Voltage("+12V", 1, 11, 1));
896 v.Add(new Voltage("Analog +3.3V", 2, 34, 34));
897 v.Add(new Voltage("+3.3V", 3, 34, 34));
898 v.Add(new Voltage("+5V", 4, 12, 3));
899 v.Add(new Voltage("Standby +3.3V", 7, 34, 34));
900 v.Add(new Voltage("VBAT", 8, 34, 34));
901 t.Add(new Temperature("CPU", 0));
902 t.Add(new Temperature("Motherboard", 3));
903 for (int i = 0; i < superIO.Fans.Length; i++)
904 f.Add(new Fan("Fan #" + (i + 1), i));
907 v.Add(new Voltage("CPU VCore", 0));
908 v.Add(new Voltage("Voltage #2", 1, true));
909 v.Add(new Voltage("AVCC", 2, 34, 34));
910 v.Add(new Voltage("3VCC", 3, 34, 34));
911 v.Add(new Voltage("Voltage #5", 4, true));
912 v.Add(new Voltage("Voltage #6", 5, true));
913 v.Add(new Voltage("Voltage #7", 6, true));
914 v.Add(new Voltage("3VSB", 7, 34, 34));
915 v.Add(new Voltage("VBAT", 8, 34, 34));
916 t.Add(new Temperature("CPU Core", 0));
917 t.Add(new Temperature("Temperature #1", 1));
918 t.Add(new Temperature("Temperature #2", 2));
919 t.Add(new Temperature("Temperature #3", 3));
920 for (int i = 0; i < superIO.Fans.Length; i++)
921 f.Add(new Fan("Fan #" + (i + 1), i));
926 v.Add(new Voltage("CPU VCore", 0));
927 v.Add(new Voltage("Voltage #2", 1, true));
928 v.Add(new Voltage("AVCC", 2, 34, 34));
929 v.Add(new Voltage("3VCC", 3, 34, 34));
930 v.Add(new Voltage("Voltage #5", 4, true));
931 v.Add(new Voltage("Voltage #6", 5, true));
932 v.Add(new Voltage("Voltage #7", 6, true));
933 v.Add(new Voltage("3VSB", 7, 34, 34));
934 v.Add(new Voltage("VBAT", 8, 34, 34));
935 t.Add(new Temperature("CPU Core", 0));
936 t.Add(new Temperature("Temperature #1", 1));
937 t.Add(new Temperature("Temperature #2", 2));
938 t.Add(new Temperature("Temperature #3", 3));
939 for (int i = 0; i < superIO.Fans.Length; i++)
940 f.Add(new Fan("Fan #" + (i + 1), i));
945 v.Add(new Voltage("CPU VCore", 0));
946 v.Add(new Voltage("Voltage #2", 1, true));
947 v.Add(new Voltage("AVCC", 2, 34, 34));
948 v.Add(new Voltage("3VCC", 3, 34, 34));
949 v.Add(new Voltage("Voltage #5", 4, true));
950 v.Add(new Voltage("Voltage #6", 5, true));
951 v.Add(new Voltage("Voltage #7", 6, true));
952 v.Add(new Voltage("3VSB", 7, 34, 34));
953 v.Add(new Voltage("VBAT", 8, 34, 34));
954 v.Add(new Voltage("VTT", 9));
955 v.Add(new Voltage("Voltage #11", 10, true));
956 v.Add(new Voltage("Voltage #12", 11, true));
957 v.Add(new Voltage("Voltage #13", 12, true));
958 v.Add(new Voltage("Voltage #14", 13, true));
959 v.Add(new Voltage("Voltage #15", 14, true));
960 t.Add(new Temperature("CPU Core", 0));
961 t.Add(new Temperature("Temperature #1", 1));
962 t.Add(new Temperature("Temperature #2", 2));
963 t.Add(new Temperature("Temperature #3", 3));
964 t.Add(new Temperature("Temperature #4", 4));
965 t.Add(new Temperature("Temperature #5", 5));
966 t.Add(new Temperature("Temperature #6", 6));
967 for (int i = 0; i < superIO.Fans.Length; i++)
968 f.Add(new Fan("Fan #" + (i + 1), i));
969 for (int i = 0; i < superIO.Controls.Length; i++)
970 c.Add(new Ctrl("Fan Control #" + (i + 1), i));
973 for (int i = 0; i < superIO.Voltages.Length; i++)
974 v.Add(new Voltage("Voltage #" + (i + 1), i, true));
975 for (int i = 0; i < superIO.Temperatures.Length; i++)
976 t.Add(new Temperature("Temperature #" + (i + 1), i));
977 for (int i = 0; i < superIO.Fans.Length; i++)
978 f.Add(new Fan("Fan #" + (i + 1), i));
979 for (int i = 0; i < superIO.Controls.Length; i++)
980 c.Add(new Ctrl("Fan Control #" + (i + 1), i));
984 const string formula = "Voltage = value + (value - Vf) * Ri / Rf.";
985 foreach (Voltage voltage in v)
986 if (voltage.Index < superIO.Voltages.Length) {
987 Sensor sensor = new Sensor(voltage.Name, voltage.Index,
988 voltage.Hidden, SensorType.Voltage, this, new [] {
989 new ParameterDescription("Ri [kΩ]", "Input resistance.\n" +
990 formula, voltage.Ri),
991 new ParameterDescription("Rf [kΩ]", "Reference resistance.\n" +
992 formula, voltage.Rf),
993 new ParameterDescription("Vf [V]", "Reference voltage.\n" +
996 voltages.Add(sensor);
999 foreach (Temperature temperature in t)
1000 if (temperature.Index < superIO.Temperatures.Length) {
1001 Sensor sensor = new Sensor(temperature.Name, temperature.Index,
1002 SensorType.Temperature, this, new [] {
1003 new ParameterDescription("Offset [°C]", "Temperature offset.", 0)
1005 temperatures.Add(sensor);
1008 foreach (Fan fan in f)
1009 if (fan.Index < superIO.Fans.Length) {
1010 Sensor sensor = new Sensor(fan.Name, fan.Index, SensorType.Fan,
1015 foreach (Ctrl ctrl in c) {
1016 int index = ctrl.Index;
1017 if (index < superIO.Controls.Length) {
1018 Sensor sensor = new Sensor(ctrl.Name, index, SensorType.Control,
1020 Control control = new Control(sensor, settings, 0, 100);
1021 control.ControlModeChanged += (cc) => {
1022 if (cc.ControlMode == ControlMode.Default) {
1023 superIO.SetControl(index, null);
1025 superIO.SetControl(index, (byte)(cc.SoftwareValue * 2.55));
1028 control.SoftwareControlValueChanged += (cc) => {
1029 if (cc.ControlMode == ControlMode.Software)
1030 superIO.SetControl(index, (byte)(cc.SoftwareValue * 2.55));
1032 if (control.ControlMode == ControlMode.Software)
1033 superIO.SetControl(index, (byte)(control.SoftwareValue * 2.55));
1034 sensor.Control = control;
1035 controls.Add(sensor);
1040 public override HardwareType HardwareType {
1041 get { return HardwareType.SuperIO; }
1044 public override IHardware Parent {
1045 get { return mainboard; }
1049 public override string GetReport() {
1050 return superIO.GetReport();
1053 public override void Update() {
1056 foreach (Sensor sensor in voltages) {
1057 float? value = readVoltage(sensor.Index);
1058 if (value.HasValue) {
1059 sensor.Value = value + (value - sensor.Parameters[2].Value) *
1060 sensor.Parameters[0].Value / sensor.Parameters[1].Value;
1061 ActivateSensor(sensor);
1065 foreach (Sensor sensor in temperatures) {
1066 float? value = readTemperature(sensor.Index);
1067 if (value.HasValue) {
1068 sensor.Value = value + sensor.Parameters[0].Value;
1069 ActivateSensor(sensor);
1073 foreach (Sensor sensor in fans) {
1074 float? value = readFan(sensor.Index);
1075 if (value.HasValue) {
1076 sensor.Value = value;
1077 if (value.Value > 0)
1078 ActivateSensor(sensor);
1082 foreach (Sensor sensor in controls) {
1083 float? value = readControl(sensor.Index);
1084 if (value.HasValue) {
1085 sensor.Value = value;
1086 ActivateSensor(sensor);
1093 public override void Close() {
1094 foreach (Sensor sensor in controls) {
1095 // restore all controls back to default
1096 superIO.SetControl(sensor.Index, null);
1101 private class Voltage {
1102 public readonly string Name;
1103 public readonly int Index;
1104 public readonly float Ri;
1105 public readonly float Rf;
1106 public readonly float Vf;
1107 public readonly bool Hidden;
1109 public Voltage(string name, int index) :
1110 this(name, index, false) { }
1112 public Voltage(string name, int index, bool hidden) :
1113 this(name, index, 0, 1, 0, hidden) { }
1115 public Voltage(string name, int index, float ri, float rf) :
1116 this(name, index, ri, rf, 0, false) { }
1118 // float ri = 0, float rf = 1, float vf = 0, bool hidden = false)
1120 public Voltage(string name, int index,
1121 float ri, float rf, float vf, bool hidden)
1128 this.Hidden = hidden;
1132 private class Temperature {
1133 public readonly string Name;
1134 public readonly int Index;
1136 public Temperature(string name, int index) {
1143 public readonly string Name;
1144 public readonly int Index;
1146 public Fan(string name, int index) {
1152 private class Ctrl {
1153 public readonly string Name;
1154 public readonly int Index;
1156 public Ctrl(string name, int index) {