3 Version: MPL 1.1/GPL 2.0/LGPL 2.1
5 The contents of this file are subject to the Mozilla Public License Version
6 1.1 (the "License"); you may not use this file except in compliance with
7 the License. You may obtain a copy of the License at
9 http://www.mozilla.org/MPL/
11 Software distributed under the License is distributed on an "AS IS" basis,
12 WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
13 for the specific language governing rights and limitations under the License.
15 The Original Code is the Open Hardware Monitor code.
17 The Initial Developer of the Original Code is
18 Michael Möller <m.moeller@gmx.ch>.
19 Portions created by the Initial Developer are Copyright (C) 2009-2010
20 the Initial Developer. All Rights Reserved.
24 Alternatively, the contents of this file may be used under the terms of
25 either the GNU General Public License Version 2 or later (the "GPL"), or
26 the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
27 in which case the provisions of the GPL or the LGPL are applicable instead
28 of those above. If you wish to allow use of your version of this file only
29 under the terms of either the GPL or the LGPL, and not to allow others to
30 use your version of this file under the terms of the MPL, indicate your
31 decision by deleting the provisions above and replace them with the notice
32 and other provisions required by the GPL or the LGPL. If you do not delete
33 the provisions above, a recipient may use your version of this file under
34 the terms of any one of the MPL, the GPL or the LGPL.
39 using System.Collections.Generic;
41 using OpenHardwareMonitor.Hardware.LPC;
43 namespace OpenHardwareMonitor.Hardware.Mainboard {
44 public class SuperIOHardware : Hardware {
46 private ISuperIO superIO;
48 protected readonly string name;
50 private List<Sensor> voltages = new List<Sensor>();
51 private List<Sensor> temperatures = new List<Sensor>();
52 private List<Sensor> fans = new List<Sensor>();
54 public SuperIOHardware(ISuperIO superIO, Manufacturer manufacturer,
57 this.superIO = superIO;
58 this.icon = Utilities.EmbeddedResources.GetImage("chip.png");
60 switch (superIO.Chip) {
61 case Chip.F71858: name = "Fintek F71858"; break;
62 case Chip.F71862: name = "Fintek F71862"; break;
63 case Chip.F71869: name = "Fintek F71869"; break;
64 case Chip.F71882: name = "Fintek F71882"; break;
65 case Chip.F71889ED: name = "Fintek F71889ED"; break;
66 case Chip.F71889F: name = "Fintek F71889F"; break;
67 case Chip.IT8712F: this.name = "ITE IT8712F"; break;
68 case Chip.IT8716F: this.name = "ITE IT8716F"; break;
69 case Chip.IT8718F: this.name = "ITE IT8718F"; break;
70 case Chip.IT8720F: this.name = "ITE IT8720F"; break;
71 case Chip.IT8726F: this.name = "ITE IT8726F"; break;
72 case Chip.W83627DHG: this.name = "Winbond W83627DHG"; break;
73 case Chip.W83627DHGP: this.name = "Winbond W83627DHG-P"; break;
74 case Chip.W83627EHF: this.name = "Winbond W83627EHF"; break;
75 case Chip.W83627HF: this.name = "Winbond W83627HF"; break;
76 case Chip.W83627THF: this.name = "Winbond W83627THF"; break;
77 case Chip.W83667HG: this.name = "Winbond W83667HG"; break;
78 case Chip.W83667HGB: this.name = "Winbond W83667HG-B"; break;
79 case Chip.W83687THF: this.name = "Winbond W83687THF"; break;
80 case Chip.Unknown: this.name = "Unkown"; break;
83 List<Voltage> v = new List<Voltage>();
84 List<Temperature> t = new List<Temperature>();
85 List<Fan> f = new List<Fan>();
87 switch (superIO.Chip) {
93 switch (manufacturer) {
94 case Manufacturer.ASUS:
96 case Model.Crosshair_III_Formula:
97 v.Add(new Voltage("VBat", 8));
98 t.Add(new Temperature("CPU", 0));
99 for (int i = 0; i < superIO.Fans.Length; i++)
100 f.Add(new Fan("Fan #" + (i + 1), i));
102 case Model.M2N_SLI_DELUXE:
103 v.Add(new Voltage("CPU VCore", 0));
104 v.Add(new Voltage("+3.3V", 1));
105 v.Add(new Voltage("+5V", 3, 6.8f, 10, 0));
106 v.Add(new Voltage("+12V", 4, 30, 10, 0));
107 v.Add(new Voltage("+5VSB", 7, 6.8f, 10, 0));
108 v.Add(new Voltage("VBat", 8));
109 t.Add(new Temperature("CPU", 0));
110 t.Add(new Temperature("Motherboard", 1));
111 f.Add(new Fan("CPU Fan", 0));
112 f.Add(new Fan("Chassis Fan #1", 1));
113 f.Add(new Fan("Power Fan", 2));
115 case Model.M4A79XTD_EVO:
116 v.Add(new Voltage("+5V", 3, 6.8f, 10, 0));
117 v.Add(new Voltage("VBat", 8));
118 t.Add(new Temperature("CPU", 0));
119 t.Add(new Temperature("Motherboard", 1));
120 f.Add(new Fan("CPU Fan", 0));
121 f.Add(new Fan("Chassis Fan #1", 1));
122 f.Add(new Fan("Chassis Fan #2", 2));
125 v.Add(new Voltage("CPU VCore", 0));
126 v.Add(new Voltage("Voltage #2", 1, true));
127 v.Add(new Voltage("Voltage #3", 2, true));
128 v.Add(new Voltage("Voltage #4", 3, true));
129 v.Add(new Voltage("Voltage #5", 4, true));
130 v.Add(new Voltage("Voltage #6", 5, true));
131 v.Add(new Voltage("Voltage #7", 6, true));
132 v.Add(new Voltage("Voltage #8", 7, true));
133 v.Add(new Voltage("VBat", 8));
134 for (int i = 0; i < superIO.Temperatures.Length; i++)
135 t.Add(new Temperature("Temperature #" + (i + 1), i));
136 for (int i = 0; i < superIO.Fans.Length; i++)
137 f.Add(new Fan("Fan #" + (i + 1), i));
141 case Manufacturer.DFI:
143 case Model.LP_BI_P45_T2RS_Elite:
144 v.Add(new Voltage("CPU VCore", 0));
145 v.Add(new Voltage("FSB VTT", 1));
146 v.Add(new Voltage("+3.3V", 2));
147 v.Add(new Voltage("+5V", 3, 6.8f, 10, 0));
148 v.Add(new Voltage("+12V", 4, 30, 10, 0));
149 v.Add(new Voltage("NB Core", 5));
150 v.Add(new Voltage("VDIMM", 6));
151 v.Add(new Voltage("+5VSB", 7, 6.8f, 10, 0));
152 v.Add(new Voltage("VBat", 8));
153 t.Add(new Temperature("CPU", 0));
154 t.Add(new Temperature("System", 1));
155 t.Add(new Temperature("Chipset", 2));
156 f.Add(new Fan("Fan #1", 0));
157 f.Add(new Fan("Fan #2", 1));
158 f.Add(new Fan("Fan #3", 2));
160 case Model.LP_DK_P55_T3eH9:
161 v.Add(new Voltage("CPU VCore", 0));
162 v.Add(new Voltage("VTT", 1));
163 v.Add(new Voltage("+3.3V", 2));
164 v.Add(new Voltage("+5V", 3, 6.8f, 10, 0));
165 v.Add(new Voltage("+12V", 4, 30, 10, 0));
166 v.Add(new Voltage("CPU PLL", 5));
167 v.Add(new Voltage("DRAM", 6));
168 v.Add(new Voltage("+5VSB", 7, 6.8f, 10, 0));
169 v.Add(new Voltage("VBat", 8));
170 t.Add(new Temperature("Chipset", 0));
171 t.Add(new Temperature("CPU PWM", 1));
172 t.Add(new Temperature("CPU", 2));
173 f.Add(new Fan("Fan #1", 0));
174 f.Add(new Fan("Fan #2", 1));
175 f.Add(new Fan("Fan #3", 2));
178 v.Add(new Voltage("CPU VCore", 0));
179 v.Add(new Voltage("VTT", 1, true));
180 v.Add(new Voltage("+3.3V", 2, true));
181 v.Add(new Voltage("+5V", 3, 6.8f, 10, 0, true));
182 v.Add(new Voltage("+12V", 4, 30, 10, 0, true));
183 v.Add(new Voltage("Voltage #6", 5, true));
184 v.Add(new Voltage("DRAM", 6, true));
185 v.Add(new Voltage("+5VSB", 7, 6.8f, 10, 0, true));
186 v.Add(new Voltage("VBat", 8));
187 for (int i = 0; i < superIO.Temperatures.Length; i++)
188 t.Add(new Temperature("Temperature #" + (i + 1), i));
189 for (int i = 0; i < superIO.Fans.Length; i++)
190 f.Add(new Fan("Fan #" + (i + 1), i));
195 case Manufacturer.Gigabyte:
198 v.Add(new Voltage("CPU VCore", 0));
199 v.Add(new Voltage("DRAM", 1));
200 v.Add(new Voltage("+3.3V", 2));
201 v.Add(new Voltage("+5V", 3, 6.8f, 10, 0));
202 v.Add(new Voltage("+12V", 7, 27, 9.1f, 0));
203 v.Add(new Voltage("VBat", 8));
204 t.Add(new Temperature("System", 0));
205 t.Add(new Temperature("CPU", 1));
206 f.Add(new Fan("CPU Fan", 0));
207 f.Add(new Fan("System Fan", 1));
209 case Model.EP45_DS3R:
210 case Model.EP45_UD3R:
212 v.Add(new Voltage("CPU VCore", 0));
213 v.Add(new Voltage("DRAM", 1));
214 v.Add(new Voltage("+3.3V", 2));
215 v.Add(new Voltage("+5V", 3, 6.8f, 10, 0));
216 v.Add(new Voltage("+12V", 7, 27, 9.1f, 0));
217 v.Add(new Voltage("VBat", 8));
218 t.Add(new Temperature("System", 0));
219 t.Add(new Temperature("CPU", 1));
220 f.Add(new Fan("CPU Fan", 0));
221 f.Add(new Fan("System Fan #2", 1));
222 f.Add(new Fan("Power Fan", 2));
223 f.Add(new Fan("System Fan #1", 3));
225 case Model.EX58_EXTREME:
226 v.Add(new Voltage("CPU VCore", 0));
227 v.Add(new Voltage("DRAM", 1));
228 v.Add(new Voltage("+5V", 3, 6.8f, 10, 0));
229 v.Add(new Voltage("VBat", 8));
230 t.Add(new Temperature("System", 0));
231 t.Add(new Temperature("CPU", 1));
232 t.Add(new Temperature("Northbridge", 2));
233 f.Add(new Fan("CPU Fan", 0));
234 f.Add(new Fan("System Fan #2", 1));
235 f.Add(new Fan("Power Fan", 2));
236 f.Add(new Fan("System Fan #1", 3));
240 v.Add(new Voltage("CPU VCore", 0));
241 v.Add(new Voltage("DRAM", 1));
242 v.Add(new Voltage("+3.3V", 2));
243 v.Add(new Voltage("+5V", 3, 6.8f, 10, 0));
244 v.Add(new Voltage("+12V", 7, 27, 9.1f, 0));
245 v.Add(new Voltage("VBat", 8));
246 t.Add(new Temperature("System", 0));
247 t.Add(new Temperature("CPU", 1));
248 f.Add(new Fan("CPU Fan", 0));
249 f.Add(new Fan("System Fan #1", 1));
250 f.Add(new Fan("System Fan #2", 2));
251 f.Add(new Fan("Power Fan", 3));
254 v.Add(new Voltage("CPU VCore", 0));
255 v.Add(new Voltage("DRAM", 1));
256 v.Add(new Voltage("+3.3V", 2));
257 v.Add(new Voltage("+5V", 3, 6.8f, 10, 0));
258 v.Add(new Voltage("+12V", 5, 27, 9.1f, 0));
259 v.Add(new Voltage("VBat", 8));
260 t.Add(new Temperature("System", 0));
261 t.Add(new Temperature("CPU", 2));
262 f.Add(new Fan("CPU Fan", 0));
263 f.Add(new Fan("System Fan #2", 1));
264 f.Add(new Fan("Power Fan", 2));
265 f.Add(new Fan("System Fan #1", 3));
267 case Model.GA_MA785GMT_UD2H:
268 v.Add(new Voltage("CPU VCore", 0));
269 v.Add(new Voltage("DRAM", 1));
270 v.Add(new Voltage("+3.3V", 2));
271 v.Add(new Voltage("+5V", 3, 6.8f, 10, 0));
272 v.Add(new Voltage("+12V", 4, 27, 9.1f, 0));
273 v.Add(new Voltage("VBat", 8));
274 t.Add(new Temperature("System", 0));
275 t.Add(new Temperature("CPU", 1));
276 f.Add(new Fan("CPU Fan", 0));
277 f.Add(new Fan("System Fan", 1));
278 f.Add(new Fan("NB Fan", 2));
280 case Model.X58A_UD3R:
281 v.Add(new Voltage("CPU VCore", 0));
282 v.Add(new Voltage("DRAM", 1));
283 v.Add(new Voltage("+3.3V", 2));
284 v.Add(new Voltage("+5V", 3, 6.8f, 10, 0));
285 v.Add(new Voltage("+12V", 5, 27, 9.1f, 0));
286 v.Add(new Voltage("VBat", 8));
287 t.Add(new Temperature("System", 0));
288 t.Add(new Temperature("CPU", 1));
289 t.Add(new Temperature("Northbridge", 2));
290 f.Add(new Fan("CPU Fan", 0));
291 f.Add(new Fan("System Fan #2", 1));
292 f.Add(new Fan("Power Fan", 2));
293 f.Add(new Fan("System Fan #1", 3));
296 v.Add(new Voltage("CPU VCore", 0));
297 v.Add(new Voltage("DRAM", 1, true));
298 v.Add(new Voltage("+3.3V", 2, true));
299 v.Add(new Voltage("+5V", 3, 6.8f, 10, 0, true));
300 v.Add(new Voltage("Voltage #5", 4, true));
301 v.Add(new Voltage("Voltage #6", 5, true));
302 v.Add(new Voltage("Voltage #7", 6, true));
303 v.Add(new Voltage("+12V", 7, 27, 9.1f, 0, true));
304 v.Add(new Voltage("VBat", 8));
305 for (int i = 0; i < superIO.Temperatures.Length; i++)
306 t.Add(new Temperature("Temperature #" + (i + 1), i));
307 for (int i = 0; i < superIO.Fans.Length; i++)
308 f.Add(new Fan("Fan #" + (i + 1), i));
314 v.Add(new Voltage("CPU VCore", 0));
315 v.Add(new Voltage("Voltage #2", 1, true));
316 v.Add(new Voltage("Voltage #3", 2, true));
317 v.Add(new Voltage("Voltage #4", 3, true));
318 v.Add(new Voltage("Voltage #5", 4, true));
319 v.Add(new Voltage("Voltage #6", 5, true));
320 v.Add(new Voltage("Voltage #7", 6, true));
321 v.Add(new Voltage("Voltage #8", 7, true));
322 v.Add(new Voltage("VBat", 8));
323 for (int i = 0; i < superIO.Temperatures.Length; i++)
324 t.Add(new Temperature("Temperature #" + (i + 1), i));
325 for (int i = 0; i < superIO.Fans.Length; i++)
326 f.Add(new Fan("Fan #" + (i + 1), i));
332 v.Add(new Voltage("VCC3V", 0, 150, 150, 0));
333 v.Add(new Voltage("VSB3V", 1, 150, 150, 0));
334 v.Add(new Voltage("Battery", 2, 150, 150, 0));
335 for (int i = 0; i < superIO.Temperatures.Length; i++)
336 t.Add(new Temperature("Temperature #" + (i + 1), i));
337 for (int i = 0; i < superIO.Fans.Length; i++)
338 f.Add(new Fan("Fan #" + (i + 1), i));
345 switch (manufacturer) {
346 case Manufacturer.EVGA:
348 case Model.X58_SLI_Classified:
349 v.Add(new Voltage("VCC3V", 0, 150, 150, 0));
350 v.Add(new Voltage("CPU VCore", 1, 47, 100, 0));
351 v.Add(new Voltage("DIMM", 2, 47, 100, 0));
352 v.Add(new Voltage("CPU VTT", 3, 24, 100, 0));
353 v.Add(new Voltage("IOH Vcore", 4, 24, 100, 0));
354 v.Add(new Voltage("+5V", 5, 51, 12, 0));
355 v.Add(new Voltage("+12V", 6, 56, 6.8f, 0));
356 v.Add(new Voltage("3VSB", 7, 150, 150, 0));
357 v.Add(new Voltage("VBat", 8, 150, 150, 0));
358 t.Add(new Temperature("CPU", 0));
359 t.Add(new Temperature("VREG", 1));
360 t.Add(new Temperature("System", 2));
361 f.Add(new Fan("CPU Fan", 0));
362 f.Add(new Fan("Power Fan", 1));
363 f.Add(new Fan("Chassis Fan", 2));
366 v.Add(new Voltage("VCC3V", 0, 150, 150, 0));
367 v.Add(new Voltage("CPU VCore", 1));
368 v.Add(new Voltage("Voltage #3", 2, true));
369 v.Add(new Voltage("Voltage #4", 3, true));
370 v.Add(new Voltage("Voltage #5", 4, true));
371 v.Add(new Voltage("Voltage #6", 5, true));
372 v.Add(new Voltage("Voltage #7", 6, true));
373 v.Add(new Voltage("VSB3V", 7, 150, 150, 0));
374 v.Add(new Voltage("VBat", 8, 150, 150, 0));
375 for (int i = 0; i < superIO.Temperatures.Length; i++)
376 t.Add(new Temperature("Temperature #" + (i + 1), i));
377 for (int i = 0; i < superIO.Fans.Length; i++)
378 f.Add(new Fan("Fan #" + (i + 1), i));
383 v.Add(new Voltage("VCC3V", 0, 150, 150, 0));
384 v.Add(new Voltage("CPU VCore", 1));
385 v.Add(new Voltage("Voltage #3", 2, true));
386 v.Add(new Voltage("Voltage #4", 3, true));
387 v.Add(new Voltage("Voltage #5", 4, true));
388 v.Add(new Voltage("Voltage #6", 5, true));
389 v.Add(new Voltage("Voltage #7", 6, true));
390 v.Add(new Voltage("VSB3V", 7, 150, 150, 0));
391 v.Add(new Voltage("VBat", 8, 150, 150, 0));
392 for (int i = 0; i < superIO.Temperatures.Length; i++)
393 t.Add(new Temperature("Temperature #" + (i + 1), i));
394 for (int i = 0; i < superIO.Fans.Length; i++)
395 f.Add(new Fan("Fan #" + (i + 1), i));
401 v.Add(new Voltage("CPU VCore", 0));
402 v.Add(new Voltage("Voltage #2", 1, true));
403 v.Add(new Voltage("AVCC", 2, 34, 34, 0));
404 v.Add(new Voltage("3VCC", 3, 34, 34, 0));
405 v.Add(new Voltage("Voltage #5", 4, true));
406 v.Add(new Voltage("Voltage #6", 5, true));
407 v.Add(new Voltage("Voltage #7", 6, true));
408 v.Add(new Voltage("3VSB", 7, 34, 34, 0));
409 v.Add(new Voltage("VBAT", 8, 34, 34, 0));
410 v.Add(new Voltage("Voltage #10", 9, true));
411 t.Add(new Temperature("CPU", 0));
412 t.Add(new Temperature("Auxiliary", 1));
413 t.Add(new Temperature("System", 2));
414 f.Add(new Fan("System Fan", 0));
415 f.Add(new Fan("CPU Fan", 1));
416 f.Add(new Fan("Auxiliary Fan", 2));
417 f.Add(new Fan("CPU Fan #2", 3));
418 f.Add(new Fan("Auxiliary Fan #2", 4));
421 case Chip.W83627DHGP:
424 switch (manufacturer) {
425 case Manufacturer.ASRock:
427 case Model._880GMH_USB3:
428 v.Add(new Voltage("CPU VCore", 0));
429 v.Add(new Voltage("+3.3V", 3, 34, 34, 0));
430 v.Add(new Voltage("+5V", 5, 15, 7.5f, 0));
431 v.Add(new Voltage("+12V", 6, 56, 10, 0));
432 v.Add(new Voltage("Standby +3.3V", 7, 34, 34, 0));
433 v.Add(new Voltage("VBAT", 8, 34, 34, 0));
434 t.Add(new Temperature("CPU", 0));
435 t.Add(new Temperature("Motherboard", 2));
436 f.Add(new Fan("Chassis Fan", 0));
437 f.Add(new Fan("CPU Fan", 1));
438 f.Add(new Fan("Power Fan", 2));
441 v.Add(new Voltage("CPU VCore", 0));
442 v.Add(new Voltage("Voltage #2", 1, true));
443 v.Add(new Voltage("AVCC", 2, 34, 34, 0));
444 v.Add(new Voltage("3VCC", 3, 34, 34, 0));
445 v.Add(new Voltage("Voltage #5", 4, true));
446 v.Add(new Voltage("Voltage #6", 5, true));
447 v.Add(new Voltage("Voltage #7", 6, true));
448 v.Add(new Voltage("3VSB", 7, 34, 34, 0));
449 v.Add(new Voltage("VBAT", 8, 34, 34, 0));
450 t.Add(new Temperature("CPU", 0));
451 t.Add(new Temperature("Auxiliary", 1));
452 t.Add(new Temperature("System", 2));
453 f.Add(new Fan("System Fan", 0));
454 f.Add(new Fan("CPU Fan", 1));
455 f.Add(new Fan("Auxiliary Fan", 2));
456 f.Add(new Fan("CPU Fan #2", 3));
457 f.Add(new Fan("Auxiliary Fan #2", 4));
461 case Manufacturer.ASUS:
464 v.Add(new Voltage("CPU VCore", 0));
465 v.Add(new Voltage("+12V", 1, 11.5f, 1.91f, 0));
466 v.Add(new Voltage("Analog +3.3V", 2, 34, 34, 0));
467 v.Add(new Voltage("+3.3V", 3, 34, 34, 0));
468 v.Add(new Voltage("+5V", 4, 15, 7.5f, 0));
469 v.Add(new Voltage("Voltage #6", 5, true));
470 v.Add(new Voltage("Voltage #7", 6, true));
471 v.Add(new Voltage("Standby +3.3V", 7, 34, 34, 0));
472 v.Add(new Voltage("VBAT", 8, 34, 34, 0));
473 t.Add(new Temperature("CPU", 0));
474 t.Add(new Temperature("Auxiliary", 1, true));
475 t.Add(new Temperature("Motherboard", 2));
476 f.Add(new Fan("Chassis Fan #1", 0));
477 f.Add(new Fan("CPU Fan", 1));
478 f.Add(new Fan("Power Fan", 2));
479 f.Add(new Fan("Chassis Fan #2", 3));
480 f.Add(new Fan("Chassis Fan #3", 4));
483 v.Add(new Voltage("CPU VCore", 0));
484 v.Add(new Voltage("Voltage #2", 1, true));
485 v.Add(new Voltage("AVCC", 2, 34, 34, 0));
486 v.Add(new Voltage("3VCC", 3, 34, 34, 0));
487 v.Add(new Voltage("Voltage #5", 4, true));
488 v.Add(new Voltage("Voltage #6", 5, true));
489 v.Add(new Voltage("Voltage #7", 6, true));
490 v.Add(new Voltage("3VSB", 7, 34, 34, 0));
491 v.Add(new Voltage("VBAT", 8, 34, 34, 0));
492 t.Add(new Temperature("CPU", 0));
493 t.Add(new Temperature("Auxiliary", 1));
494 t.Add(new Temperature("System", 2));
495 f.Add(new Fan("System Fan", 0));
496 f.Add(new Fan("CPU Fan", 1));
497 f.Add(new Fan("Auxiliary Fan", 2));
498 f.Add(new Fan("CPU Fan #2", 3));
499 f.Add(new Fan("Auxiliary Fan #2", 4));
504 v.Add(new Voltage("CPU VCore", 0));
505 v.Add(new Voltage("Voltage #2", 1, true));
506 v.Add(new Voltage("AVCC", 2, 34, 34, 0));
507 v.Add(new Voltage("3VCC", 3, 34, 34, 0));
508 v.Add(new Voltage("Voltage #5", 4, true));
509 v.Add(new Voltage("Voltage #6", 5, true));
510 v.Add(new Voltage("Voltage #7", 6, true));
511 v.Add(new Voltage("3VSB", 7, 34, 34, 0));
512 v.Add(new Voltage("VBAT", 8, 34, 34, 0));
513 t.Add(new Temperature("CPU", 0));
514 t.Add(new Temperature("Auxiliary", 1));
515 t.Add(new Temperature("System", 2));
516 f.Add(new Fan("System Fan", 0));
517 f.Add(new Fan("CPU Fan", 1));
518 f.Add(new Fan("Auxiliary Fan", 2));
519 f.Add(new Fan("CPU Fan #2", 3));
520 f.Add(new Fan("Auxiliary Fan #2", 4));
527 v.Add(new Voltage("CPU VCore", 0));
528 v.Add(new Voltage("Voltage #2", 1, true));
529 v.Add(new Voltage("Voltage #3", 2, true));
530 v.Add(new Voltage("AVCC", 3, 34, 51, 0));
531 v.Add(new Voltage("Voltage #5", 4, true));
532 v.Add(new Voltage("5VSB", 5, 34, 51, 0));
533 v.Add(new Voltage("VBAT", 6));
534 t.Add(new Temperature("CPU", 0));
535 t.Add(new Temperature("Auxiliary", 1));
536 t.Add(new Temperature("System", 2));
537 f.Add(new Fan("System Fan", 0));
538 f.Add(new Fan("CPU Fan", 1));
539 f.Add(new Fan("Auxiliary Fan", 2));
542 for (int i = 0; i < superIO.Voltages.Length; i++)
543 v.Add(new Voltage("Voltage #" + (i + 1), i, true));
544 for (int i = 0; i < superIO.Temperatures.Length; i++)
545 t.Add(new Temperature("Temperature #" + (i + 1), i));
546 for (int i = 0; i < superIO.Fans.Length; i++)
547 f.Add(new Fan("Fan #" + (i + 1), i));
551 string formula = "Voltage = value + (value - Vf) * Ri / Rf.";
552 foreach (Voltage voltage in v)
553 if (voltage.Index < superIO.Voltages.Length) {
554 Sensor sensor = new Sensor(voltage.Name, voltage.Index,
555 voltage.Hidden, SensorType.Voltage, this,
556 new ParameterDescription[] {
557 new ParameterDescription("Ri [kΩ]", "Input resistance.\n" +
558 formula, voltage.Ri),
559 new ParameterDescription("Rf [kΩ]", "Reference resistance.\n" +
560 formula, voltage.Rf),
561 new ParameterDescription("Vf [V]", "Reference voltage.\n" +
564 voltages.Add(sensor);
567 foreach (Temperature temperature in t)
568 if (temperature.Index < superIO.Temperatures.Length) {
569 Sensor sensor = new Sensor(temperature.Name, temperature.Index,
570 SensorType.Temperature, this, new ParameterDescription[] {
571 new ParameterDescription("Offset [°C]", "Temperature offset.", 0)
573 temperatures.Add(sensor);
576 foreach (Fan fan in f)
577 if (fan.Index < superIO.Fans.Length) {
578 Sensor sensor = new Sensor(fan.Name, fan.Index, SensorType.Fan,
584 public override Identifier Identifier {
585 get { return new Identifier("lpc", superIO.Chip.ToString().ToLower()); }
588 public override Image Icon {
592 public override string Name {
596 public override string GetReport() {
597 return superIO.GetReport();
600 public override void Update() {
603 foreach (Sensor sensor in voltages) {
604 float? value = superIO.Voltages[sensor.Index];
605 if (value.HasValue) {
606 sensor.Value = value + (value - sensor.Parameters[2].Value) *
607 sensor.Parameters[0].Value / sensor.Parameters[1].Value;
608 ActivateSensor(sensor);
612 foreach (Sensor sensor in temperatures) {
613 float? value = superIO.Temperatures[sensor.Index];
614 if (value.HasValue) {
615 sensor.Value = value + sensor.Parameters[0].Value;
616 ActivateSensor(sensor);
620 foreach (Sensor sensor in fans) {
621 float? value = superIO.Fans[sensor.Index];
622 if (value.HasValue) {
623 sensor.Value = value;
625 ActivateSensor(sensor);
630 private class Voltage {
631 public readonly string Name;
632 public readonly int Index;
633 public readonly float Ri;
634 public readonly float Rf;
635 public readonly float Vf;
636 public readonly bool Hidden;
638 public Voltage(string name, int index) :
639 this(name, index, 0, 1, 0, false) { }
641 public Voltage(string name, int index, bool hidden) :
642 this(name, index, 0, 1, 0, hidden) { }
644 public Voltage(string name, int index, float ri, float rf, float vf) :
645 this(name, index, ri, rf, vf, false) { }
647 public Voltage(string name, int index, float ri, float rf, float vf,
654 this.Hidden = hidden;
658 private class Temperature {
659 public readonly string Name;
660 public readonly int Index;
661 public readonly bool Hidden;
663 public Temperature(string name, int index) :
664 this(name, index, false) { }
666 public Temperature(string name, int index, bool hidden) {
669 this.Hidden = hidden;
674 public readonly string Name;
675 public readonly int Index;
677 public Fan(string name, int index) {