Changed the project files to Visual Studio 2010. Fixed some Code Analysis warnings.
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;
40 using System.Globalization;
41 using OpenHardwareMonitor.Hardware.LPC;
43 namespace OpenHardwareMonitor.Hardware.Mainboard {
44 internal class SuperIOHardware : Hardware {
46 private ISuperIO superIO;
47 protected readonly string name;
49 private List<Sensor> voltages = new List<Sensor>();
50 private List<Sensor> temperatures = new List<Sensor>();
51 private List<Sensor> fans = new List<Sensor>();
53 public SuperIOHardware(ISuperIO superIO, Manufacturer manufacturer,
54 Model model, ISettings settings)
56 this.superIO = superIO;
58 switch (superIO.Chip) {
59 case Chip.F71858: name = "Fintek F71858"; break;
60 case Chip.F71862: name = "Fintek F71862"; break;
61 case Chip.F71869: name = "Fintek F71869"; break;
62 case Chip.F71882: name = "Fintek F71882"; break;
63 case Chip.F71889ED: name = "Fintek F71889ED"; break;
64 case Chip.F71889F: name = "Fintek F71889F"; break;
65 case Chip.IT8712F: this.name = "ITE IT8712F"; break;
66 case Chip.IT8716F: this.name = "ITE IT8716F"; break;
67 case Chip.IT8718F: this.name = "ITE IT8718F"; break;
68 case Chip.IT8720F: this.name = "ITE IT8720F"; break;
69 case Chip.IT8726F: this.name = "ITE IT8726F"; break;
70 case Chip.W83627DHG: this.name = "Winbond W83627DHG"; break;
71 case Chip.W83627DHGP: this.name = "Winbond W83627DHG-P"; break;
72 case Chip.W83627EHF: this.name = "Winbond W83627EHF"; break;
73 case Chip.W83627HF: this.name = "Winbond W83627HF"; break;
74 case Chip.W83627THF: this.name = "Winbond W83627THF"; break;
75 case Chip.W83667HG: this.name = "Winbond W83667HG"; break;
76 case Chip.W83667HGB: this.name = "Winbond W83667HG-B"; break;
77 case Chip.W83687THF: this.name = "Winbond W83687THF"; break;
78 case Chip.Unknown: this.name = "Unkown"; break;
81 List<Voltage> v = new List<Voltage>();
82 List<Temperature> t = new List<Temperature>();
83 List<Fan> f = new List<Fan>();
85 switch (superIO.Chip) {
91 switch (manufacturer) {
92 case Manufacturer.ASUS:
94 case Model.Crosshair_III_Formula:
95 v.Add(new Voltage("VBat", 8));
96 t.Add(new Temperature("CPU", 0));
97 for (int i = 0; i < superIO.Fans.Length; i++)
98 f.Add(new Fan("Fan #" + (i + 1), i));
100 case Model.M2N_SLI_DELUXE:
101 v.Add(new Voltage("CPU VCore", 0));
102 v.Add(new Voltage("+3.3V", 1));
103 v.Add(new Voltage("+5V", 3, 6.8f, 10, 0));
104 v.Add(new Voltage("+12V", 4, 30, 10, 0));
105 v.Add(new Voltage("+5VSB", 7, 6.8f, 10, 0));
106 v.Add(new Voltage("VBat", 8));
107 t.Add(new Temperature("CPU", 0));
108 t.Add(new Temperature("Motherboard", 1));
109 f.Add(new Fan("CPU Fan", 0));
110 f.Add(new Fan("Chassis Fan #1", 1));
111 f.Add(new Fan("Power Fan", 2));
113 case Model.M4A79XTD_EVO:
114 v.Add(new Voltage("+5V", 3, 6.8f, 10, 0));
115 v.Add(new Voltage("VBat", 8));
116 t.Add(new Temperature("CPU", 0));
117 t.Add(new Temperature("Motherboard", 1));
118 f.Add(new Fan("CPU Fan", 0));
119 f.Add(new Fan("Chassis Fan #1", 1));
120 f.Add(new Fan("Chassis Fan #2", 2));
123 v.Add(new Voltage("CPU VCore", 0));
124 v.Add(new Voltage("Voltage #2", 1, true));
125 v.Add(new Voltage("Voltage #3", 2, true));
126 v.Add(new Voltage("Voltage #4", 3, true));
127 v.Add(new Voltage("Voltage #5", 4, true));
128 v.Add(new Voltage("Voltage #6", 5, true));
129 v.Add(new Voltage("Voltage #7", 6, true));
130 v.Add(new Voltage("Voltage #8", 7, true));
131 v.Add(new Voltage("VBat", 8));
132 for (int i = 0; i < superIO.Temperatures.Length; i++)
133 t.Add(new Temperature("Temperature #" + (i + 1), i));
134 for (int i = 0; i < superIO.Fans.Length; i++)
135 f.Add(new Fan("Fan #" + (i + 1), i));
139 case Manufacturer.DFI:
141 case Model.LP_BI_P45_T2RS_Elite:
142 v.Add(new Voltage("CPU VCore", 0));
143 v.Add(new Voltage("FSB VTT", 1));
144 v.Add(new Voltage("+3.3V", 2));
145 v.Add(new Voltage("+5V", 3, 6.8f, 10, 0));
146 v.Add(new Voltage("+12V", 4, 30, 10, 0));
147 v.Add(new Voltage("NB Core", 5));
148 v.Add(new Voltage("VDIMM", 6));
149 v.Add(new Voltage("+5VSB", 7, 6.8f, 10, 0));
150 v.Add(new Voltage("VBat", 8));
151 t.Add(new Temperature("CPU", 0));
152 t.Add(new Temperature("System", 1));
153 t.Add(new Temperature("Chipset", 2));
154 f.Add(new Fan("Fan #1", 0));
155 f.Add(new Fan("Fan #2", 1));
156 f.Add(new Fan("Fan #3", 2));
158 case Model.LP_DK_P55_T3eH9:
159 v.Add(new Voltage("CPU VCore", 0));
160 v.Add(new Voltage("VTT", 1));
161 v.Add(new Voltage("+3.3V", 2));
162 v.Add(new Voltage("+5V", 3, 6.8f, 10, 0));
163 v.Add(new Voltage("+12V", 4, 30, 10, 0));
164 v.Add(new Voltage("CPU PLL", 5));
165 v.Add(new Voltage("DRAM", 6));
166 v.Add(new Voltage("+5VSB", 7, 6.8f, 10, 0));
167 v.Add(new Voltage("VBat", 8));
168 t.Add(new Temperature("Chipset", 0));
169 t.Add(new Temperature("CPU PWM", 1));
170 t.Add(new Temperature("CPU", 2));
171 f.Add(new Fan("Fan #1", 0));
172 f.Add(new Fan("Fan #2", 1));
173 f.Add(new Fan("Fan #3", 2));
176 v.Add(new Voltage("CPU VCore", 0));
177 v.Add(new Voltage("VTT", 1, true));
178 v.Add(new Voltage("+3.3V", 2, true));
179 v.Add(new Voltage("+5V", 3, 6.8f, 10, 0, true));
180 v.Add(new Voltage("+12V", 4, 30, 10, 0, true));
181 v.Add(new Voltage("Voltage #6", 5, true));
182 v.Add(new Voltage("DRAM", 6, true));
183 v.Add(new Voltage("+5VSB", 7, 6.8f, 10, 0, true));
184 v.Add(new Voltage("VBat", 8));
185 for (int i = 0; i < superIO.Temperatures.Length; i++)
186 t.Add(new Temperature("Temperature #" + (i + 1), i));
187 for (int i = 0; i < superIO.Fans.Length; i++)
188 f.Add(new Fan("Fan #" + (i + 1), i));
193 case Manufacturer.Gigabyte:
196 v.Add(new Voltage("CPU VCore", 0));
197 v.Add(new Voltage("DRAM", 1));
198 v.Add(new Voltage("+3.3V", 2));
199 v.Add(new Voltage("+5V", 3, 6.8f, 10, 0));
200 v.Add(new Voltage("+12V", 7, 27, 9.1f, 0));
201 v.Add(new Voltage("VBat", 8));
202 t.Add(new Temperature("System", 0));
203 t.Add(new Temperature("CPU", 1));
204 f.Add(new Fan("CPU Fan", 0));
205 f.Add(new Fan("System Fan", 1));
207 case Model.EP45_DS3R:
208 case Model.EP45_UD3R:
210 v.Add(new Voltage("CPU VCore", 0));
211 v.Add(new Voltage("DRAM", 1));
212 v.Add(new Voltage("+3.3V", 2));
213 v.Add(new Voltage("+5V", 3, 6.8f, 10, 0));
214 v.Add(new Voltage("+12V", 7, 27, 9.1f, 0));
215 v.Add(new Voltage("VBat", 8));
216 t.Add(new Temperature("System", 0));
217 t.Add(new Temperature("CPU", 1));
218 f.Add(new Fan("CPU Fan", 0));
219 f.Add(new Fan("System Fan #2", 1));
220 f.Add(new Fan("Power Fan", 2));
221 f.Add(new Fan("System Fan #1", 3));
223 case Model.EX58_EXTREME:
224 v.Add(new Voltage("CPU VCore", 0));
225 v.Add(new Voltage("DRAM", 1));
226 v.Add(new Voltage("+5V", 3, 6.8f, 10, 0));
227 v.Add(new Voltage("VBat", 8));
228 t.Add(new Temperature("System", 0));
229 t.Add(new Temperature("CPU", 1));
230 t.Add(new Temperature("Northbridge", 2));
231 f.Add(new Fan("CPU Fan", 0));
232 f.Add(new Fan("System Fan #2", 1));
233 f.Add(new Fan("Power Fan", 2));
234 f.Add(new Fan("System Fan #1", 3));
238 v.Add(new Voltage("CPU VCore", 0));
239 v.Add(new Voltage("DRAM", 1));
240 v.Add(new Voltage("+3.3V", 2));
241 v.Add(new Voltage("+5V", 3, 6.8f, 10, 0));
242 v.Add(new Voltage("+12V", 7, 27, 9.1f, 0));
243 v.Add(new Voltage("VBat", 8));
244 t.Add(new Temperature("System", 0));
245 t.Add(new Temperature("CPU", 1));
246 f.Add(new Fan("CPU Fan", 0));
247 f.Add(new Fan("System Fan #1", 1));
248 f.Add(new Fan("System Fan #2", 2));
249 f.Add(new Fan("Power Fan", 3));
252 v.Add(new Voltage("CPU VCore", 0));
253 v.Add(new Voltage("DRAM", 1));
254 v.Add(new Voltage("+3.3V", 2));
255 v.Add(new Voltage("+5V", 3, 6.8f, 10, 0));
256 v.Add(new Voltage("+12V", 5, 27, 9.1f, 0));
257 v.Add(new Voltage("VBat", 8));
258 t.Add(new Temperature("System", 0));
259 t.Add(new Temperature("CPU", 2));
260 f.Add(new Fan("CPU Fan", 0));
261 f.Add(new Fan("System Fan #2", 1));
262 f.Add(new Fan("Power Fan", 2));
263 f.Add(new Fan("System Fan #1", 3));
265 case Model.GA_MA770T_UD3:
266 v.Add(new Voltage("CPU VCore", 0));
267 v.Add(new Voltage("DRAM", 1));
268 v.Add(new Voltage("+3.3V", 2));
269 v.Add(new Voltage("+5V", 3, 6.8f, 10, 0));
270 v.Add(new Voltage("+12V", 4, 27, 9.1f, 0));
271 v.Add(new Voltage("VBat", 8));
272 t.Add(new Temperature("System", 0));
273 t.Add(new Temperature("CPU", 1));
274 f.Add(new Fan("CPU Fan", 0));
275 f.Add(new Fan("System Fan #1", 1));
276 f.Add(new Fan("System Fan #2", 2));
277 f.Add(new Fan("Power Fan", 3));
279 case Model.GA_MA785GMT_UD2H:
280 v.Add(new Voltage("CPU VCore", 0));
281 v.Add(new Voltage("DRAM", 1));
282 v.Add(new Voltage("+3.3V", 2));
283 v.Add(new Voltage("+5V", 3, 6.8f, 10, 0));
284 v.Add(new Voltage("+12V", 4, 27, 9.1f, 0));
285 v.Add(new Voltage("VBat", 8));
286 t.Add(new Temperature("System", 0));
287 t.Add(new Temperature("CPU", 1));
288 f.Add(new Fan("CPU Fan", 0));
289 f.Add(new Fan("System Fan", 1));
290 f.Add(new Fan("NB Fan", 2));
292 case Model.X58A_UD3R:
293 v.Add(new Voltage("CPU VCore", 0));
294 v.Add(new Voltage("DRAM", 1));
295 v.Add(new Voltage("+3.3V", 2));
296 v.Add(new Voltage("+5V", 3, 6.8f, 10, 0));
297 v.Add(new Voltage("+12V", 5, 27, 9.1f, 0));
298 v.Add(new Voltage("VBat", 8));
299 t.Add(new Temperature("System", 0));
300 t.Add(new Temperature("CPU", 1));
301 t.Add(new Temperature("Northbridge", 2));
302 f.Add(new Fan("CPU Fan", 0));
303 f.Add(new Fan("System Fan #2", 1));
304 f.Add(new Fan("Power Fan", 2));
305 f.Add(new Fan("System Fan #1", 3));
308 v.Add(new Voltage("CPU VCore", 0));
309 v.Add(new Voltage("DRAM", 1, true));
310 v.Add(new Voltage("+3.3V", 2, true));
311 v.Add(new Voltage("+5V", 3, 6.8f, 10, 0, true));
312 v.Add(new Voltage("Voltage #5", 4, true));
313 v.Add(new Voltage("Voltage #6", 5, true));
314 v.Add(new Voltage("Voltage #7", 6, true));
315 v.Add(new Voltage("+12V", 7, 27, 9.1f, 0, true));
316 v.Add(new Voltage("VBat", 8));
317 for (int i = 0; i < superIO.Temperatures.Length; i++)
318 t.Add(new Temperature("Temperature #" + (i + 1), i));
319 for (int i = 0; i < superIO.Fans.Length; i++)
320 f.Add(new Fan("Fan #" + (i + 1), i));
326 v.Add(new Voltage("CPU VCore", 0));
327 v.Add(new Voltage("Voltage #2", 1, true));
328 v.Add(new Voltage("Voltage #3", 2, true));
329 v.Add(new Voltage("Voltage #4", 3, true));
330 v.Add(new Voltage("Voltage #5", 4, true));
331 v.Add(new Voltage("Voltage #6", 5, true));
332 v.Add(new Voltage("Voltage #7", 6, true));
333 v.Add(new Voltage("Voltage #8", 7, true));
334 v.Add(new Voltage("VBat", 8));
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));
344 v.Add(new Voltage("VCC3V", 0, 150, 150, 0));
345 v.Add(new Voltage("VSB3V", 1, 150, 150, 0));
346 v.Add(new Voltage("Battery", 2, 150, 150, 0));
347 for (int i = 0; i < superIO.Temperatures.Length; i++)
348 t.Add(new Temperature("Temperature #" + (i + 1), i));
349 for (int i = 0; i < superIO.Fans.Length; i++)
350 f.Add(new Fan("Fan #" + (i + 1), i));
357 switch (manufacturer) {
358 case Manufacturer.EVGA:
360 case Model.X58_SLI_Classified:
361 v.Add(new Voltage("VCC3V", 0, 150, 150, 0));
362 v.Add(new Voltage("CPU VCore", 1, 47, 100, 0));
363 v.Add(new Voltage("DIMM", 2, 47, 100, 0));
364 v.Add(new Voltage("CPU VTT", 3, 24, 100, 0));
365 v.Add(new Voltage("IOH Vcore", 4, 24, 100, 0));
366 v.Add(new Voltage("+5V", 5, 51, 12, 0));
367 v.Add(new Voltage("+12V", 6, 56, 6.8f, 0));
368 v.Add(new Voltage("3VSB", 7, 150, 150, 0));
369 v.Add(new Voltage("VBat", 8, 150, 150, 0));
370 t.Add(new Temperature("CPU", 0));
371 t.Add(new Temperature("VREG", 1));
372 t.Add(new Temperature("System", 2));
373 f.Add(new Fan("CPU Fan", 0));
374 f.Add(new Fan("Power Fan", 1));
375 f.Add(new Fan("Chassis Fan", 2));
378 v.Add(new Voltage("VCC3V", 0, 150, 150, 0));
379 v.Add(new Voltage("CPU VCore", 1));
380 v.Add(new Voltage("Voltage #3", 2, true));
381 v.Add(new Voltage("Voltage #4", 3, true));
382 v.Add(new Voltage("Voltage #5", 4, true));
383 v.Add(new Voltage("Voltage #6", 5, true));
384 v.Add(new Voltage("Voltage #7", 6, true));
385 v.Add(new Voltage("VSB3V", 7, 150, 150, 0));
386 v.Add(new Voltage("VBat", 8, 150, 150, 0));
387 for (int i = 0; i < superIO.Temperatures.Length; i++)
388 t.Add(new Temperature("Temperature #" + (i + 1), i));
389 for (int i = 0; i < superIO.Fans.Length; i++)
390 f.Add(new Fan("Fan #" + (i + 1), i));
395 v.Add(new Voltage("VCC3V", 0, 150, 150, 0));
396 v.Add(new Voltage("CPU VCore", 1));
397 v.Add(new Voltage("Voltage #3", 2, true));
398 v.Add(new Voltage("Voltage #4", 3, true));
399 v.Add(new Voltage("Voltage #5", 4, true));
400 v.Add(new Voltage("Voltage #6", 5, true));
401 v.Add(new Voltage("Voltage #7", 6, true));
402 v.Add(new Voltage("VSB3V", 7, 150, 150, 0));
403 v.Add(new Voltage("VBat", 8, 150, 150, 0));
404 for (int i = 0; i < superIO.Temperatures.Length; i++)
405 t.Add(new Temperature("Temperature #" + (i + 1), i));
406 for (int i = 0; i < superIO.Fans.Length; i++)
407 f.Add(new Fan("Fan #" + (i + 1), i));
413 v.Add(new Voltage("CPU VCore", 0));
414 v.Add(new Voltage("Voltage #2", 1, true));
415 v.Add(new Voltage("AVCC", 2, 34, 34, 0));
416 v.Add(new Voltage("3VCC", 3, 34, 34, 0));
417 v.Add(new Voltage("Voltage #5", 4, true));
418 v.Add(new Voltage("Voltage #6", 5, true));
419 v.Add(new Voltage("Voltage #7", 6, true));
420 v.Add(new Voltage("3VSB", 7, 34, 34, 0));
421 v.Add(new Voltage("VBAT", 8, 34, 34, 0));
422 v.Add(new Voltage("Voltage #10", 9, true));
423 t.Add(new Temperature("CPU", 0));
424 t.Add(new Temperature("Auxiliary", 1));
425 t.Add(new Temperature("System", 2));
426 f.Add(new Fan("System Fan", 0));
427 f.Add(new Fan("CPU Fan", 1));
428 f.Add(new Fan("Auxiliary Fan", 2));
429 f.Add(new Fan("CPU Fan #2", 3));
430 f.Add(new Fan("Auxiliary Fan #2", 4));
433 case Chip.W83627DHGP:
436 switch (manufacturer) {
437 case Manufacturer.ASRock:
439 case Model._880GMH_USB3:
440 v.Add(new Voltage("CPU VCore", 0));
441 v.Add(new Voltage("+3.3V", 3, 34, 34, 0));
442 v.Add(new Voltage("+5V", 5, 15, 7.5f, 0));
443 v.Add(new Voltage("+12V", 6, 56, 10, 0));
444 v.Add(new Voltage("Standby +3.3V", 7, 34, 34, 0));
445 v.Add(new Voltage("VBAT", 8, 34, 34, 0));
446 t.Add(new Temperature("CPU", 0));
447 t.Add(new Temperature("Motherboard", 2));
448 f.Add(new Fan("Chassis Fan", 0));
449 f.Add(new Fan("CPU Fan", 1));
450 f.Add(new Fan("Power Fan", 2));
453 v.Add(new Voltage("CPU VCore", 0));
454 v.Add(new Voltage("Voltage #2", 1, true));
455 v.Add(new Voltage("AVCC", 2, 34, 34, 0));
456 v.Add(new Voltage("3VCC", 3, 34, 34, 0));
457 v.Add(new Voltage("Voltage #5", 4, true));
458 v.Add(new Voltage("Voltage #6", 5, true));
459 v.Add(new Voltage("Voltage #7", 6, true));
460 v.Add(new Voltage("3VSB", 7, 34, 34, 0));
461 v.Add(new Voltage("VBAT", 8, 34, 34, 0));
462 t.Add(new Temperature("CPU", 0));
463 t.Add(new Temperature("Auxiliary", 1));
464 t.Add(new Temperature("System", 2));
465 f.Add(new Fan("System Fan", 0));
466 f.Add(new Fan("CPU Fan", 1));
467 f.Add(new Fan("Auxiliary Fan", 2));
468 f.Add(new Fan("CPU Fan #2", 3));
469 f.Add(new Fan("Auxiliary Fan #2", 4));
473 case Manufacturer.ASUS:
476 v.Add(new Voltage("CPU VCore", 0));
477 v.Add(new Voltage("+12V", 1, 11.5f, 1.91f, 0));
478 v.Add(new Voltage("Analog +3.3V", 2, 34, 34, 0));
479 v.Add(new Voltage("+3.3V", 3, 34, 34, 0));
480 v.Add(new Voltage("+5V", 4, 15, 7.5f, 0));
481 v.Add(new Voltage("Voltage #6", 5, true));
482 v.Add(new Voltage("Voltage #7", 6, true));
483 v.Add(new Voltage("Standby +3.3V", 7, 34, 34, 0));
484 v.Add(new Voltage("VBAT", 8, 34, 34, 0));
485 t.Add(new Temperature("CPU", 0));
486 t.Add(new Temperature("Auxiliary", 1, true));
487 t.Add(new Temperature("Motherboard", 2));
488 f.Add(new Fan("Chassis Fan #1", 0));
489 f.Add(new Fan("CPU Fan", 1));
490 f.Add(new Fan("Power Fan", 2));
491 f.Add(new Fan("Chassis Fan #2", 3));
492 f.Add(new Fan("Chassis Fan #3", 4));
495 v.Add(new Voltage("CPU VCore", 0));
496 v.Add(new Voltage("Voltage #2", 1, true));
497 v.Add(new Voltage("AVCC", 2, 34, 34, 0));
498 v.Add(new Voltage("3VCC", 3, 34, 34, 0));
499 v.Add(new Voltage("Voltage #5", 4, true));
500 v.Add(new Voltage("Voltage #6", 5, true));
501 v.Add(new Voltage("Voltage #7", 6, true));
502 v.Add(new Voltage("3VSB", 7, 34, 34, 0));
503 v.Add(new Voltage("VBAT", 8, 34, 34, 0));
504 t.Add(new Temperature("CPU", 0));
505 t.Add(new Temperature("Auxiliary", 1));
506 t.Add(new Temperature("System", 2));
507 f.Add(new Fan("System Fan", 0));
508 f.Add(new Fan("CPU Fan", 1));
509 f.Add(new Fan("Auxiliary Fan", 2));
510 f.Add(new Fan("CPU Fan #2", 3));
511 f.Add(new Fan("Auxiliary Fan #2", 4));
516 v.Add(new Voltage("CPU VCore", 0));
517 v.Add(new Voltage("Voltage #2", 1, true));
518 v.Add(new Voltage("AVCC", 2, 34, 34, 0));
519 v.Add(new Voltage("3VCC", 3, 34, 34, 0));
520 v.Add(new Voltage("Voltage #5", 4, true));
521 v.Add(new Voltage("Voltage #6", 5, true));
522 v.Add(new Voltage("Voltage #7", 6, true));
523 v.Add(new Voltage("3VSB", 7, 34, 34, 0));
524 v.Add(new Voltage("VBAT", 8, 34, 34, 0));
525 t.Add(new Temperature("CPU", 0));
526 t.Add(new Temperature("Auxiliary", 1));
527 t.Add(new Temperature("System", 2));
528 f.Add(new Fan("System Fan", 0));
529 f.Add(new Fan("CPU Fan", 1));
530 f.Add(new Fan("Auxiliary Fan", 2));
531 f.Add(new Fan("CPU Fan #2", 3));
532 f.Add(new Fan("Auxiliary Fan #2", 4));
539 v.Add(new Voltage("CPU VCore", 0));
540 v.Add(new Voltage("Voltage #2", 1, true));
541 v.Add(new Voltage("Voltage #3", 2, true));
542 v.Add(new Voltage("AVCC", 3, 34, 51, 0));
543 v.Add(new Voltage("Voltage #5", 4, true));
544 v.Add(new Voltage("5VSB", 5, 34, 51, 0));
545 v.Add(new Voltage("VBAT", 6));
546 t.Add(new Temperature("CPU", 0));
547 t.Add(new Temperature("Auxiliary", 1));
548 t.Add(new Temperature("System", 2));
549 f.Add(new Fan("System Fan", 0));
550 f.Add(new Fan("CPU Fan", 1));
551 f.Add(new Fan("Auxiliary Fan", 2));
554 for (int i = 0; i < superIO.Voltages.Length; i++)
555 v.Add(new Voltage("Voltage #" + (i + 1), i, true));
556 for (int i = 0; i < superIO.Temperatures.Length; i++)
557 t.Add(new Temperature("Temperature #" + (i + 1), i));
558 for (int i = 0; i < superIO.Fans.Length; i++)
559 f.Add(new Fan("Fan #" + (i + 1), i));
563 string formula = "Voltage = value + (value - Vf) * Ri / Rf.";
564 foreach (Voltage voltage in v)
565 if (voltage.Index < superIO.Voltages.Length) {
566 Sensor sensor = new Sensor(voltage.Name, voltage.Index,
567 voltage.Hidden, SensorType.Voltage, this,
568 new ParameterDescription[] {
569 new ParameterDescription("Ri [kΩ]", "Input resistance.\n" +
570 formula, voltage.Ri),
571 new ParameterDescription("Rf [kΩ]", "Reference resistance.\n" +
572 formula, voltage.Rf),
573 new ParameterDescription("Vf [V]", "Reference voltage.\n" +
576 voltages.Add(sensor);
579 foreach (Temperature temperature in t)
580 if (temperature.Index < superIO.Temperatures.Length) {
581 Sensor sensor = new Sensor(temperature.Name, temperature.Index,
582 SensorType.Temperature, this, new ParameterDescription[] {
583 new ParameterDescription("Offset [°C]", "Temperature offset.", 0)
585 temperatures.Add(sensor);
588 foreach (Fan fan in f)
589 if (fan.Index < superIO.Fans.Length) {
590 Sensor sensor = new Sensor(fan.Name, fan.Index, SensorType.Fan,
596 public override Identifier Identifier {
598 return new Identifier("lpc",
599 superIO.Chip.ToString().ToLower(CultureInfo.InvariantCulture));
603 public override HardwareType HardwareType {
604 get { return HardwareType.SuperIO; }
607 public override string Name {
611 public override string GetReport() {
612 return superIO.GetReport();
615 public override void Update() {
618 foreach (Sensor sensor in voltages) {
619 float? value = superIO.Voltages[sensor.Index];
620 if (value.HasValue) {
621 sensor.Value = value + (value - sensor.Parameters[2].Value) *
622 sensor.Parameters[0].Value / sensor.Parameters[1].Value;
623 ActivateSensor(sensor);
627 foreach (Sensor sensor in temperatures) {
628 float? value = superIO.Temperatures[sensor.Index];
629 if (value.HasValue) {
630 sensor.Value = value + sensor.Parameters[0].Value;
631 ActivateSensor(sensor);
635 foreach (Sensor sensor in fans) {
636 float? value = superIO.Fans[sensor.Index];
637 if (value.HasValue) {
638 sensor.Value = value;
640 ActivateSensor(sensor);
645 private class Voltage {
646 public readonly string Name;
647 public readonly int Index;
648 public readonly float Ri;
649 public readonly float Rf;
650 public readonly float Vf;
651 public readonly bool Hidden;
653 public Voltage(string name, int index) :
654 this(name, index, 0, 1, 0, false) { }
656 public Voltage(string name, int index, bool hidden) :
657 this(name, index, 0, 1, 0, hidden) { }
659 public Voltage(string name, int index, float ri, float rf, float vf) :
660 this(name, index, ri, rf, vf, false) { }
662 public Voltage(string name, int index, float ri, float rf, float vf,
669 this.Hidden = hidden;
673 private class Temperature {
674 public readonly string Name;
675 public readonly int Index;
676 public readonly bool Hidden;
678 public Temperature(string name, int index) :
679 this(name, index, false) { }
681 public Temperature(string name, int index, bool hidden) {
684 this.Hidden = hidden;
689 public readonly string Name;
690 public readonly int Index;
692 public Fan(string name, int index) {