Search all possible registry locations for the Heatmaster serial port.
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 case Model.Rampage_II_GENE: // W83667HG
473 v.Add(new Voltage("CPU VCore", 0));
474 v.Add(new Voltage("+12V", 1, 11.5f, 1.91f, 0));
475 v.Add(new Voltage("Analog +3.3V", 2, 34, 34, 0));
476 v.Add(new Voltage("+3.3V", 3, 34, 34, 0));
477 v.Add(new Voltage("+5V", 4, 15, 7.5f, 0));
478 v.Add(new Voltage("Standby +3.3V", 7, 34, 34, 0));
479 v.Add(new Voltage("VBAT", 8, 34, 34, 0));
480 t.Add(new Temperature("CPU", 0));
481 t.Add(new Temperature("Motherboard", 2));
482 f.Add(new Fan("Chassis Fan #1", 0));
483 f.Add(new Fan("CPU Fan", 1));
484 f.Add(new Fan("Power Fan", 2));
485 f.Add(new Fan("Chassis Fan #2", 3));
486 f.Add(new Fan("Chassis Fan #3", 4));
488 case Model.Rampage_Extreme: // W83667HG
489 v.Add(new Voltage("CPU VCore", 0));
490 v.Add(new Voltage("+12V", 1, 12, 2, 0));
491 v.Add(new Voltage("Analog +3.3V", 2, 34, 34, 0));
492 v.Add(new Voltage("+3.3V", 3, 34, 34, 0));
493 v.Add(new Voltage("+5V", 4, 15, 7.5f, 0));
494 v.Add(new Voltage("Standby +3.3V", 7, 34, 34, 0));
495 v.Add(new Voltage("VBAT", 8, 34, 34, 0));
496 t.Add(new Temperature("CPU", 0));
497 t.Add(new Temperature("Motherboard", 2));
498 f.Add(new Fan("Chassis Fan #1", 0));
499 f.Add(new Fan("CPU Fan", 1));
500 f.Add(new Fan("Power Fan", 2));
501 f.Add(new Fan("Chassis Fan #2", 3));
502 f.Add(new Fan("Chassis Fan #3", 4));
505 v.Add(new Voltage("CPU VCore", 0));
506 v.Add(new Voltage("Voltage #2", 1, true));
507 v.Add(new Voltage("AVCC", 2, 34, 34, 0));
508 v.Add(new Voltage("3VCC", 3, 34, 34, 0));
509 v.Add(new Voltage("Voltage #5", 4, true));
510 v.Add(new Voltage("Voltage #6", 5, true));
511 v.Add(new Voltage("Voltage #7", 6, true));
512 v.Add(new Voltage("3VSB", 7, 34, 34, 0));
513 v.Add(new Voltage("VBAT", 8, 34, 34, 0));
514 t.Add(new Temperature("CPU", 0));
515 t.Add(new Temperature("Auxiliary", 1));
516 t.Add(new Temperature("System", 2));
517 f.Add(new Fan("System Fan", 0));
518 f.Add(new Fan("CPU Fan", 1));
519 f.Add(new Fan("Auxiliary Fan", 2));
520 f.Add(new Fan("CPU Fan #2", 3));
521 f.Add(new Fan("Auxiliary Fan #2", 4));
526 v.Add(new Voltage("CPU VCore", 0));
527 v.Add(new Voltage("Voltage #2", 1, true));
528 v.Add(new Voltage("AVCC", 2, 34, 34, 0));
529 v.Add(new Voltage("3VCC", 3, 34, 34, 0));
530 v.Add(new Voltage("Voltage #5", 4, true));
531 v.Add(new Voltage("Voltage #6", 5, true));
532 v.Add(new Voltage("Voltage #7", 6, true));
533 v.Add(new Voltage("3VSB", 7, 34, 34, 0));
534 v.Add(new Voltage("VBAT", 8, 34, 34, 0));
535 t.Add(new Temperature("CPU", 0));
536 t.Add(new Temperature("Auxiliary", 1));
537 t.Add(new Temperature("System", 2));
538 f.Add(new Fan("System Fan", 0));
539 f.Add(new Fan("CPU Fan", 1));
540 f.Add(new Fan("Auxiliary Fan", 2));
541 f.Add(new Fan("CPU Fan #2", 3));
542 f.Add(new Fan("Auxiliary Fan #2", 4));
549 v.Add(new Voltage("CPU VCore", 0));
550 v.Add(new Voltage("Voltage #2", 1, true));
551 v.Add(new Voltage("Voltage #3", 2, true));
552 v.Add(new Voltage("AVCC", 3, 34, 51, 0));
553 v.Add(new Voltage("Voltage #5", 4, true));
554 v.Add(new Voltage("5VSB", 5, 34, 51, 0));
555 v.Add(new Voltage("VBAT", 6));
556 t.Add(new Temperature("CPU", 0));
557 t.Add(new Temperature("Auxiliary", 1));
558 t.Add(new Temperature("System", 2));
559 f.Add(new Fan("System Fan", 0));
560 f.Add(new Fan("CPU Fan", 1));
561 f.Add(new Fan("Auxiliary Fan", 2));
564 for (int i = 0; i < superIO.Voltages.Length; i++)
565 v.Add(new Voltage("Voltage #" + (i + 1), i, true));
566 for (int i = 0; i < superIO.Temperatures.Length; i++)
567 t.Add(new Temperature("Temperature #" + (i + 1), i));
568 for (int i = 0; i < superIO.Fans.Length; i++)
569 f.Add(new Fan("Fan #" + (i + 1), i));
573 string formula = "Voltage = value + (value - Vf) * Ri / Rf.";
574 foreach (Voltage voltage in v)
575 if (voltage.Index < superIO.Voltages.Length) {
576 Sensor sensor = new Sensor(voltage.Name, voltage.Index,
577 voltage.Hidden, SensorType.Voltage, this,
578 new ParameterDescription[] {
579 new ParameterDescription("Ri [kΩ]", "Input resistance.\n" +
580 formula, voltage.Ri),
581 new ParameterDescription("Rf [kΩ]", "Reference resistance.\n" +
582 formula, voltage.Rf),
583 new ParameterDescription("Vf [V]", "Reference voltage.\n" +
586 voltages.Add(sensor);
589 foreach (Temperature temperature in t)
590 if (temperature.Index < superIO.Temperatures.Length) {
591 Sensor sensor = new Sensor(temperature.Name, temperature.Index,
592 SensorType.Temperature, this, new ParameterDescription[] {
593 new ParameterDescription("Offset [°C]", "Temperature offset.", 0)
595 temperatures.Add(sensor);
598 foreach (Fan fan in f)
599 if (fan.Index < superIO.Fans.Length) {
600 Sensor sensor = new Sensor(fan.Name, fan.Index, SensorType.Fan,
606 public override Identifier Identifier {
608 return new Identifier("lpc",
609 superIO.Chip.ToString().ToLower(CultureInfo.InvariantCulture));
613 public override HardwareType HardwareType {
614 get { return HardwareType.SuperIO; }
617 public override string Name {
621 public override string GetReport() {
622 return superIO.GetReport();
625 public override void Update() {
628 foreach (Sensor sensor in voltages) {
629 float? value = superIO.Voltages[sensor.Index];
630 if (value.HasValue) {
631 sensor.Value = value + (value - sensor.Parameters[2].Value) *
632 sensor.Parameters[0].Value / sensor.Parameters[1].Value;
633 ActivateSensor(sensor);
637 foreach (Sensor sensor in temperatures) {
638 float? value = superIO.Temperatures[sensor.Index];
639 if (value.HasValue) {
640 sensor.Value = value + sensor.Parameters[0].Value;
641 ActivateSensor(sensor);
645 foreach (Sensor sensor in fans) {
646 float? value = superIO.Fans[sensor.Index];
647 if (value.HasValue) {
648 sensor.Value = value;
650 ActivateSensor(sensor);
655 private class Voltage {
656 public readonly string Name;
657 public readonly int Index;
658 public readonly float Ri;
659 public readonly float Rf;
660 public readonly float Vf;
661 public readonly bool Hidden;
663 public Voltage(string name, int index) :
664 this(name, index, 0, 1, 0, false) { }
666 public Voltage(string name, int index, bool hidden) :
667 this(name, index, 0, 1, 0, hidden) { }
669 public Voltage(string name, int index, float ri, float rf, float vf) :
670 this(name, index, ri, rf, vf, false) { }
672 public Voltage(string name, int index, float ri, float rf, float vf,
679 this.Hidden = hidden;
683 private class Temperature {
684 public readonly string Name;
685 public readonly int Index;
687 public Temperature(string name, int index) {
694 public readonly string Name;
695 public readonly int Index;
697 public Fan(string name, int index) {