Fixed Issue 97.
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;
49 private List<Sensor> voltages = new List<Sensor>();
50 private List<Sensor> temperatures = new List<Sensor>();
51 private List<Sensor> fans = new List<Sensor>();
54 public SuperIOHardware(ISuperIO superIO, Manufacturer manufacturer,
55 Model model, ISettings settings)
57 this.superIO = superIO;
58 this.name = ChipName.GetName(superIO.Chip);
60 List<Voltage> v = new List<Voltage>();
61 List<Temperature> t = new List<Temperature>();
62 List<Fan> f = new List<Fan>();
64 switch (superIO.Chip) {
70 switch (manufacturer) {
71 case Manufacturer.ASUS:
73 case Model.Crosshair_III_Formula: // IT8720F
74 v.Add(new Voltage("VBat", 8));
75 t.Add(new Temperature("CPU", 0));
76 for (int i = 0; i < superIO.Fans.Length; i++)
77 f.Add(new Fan("Fan #" + (i + 1), i));
79 case Model.M2N_SLI_DELUXE:
80 v.Add(new Voltage("CPU VCore", 0));
81 v.Add(new Voltage("+3.3V", 1));
82 v.Add(new Voltage("+5V", 3, 6.8f, 10, 0));
83 v.Add(new Voltage("+12V", 4, 30, 10, 0));
84 v.Add(new Voltage("+5VSB", 7, 6.8f, 10, 0));
85 v.Add(new Voltage("VBat", 8));
86 t.Add(new Temperature("CPU", 0));
87 t.Add(new Temperature("Motherboard", 1));
88 f.Add(new Fan("CPU Fan", 0));
89 f.Add(new Fan("Chassis Fan #1", 1));
90 f.Add(new Fan("Power Fan", 2));
92 case Model.M4A79XTD_EVO: // IT8720F
93 v.Add(new Voltage("+5V", 3, 6.8f, 10, 0));
94 v.Add(new Voltage("VBat", 8));
95 t.Add(new Temperature("CPU", 0));
96 t.Add(new Temperature("Motherboard", 1));
97 f.Add(new Fan("CPU Fan", 0));
98 f.Add(new Fan("Chassis Fan #1", 1));
99 f.Add(new Fan("Chassis Fan #2", 2));
102 v.Add(new Voltage("CPU VCore", 0));
103 v.Add(new Voltage("Voltage #2", 1, true));
104 v.Add(new Voltage("Voltage #3", 2, true));
105 v.Add(new Voltage("Voltage #4", 3, true));
106 v.Add(new Voltage("Voltage #5", 4, true));
107 v.Add(new Voltage("Voltage #6", 5, true));
108 v.Add(new Voltage("Voltage #7", 6, true));
109 v.Add(new Voltage("Voltage #8", 7, true));
110 v.Add(new Voltage("VBat", 8));
111 for (int i = 0; i < superIO.Temperatures.Length; i++)
112 t.Add(new Temperature("Temperature #" + (i + 1), i));
113 for (int i = 0; i < superIO.Fans.Length; i++)
114 f.Add(new Fan("Fan #" + (i + 1), i));
118 case Manufacturer.DFI:
120 case Model.LP_BI_P45_T2RS_Elite: // IT8718F
121 v.Add(new Voltage("CPU VCore", 0));
122 v.Add(new Voltage("FSB VTT", 1));
123 v.Add(new Voltage("+3.3V", 2));
124 v.Add(new Voltage("+5V", 3, 6.8f, 10, 0));
125 v.Add(new Voltage("+12V", 4, 30, 10, 0));
126 v.Add(new Voltage("NB Core", 5));
127 v.Add(new Voltage("VDIMM", 6));
128 v.Add(new Voltage("+5VSB", 7, 6.8f, 10, 0));
129 v.Add(new Voltage("VBat", 8));
130 t.Add(new Temperature("CPU", 0));
131 t.Add(new Temperature("System", 1));
132 t.Add(new Temperature("Chipset", 2));
133 f.Add(new Fan("Fan #1", 0));
134 f.Add(new Fan("Fan #2", 1));
135 f.Add(new Fan("Fan #3", 2));
137 case Model.LP_DK_P55_T3eH9: // IT8720F
138 v.Add(new Voltage("CPU VCore", 0));
139 v.Add(new Voltage("VTT", 1));
140 v.Add(new Voltage("+3.3V", 2));
141 v.Add(new Voltage("+5V", 3, 6.8f, 10, 0));
142 v.Add(new Voltage("+12V", 4, 30, 10, 0));
143 v.Add(new Voltage("CPU PLL", 5));
144 v.Add(new Voltage("DRAM", 6));
145 v.Add(new Voltage("+5VSB", 7, 6.8f, 10, 0));
146 v.Add(new Voltage("VBat", 8));
147 t.Add(new Temperature("Chipset", 0));
148 t.Add(new Temperature("CPU PWM", 1));
149 t.Add(new Temperature("CPU", 2));
150 f.Add(new Fan("Fan #1", 0));
151 f.Add(new Fan("Fan #2", 1));
152 f.Add(new Fan("Fan #3", 2));
155 v.Add(new Voltage("CPU VCore", 0));
156 v.Add(new Voltage("VTT", 1, true));
157 v.Add(new Voltage("+3.3V", 2, true));
158 v.Add(new Voltage("+5V", 3, 6.8f, 10, 0, true));
159 v.Add(new Voltage("+12V", 4, 30, 10, 0, true));
160 v.Add(new Voltage("Voltage #6", 5, true));
161 v.Add(new Voltage("DRAM", 6, true));
162 v.Add(new Voltage("+5VSB", 7, 6.8f, 10, 0, true));
163 v.Add(new Voltage("VBat", 8));
164 for (int i = 0; i < superIO.Temperatures.Length; i++)
165 t.Add(new Temperature("Temperature #" + (i + 1), i));
166 for (int i = 0; i < superIO.Fans.Length; i++)
167 f.Add(new Fan("Fan #" + (i + 1), i));
172 case Manufacturer.Gigabyte:
174 case Model._965P_S3: // IT8718F
175 v.Add(new Voltage("CPU VCore", 0));
176 v.Add(new Voltage("DRAM", 1));
177 v.Add(new Voltage("+3.3V", 2));
178 v.Add(new Voltage("+5V", 3, 6.8f, 10, 0));
179 v.Add(new Voltage("+12V", 7, 27, 9.1f, 0));
180 v.Add(new Voltage("VBat", 8));
181 t.Add(new Temperature("System", 0));
182 t.Add(new Temperature("CPU", 1));
183 f.Add(new Fan("CPU Fan", 0));
184 f.Add(new Fan("System Fan", 1));
186 case Model.EP45_DS3R: // IT8718F
187 case Model.EP45_UD3R:
189 v.Add(new Voltage("CPU VCore", 0));
190 v.Add(new Voltage("DRAM", 1));
191 v.Add(new Voltage("+3.3V", 2));
192 v.Add(new Voltage("+5V", 3, 6.8f, 10, 0));
193 v.Add(new Voltage("+12V", 7, 27, 9.1f, 0));
194 v.Add(new Voltage("VBat", 8));
195 t.Add(new Temperature("System", 0));
196 t.Add(new Temperature("CPU", 1));
197 f.Add(new Fan("CPU Fan", 0));
198 f.Add(new Fan("System Fan #2", 1));
199 f.Add(new Fan("Power Fan", 2));
200 f.Add(new Fan("System Fan #1", 3));
202 case Model.EX58_EXTREME: // IT8720F
203 v.Add(new Voltage("CPU VCore", 0));
204 v.Add(new Voltage("DRAM", 1));
205 v.Add(new Voltage("+5V", 3, 6.8f, 10, 0));
206 v.Add(new Voltage("VBat", 8));
207 t.Add(new Temperature("System", 0));
208 t.Add(new Temperature("CPU", 1));
209 t.Add(new Temperature("Northbridge", 2));
210 f.Add(new Fan("CPU Fan", 0));
211 f.Add(new Fan("System Fan #2", 1));
212 f.Add(new Fan("Power Fan", 2));
213 f.Add(new Fan("System Fan #1", 3));
215 case Model.P35_DS3: // IT8718F
216 case Model.P35_DS3L: // IT8718F
217 v.Add(new Voltage("CPU VCore", 0));
218 v.Add(new Voltage("DRAM", 1));
219 v.Add(new Voltage("+3.3V", 2));
220 v.Add(new Voltage("+5V", 3, 6.8f, 10, 0));
221 v.Add(new Voltage("+12V", 7, 27, 9.1f, 0));
222 v.Add(new Voltage("VBat", 8));
223 t.Add(new Temperature("System", 0));
224 t.Add(new Temperature("CPU", 1));
225 f.Add(new Fan("CPU Fan", 0));
226 f.Add(new Fan("System Fan #1", 1));
227 f.Add(new Fan("System Fan #2", 2));
228 f.Add(new Fan("Power Fan", 3));
230 case Model.P55_UD4: // IT8720F
231 case Model.P55M_UD4: // IT8720F
232 v.Add(new Voltage("CPU VCore", 0));
233 v.Add(new Voltage("DRAM", 1));
234 v.Add(new Voltage("+3.3V", 2));
235 v.Add(new Voltage("+5V", 3, 6.8f, 10, 0));
236 v.Add(new Voltage("+12V", 5, 27, 9.1f, 0));
237 v.Add(new Voltage("VBat", 8));
238 t.Add(new Temperature("System", 0));
239 t.Add(new Temperature("CPU", 2));
240 f.Add(new Fan("CPU Fan", 0));
241 f.Add(new Fan("System Fan #2", 1));
242 f.Add(new Fan("Power Fan", 2));
243 f.Add(new Fan("System Fan #1", 3));
245 case Model.GA_MA770T_UD3: // IT8720F
246 v.Add(new Voltage("CPU VCore", 0));
247 v.Add(new Voltage("DRAM", 1));
248 v.Add(new Voltage("+3.3V", 2));
249 v.Add(new Voltage("+5V", 3, 6.8f, 10, 0));
250 v.Add(new Voltage("+12V", 4, 27, 9.1f, 0));
251 v.Add(new Voltage("VBat", 8));
252 t.Add(new Temperature("System", 0));
253 t.Add(new Temperature("CPU", 1));
254 f.Add(new Fan("CPU Fan", 0));
255 f.Add(new Fan("System Fan #1", 1));
256 f.Add(new Fan("System Fan #2", 2));
257 f.Add(new Fan("Power Fan", 3));
259 case Model.GA_MA785GMT_UD2H: // IT8718F
260 v.Add(new Voltage("CPU VCore", 0));
261 v.Add(new Voltage("DRAM", 1));
262 v.Add(new Voltage("+3.3V", 2));
263 v.Add(new Voltage("+5V", 3, 6.8f, 10, 0));
264 v.Add(new Voltage("+12V", 4, 27, 9.1f, 0));
265 v.Add(new Voltage("VBat", 8));
266 t.Add(new Temperature("System", 0));
267 t.Add(new Temperature("CPU", 1));
268 f.Add(new Fan("CPU Fan", 0));
269 f.Add(new Fan("System Fan", 1));
270 f.Add(new Fan("NB Fan", 2));
272 case Model.X58A_UD3R: // IT8720F
273 v.Add(new Voltage("CPU VCore", 0));
274 v.Add(new Voltage("DRAM", 1));
275 v.Add(new Voltage("+3.3V", 2));
276 v.Add(new Voltage("+5V", 3, 6.8f, 10, 0));
277 v.Add(new Voltage("+12V", 5, 27, 9.1f, 0));
278 v.Add(new Voltage("VBat", 8));
279 t.Add(new Temperature("System", 0));
280 t.Add(new Temperature("CPU", 1));
281 t.Add(new Temperature("Northbridge", 2));
282 f.Add(new Fan("CPU Fan", 0));
283 f.Add(new Fan("System Fan #2", 1));
284 f.Add(new Fan("Power Fan", 2));
285 f.Add(new Fan("System Fan #1", 3));
288 v.Add(new Voltage("CPU VCore", 0));
289 v.Add(new Voltage("DRAM", 1, true));
290 v.Add(new Voltage("+3.3V", 2, true));
291 v.Add(new Voltage("+5V", 3, 6.8f, 10, 0, true));
292 v.Add(new Voltage("Voltage #5", 4, true));
293 v.Add(new Voltage("Voltage #6", 5, true));
294 v.Add(new Voltage("Voltage #7", 6, true));
295 v.Add(new Voltage("+12V", 7, 27, 9.1f, 0, true));
296 v.Add(new Voltage("VBat", 8));
297 for (int i = 0; i < superIO.Temperatures.Length; i++)
298 t.Add(new Temperature("Temperature #" + (i + 1), i));
299 for (int i = 0; i < superIO.Fans.Length; i++)
300 f.Add(new Fan("Fan #" + (i + 1), i));
306 v.Add(new Voltage("CPU VCore", 0));
307 v.Add(new Voltage("Voltage #2", 1, true));
308 v.Add(new Voltage("Voltage #3", 2, true));
309 v.Add(new Voltage("Voltage #4", 3, true));
310 v.Add(new Voltage("Voltage #5", 4, true));
311 v.Add(new Voltage("Voltage #6", 5, true));
312 v.Add(new Voltage("Voltage #7", 6, true));
313 v.Add(new Voltage("Voltage #8", 7, true));
314 v.Add(new Voltage("VBat", 8));
315 for (int i = 0; i < superIO.Temperatures.Length; i++)
316 t.Add(new Temperature("Temperature #" + (i + 1), i));
317 for (int i = 0; i < superIO.Fans.Length; i++)
318 f.Add(new Fan("Fan #" + (i + 1), i));
324 v.Add(new Voltage("Voltage #1", 0, true));
325 v.Add(new Voltage("Voltage #2", 1, true));
326 v.Add(new Voltage("Voltage #3", 2, true));
327 v.Add(new Voltage("Analog +3.3V", 3, 10, 10, 0, true));
328 v.Add(new Voltage("Voltage #5", 4, true));
329 v.Add(new Voltage("Voltage #6", 5, true));
330 v.Add(new Voltage("Voltage #7", 6, true));
331 v.Add(new Voltage("Standby +3.3V", 7, 10, 10, 0, true));
332 v.Add(new Voltage("VBat", 8, 10, 10, 0));
333 for (int i = 0; i < superIO.Temperatures.Length; i++)
334 t.Add(new Temperature("Temperature #" + (i + 1), i));
335 for (int i = 0; i < superIO.Fans.Length; i++)
336 f.Add(new Fan("Fan #" + (i + 1), i));
340 v.Add(new Voltage("VCC3V", 0, 150, 150, 0));
341 v.Add(new Voltage("VSB3V", 1, 150, 150, 0));
342 v.Add(new Voltage("Battery", 2, 150, 150, 0));
343 for (int i = 0; i < superIO.Temperatures.Length; i++)
344 t.Add(new Temperature("Temperature #" + (i + 1), i));
345 for (int i = 0; i < superIO.Fans.Length; i++)
346 f.Add(new Fan("Fan #" + (i + 1), i));
353 switch (manufacturer) {
354 case Manufacturer.EVGA:
356 case Model.X58_SLI_Classified: // F71882
357 v.Add(new Voltage("VCC3V", 0, 150, 150, 0));
358 v.Add(new Voltage("CPU VCore", 1, 47, 100, 0));
359 v.Add(new Voltage("DIMM", 2, 47, 100, 0));
360 v.Add(new Voltage("CPU VTT", 3, 24, 100, 0));
361 v.Add(new Voltage("IOH Vcore", 4, 24, 100, 0));
362 v.Add(new Voltage("+5V", 5, 51, 12, 0));
363 v.Add(new Voltage("+12V", 6, 56, 6.8f, 0));
364 v.Add(new Voltage("3VSB", 7, 150, 150, 0));
365 v.Add(new Voltage("VBat", 8, 150, 150, 0));
366 t.Add(new Temperature("CPU", 0));
367 t.Add(new Temperature("VREG", 1));
368 t.Add(new Temperature("System", 2));
369 f.Add(new Fan("CPU Fan", 0));
370 f.Add(new Fan("Power Fan", 1));
371 f.Add(new Fan("Chassis Fan", 2));
374 v.Add(new Voltage("VCC3V", 0, 150, 150, 0));
375 v.Add(new Voltage("CPU VCore", 1));
376 v.Add(new Voltage("Voltage #3", 2, true));
377 v.Add(new Voltage("Voltage #4", 3, true));
378 v.Add(new Voltage("Voltage #5", 4, true));
379 v.Add(new Voltage("Voltage #6", 5, true));
380 v.Add(new Voltage("Voltage #7", 6, true));
381 v.Add(new Voltage("VSB3V", 7, 150, 150, 0));
382 v.Add(new Voltage("VBat", 8, 150, 150, 0));
383 for (int i = 0; i < superIO.Temperatures.Length; i++)
384 t.Add(new Temperature("Temperature #" + (i + 1), i));
385 for (int i = 0; i < superIO.Fans.Length; i++)
386 f.Add(new Fan("Fan #" + (i + 1), i));
391 v.Add(new Voltage("VCC3V", 0, 150, 150, 0));
392 v.Add(new Voltage("CPU VCore", 1));
393 v.Add(new Voltage("Voltage #3", 2, true));
394 v.Add(new Voltage("Voltage #4", 3, true));
395 v.Add(new Voltage("Voltage #5", 4, true));
396 v.Add(new Voltage("Voltage #6", 5, true));
397 v.Add(new Voltage("Voltage #7", 6, true));
398 v.Add(new Voltage("VSB3V", 7, 150, 150, 0));
399 v.Add(new Voltage("VBat", 8, 150, 150, 0));
400 for (int i = 0; i < superIO.Temperatures.Length; i++)
401 t.Add(new Temperature("Temperature #" + (i + 1), i));
402 for (int i = 0; i < superIO.Fans.Length; i++)
403 f.Add(new Fan("Fan #" + (i + 1), i));
409 v.Add(new Voltage("CPU VCore", 0));
410 v.Add(new Voltage("Voltage #2", 1, true));
411 v.Add(new Voltage("AVCC", 2, 34, 34, 0));
412 v.Add(new Voltage("3VCC", 3, 34, 34, 0));
413 v.Add(new Voltage("Voltage #5", 4, true));
414 v.Add(new Voltage("Voltage #6", 5, true));
415 v.Add(new Voltage("Voltage #7", 6, true));
416 v.Add(new Voltage("3VSB", 7, 34, 34, 0));
417 v.Add(new Voltage("VBAT", 8, 34, 34, 0));
418 v.Add(new Voltage("Voltage #10", 9, true));
419 t.Add(new Temperature("CPU", 0));
420 t.Add(new Temperature("Auxiliary", 1));
421 t.Add(new Temperature("System", 2));
422 f.Add(new Fan("System Fan", 0));
423 f.Add(new Fan("CPU Fan", 1));
424 f.Add(new Fan("Auxiliary Fan", 2));
425 f.Add(new Fan("CPU Fan #2", 3));
426 f.Add(new Fan("Auxiliary Fan #2", 4));
429 case Chip.W83627DHGP:
432 switch (manufacturer) {
433 case Manufacturer.ASRock:
435 case Model._880GMH_USB3: // W83627DHG-P
436 v.Add(new Voltage("CPU VCore", 0));
437 v.Add(new Voltage("+3.3V", 3, 34, 34, 0));
438 v.Add(new Voltage("+5V", 5, 15, 7.5f, 0));
439 v.Add(new Voltage("+12V", 6, 56, 10, 0));
440 v.Add(new Voltage("Standby +3.3V", 7, 34, 34, 0));
441 v.Add(new Voltage("VBAT", 8, 34, 34, 0));
442 t.Add(new Temperature("CPU", 0));
443 t.Add(new Temperature("Motherboard", 2));
444 f.Add(new Fan("Chassis Fan", 0));
445 f.Add(new Fan("CPU Fan", 1));
446 f.Add(new Fan("Power Fan", 2));
449 v.Add(new Voltage("CPU VCore", 0));
450 v.Add(new Voltage("Voltage #2", 1, true));
451 v.Add(new Voltage("AVCC", 2, 34, 34, 0));
452 v.Add(new Voltage("3VCC", 3, 34, 34, 0));
453 v.Add(new Voltage("Voltage #5", 4, true));
454 v.Add(new Voltage("Voltage #6", 5, true));
455 v.Add(new Voltage("Voltage #7", 6, true));
456 v.Add(new Voltage("3VSB", 7, 34, 34, 0));
457 v.Add(new Voltage("VBAT", 8, 34, 34, 0));
458 t.Add(new Temperature("CPU", 0));
459 t.Add(new Temperature("Auxiliary", 1));
460 t.Add(new Temperature("System", 2));
461 f.Add(new Fan("System Fan", 0));
462 f.Add(new Fan("CPU Fan", 1));
463 f.Add(new Fan("Auxiliary Fan", 2));
464 f.Add(new Fan("CPU Fan #2", 3));
465 f.Add(new Fan("Auxiliary Fan #2", 4));
469 case Manufacturer.ASUS:
471 case Model.P6X58D_E: // W83667HG
472 v.Add(new Voltage("CPU VCore", 0));
473 v.Add(new Voltage("+12V", 1, 11.5f, 1.91f, 0));
474 v.Add(new Voltage("Analog +3.3V", 2, 34, 34, 0));
475 v.Add(new Voltage("+3.3V", 3, 34, 34, 0));
476 v.Add(new Voltage("+5V", 4, 15, 7.5f, 0));
477 v.Add(new Voltage("Voltage #6", 5, true));
478 v.Add(new Voltage("Voltage #7", 6, true));
479 v.Add(new Voltage("Standby +3.3V", 7, 34, 34, 0));
480 v.Add(new Voltage("VBAT", 8, 34, 34, 0));
481 t.Add(new Temperature("CPU", 0));
482 t.Add(new Temperature("Motherboard", 2));
483 f.Add(new Fan("Chassis Fan #1", 0));
484 f.Add(new Fan("CPU Fan", 1));
485 f.Add(new Fan("Power Fan", 2));
486 f.Add(new Fan("Chassis Fan #2", 3));
487 f.Add(new Fan("Chassis Fan #3", 4));
490 v.Add(new Voltage("CPU VCore", 0));
491 v.Add(new Voltage("Voltage #2", 1, true));
492 v.Add(new Voltage("AVCC", 2, 34, 34, 0));
493 v.Add(new Voltage("3VCC", 3, 34, 34, 0));
494 v.Add(new Voltage("Voltage #5", 4, true));
495 v.Add(new Voltage("Voltage #6", 5, true));
496 v.Add(new Voltage("Voltage #7", 6, true));
497 v.Add(new Voltage("3VSB", 7, 34, 34, 0));
498 v.Add(new Voltage("VBAT", 8, 34, 34, 0));
499 t.Add(new Temperature("CPU", 0));
500 t.Add(new Temperature("Auxiliary", 1));
501 t.Add(new Temperature("System", 2));
502 f.Add(new Fan("System Fan", 0));
503 f.Add(new Fan("CPU Fan", 1));
504 f.Add(new Fan("Auxiliary Fan", 2));
505 f.Add(new Fan("CPU Fan #2", 3));
506 f.Add(new Fan("Auxiliary Fan #2", 4));
511 v.Add(new Voltage("CPU VCore", 0));
512 v.Add(new Voltage("Voltage #2", 1, true));
513 v.Add(new Voltage("AVCC", 2, 34, 34, 0));
514 v.Add(new Voltage("3VCC", 3, 34, 34, 0));
515 v.Add(new Voltage("Voltage #5", 4, true));
516 v.Add(new Voltage("Voltage #6", 5, true));
517 v.Add(new Voltage("Voltage #7", 6, true));
518 v.Add(new Voltage("3VSB", 7, 34, 34, 0));
519 v.Add(new Voltage("VBAT", 8, 34, 34, 0));
520 t.Add(new Temperature("CPU", 0));
521 t.Add(new Temperature("Auxiliary", 1));
522 t.Add(new Temperature("System", 2));
523 f.Add(new Fan("System Fan", 0));
524 f.Add(new Fan("CPU Fan", 1));
525 f.Add(new Fan("Auxiliary Fan", 2));
526 f.Add(new Fan("CPU Fan #2", 3));
527 f.Add(new Fan("Auxiliary Fan #2", 4));
534 v.Add(new Voltage("CPU VCore", 0));
535 v.Add(new Voltage("Voltage #2", 1, true));
536 v.Add(new Voltage("Voltage #3", 2, true));
537 v.Add(new Voltage("AVCC", 3, 34, 51, 0));
538 v.Add(new Voltage("Voltage #5", 4, true));
539 v.Add(new Voltage("5VSB", 5, 34, 51, 0));
540 v.Add(new Voltage("VBAT", 6));
541 t.Add(new Temperature("CPU", 0));
542 t.Add(new Temperature("Auxiliary", 1));
543 t.Add(new Temperature("System", 2));
544 f.Add(new Fan("System Fan", 0));
545 f.Add(new Fan("CPU Fan", 1));
546 f.Add(new Fan("Auxiliary Fan", 2));
549 for (int i = 0; i < superIO.Voltages.Length; i++)
550 v.Add(new Voltage("Voltage #" + (i + 1), i, true));
551 for (int i = 0; i < superIO.Temperatures.Length; i++)
552 t.Add(new Temperature("Temperature #" + (i + 1), i));
553 for (int i = 0; i < superIO.Fans.Length; i++)
554 f.Add(new Fan("Fan #" + (i + 1), i));
558 string formula = "Voltage = value + (value - Vf) * Ri / Rf.";
559 foreach (Voltage voltage in v)
560 if (voltage.Index < superIO.Voltages.Length) {
561 Sensor sensor = new Sensor(voltage.Name, voltage.Index,
562 voltage.Hidden, SensorType.Voltage, this,
563 new ParameterDescription[] {
564 new ParameterDescription("Ri [kΩ]", "Input resistance.\n" +
565 formula, voltage.Ri),
566 new ParameterDescription("Rf [kΩ]", "Reference resistance.\n" +
567 formula, voltage.Rf),
568 new ParameterDescription("Vf [V]", "Reference voltage.\n" +
571 voltages.Add(sensor);
574 foreach (Temperature temperature in t)
575 if (temperature.Index < superIO.Temperatures.Length) {
576 Sensor sensor = new Sensor(temperature.Name, temperature.Index,
577 SensorType.Temperature, this, new ParameterDescription[] {
578 new ParameterDescription("Offset [°C]", "Temperature offset.", 0)
580 temperatures.Add(sensor);
583 foreach (Fan fan in f)
584 if (fan.Index < superIO.Fans.Length) {
585 Sensor sensor = new Sensor(fan.Name, fan.Index, SensorType.Fan,
591 public override Identifier Identifier {
593 return new Identifier("lpc",
594 superIO.Chip.ToString().ToLower(CultureInfo.InvariantCulture));
598 public override HardwareType HardwareType {
599 get { return HardwareType.SuperIO; }
602 public override string Name {
606 public override string GetReport() {
607 return superIO.GetReport();
610 public override void Update() {
613 foreach (Sensor sensor in voltages) {
614 float? value = superIO.Voltages[sensor.Index];
615 if (value.HasValue) {
616 sensor.Value = value + (value - sensor.Parameters[2].Value) *
617 sensor.Parameters[0].Value / sensor.Parameters[1].Value;
618 ActivateSensor(sensor);
622 foreach (Sensor sensor in temperatures) {
623 float? value = superIO.Temperatures[sensor.Index];
624 if (value.HasValue) {
625 sensor.Value = value + sensor.Parameters[0].Value;
626 ActivateSensor(sensor);
630 foreach (Sensor sensor in fans) {
631 float? value = superIO.Fans[sensor.Index];
632 if (value.HasValue) {
633 sensor.Value = value;
635 ActivateSensor(sensor);
640 private class Voltage {
641 public readonly string Name;
642 public readonly int Index;
643 public readonly float Ri;
644 public readonly float Rf;
645 public readonly float Vf;
646 public readonly bool Hidden;
648 public Voltage(string name, int index) :
649 this(name, index, 0, 1, 0, false) { }
651 public Voltage(string name, int index, bool hidden) :
652 this(name, index, 0, 1, 0, hidden) { }
654 public Voltage(string name, int index, float ri, float rf, float vf) :
655 this(name, index, ri, rf, vf, false) { }
657 public Voltage(string name, int index, float ri, float rf, float vf,
664 this.Hidden = hidden;
668 private class Temperature {
669 public readonly string Name;
670 public readonly int Index;
672 public Temperature(string name, int index) {
679 public readonly string Name;
680 public readonly int Index;
682 public Fan(string name, int index) {