Any OpenHardwareMonitorShowDesktopReferenceWindow (even from another process) will be good enough to detect "Show Desktop". This fixes the "Show Desktop" detection in a second instance of the Open Hardware Monitor.
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 Mainboard mainboard;
47 private ISuperIO superIO;
50 private List<Sensor> voltages = new List<Sensor>();
51 private List<Sensor> temperatures = new List<Sensor>();
52 private List<Sensor> fans = new List<Sensor>();
55 public SuperIOHardware(Mainboard mainboard, ISuperIO superIO,
56 Manufacturer manufacturer, Model model, ISettings settings)
58 this.mainboard = mainboard;
59 this.superIO = superIO;
60 this.name = ChipName.GetName(superIO.Chip);
62 List<Voltage> v = new List<Voltage>();
63 List<Temperature> t = new List<Temperature>();
64 List<Fan> f = new List<Fan>();
66 switch (superIO.Chip) {
72 switch (manufacturer) {
73 case Manufacturer.ASUS:
75 case Model.Crosshair_III_Formula: // IT8720F
76 v.Add(new Voltage("VBat", 8));
77 t.Add(new Temperature("CPU", 0));
78 for (int i = 0; i < superIO.Fans.Length; i++)
79 f.Add(new Fan("Fan #" + (i + 1), i));
81 case Model.M2N_SLI_DELUXE:
82 v.Add(new Voltage("CPU VCore", 0));
83 v.Add(new Voltage("+3.3V", 1));
84 v.Add(new Voltage("+5V", 3, 6.8f, 10, 0));
85 v.Add(new Voltage("+12V", 4, 30, 10, 0));
86 v.Add(new Voltage("+5VSB", 7, 6.8f, 10, 0));
87 v.Add(new Voltage("VBat", 8));
88 t.Add(new Temperature("CPU", 0));
89 t.Add(new Temperature("Motherboard", 1));
90 f.Add(new Fan("CPU Fan", 0));
91 f.Add(new Fan("Chassis Fan #1", 1));
92 f.Add(new Fan("Power Fan", 2));
94 case Model.M4A79XTD_EVO: // IT8720F
95 v.Add(new Voltage("+5V", 3, 6.8f, 10, 0));
96 v.Add(new Voltage("VBat", 8));
97 t.Add(new Temperature("CPU", 0));
98 t.Add(new Temperature("Motherboard", 1));
99 f.Add(new Fan("CPU Fan", 0));
100 f.Add(new Fan("Chassis Fan #1", 1));
101 f.Add(new Fan("Chassis Fan #2", 2));
104 v.Add(new Voltage("CPU VCore", 0));
105 v.Add(new Voltage("Voltage #2", 1, true));
106 v.Add(new Voltage("Voltage #3", 2, true));
107 v.Add(new Voltage("Voltage #4", 3, true));
108 v.Add(new Voltage("Voltage #5", 4, true));
109 v.Add(new Voltage("Voltage #6", 5, true));
110 v.Add(new Voltage("Voltage #7", 6, true));
111 v.Add(new Voltage("Voltage #8", 7, true));
112 v.Add(new Voltage("VBat", 8));
113 for (int i = 0; i < superIO.Temperatures.Length; i++)
114 t.Add(new Temperature("Temperature #" + (i + 1), i));
115 for (int i = 0; i < superIO.Fans.Length; i++)
116 f.Add(new Fan("Fan #" + (i + 1), i));
120 case Manufacturer.DFI:
122 case Model.LP_BI_P45_T2RS_Elite: // IT8718F
123 v.Add(new Voltage("CPU VCore", 0));
124 v.Add(new Voltage("FSB VTT", 1));
125 v.Add(new Voltage("+3.3V", 2));
126 v.Add(new Voltage("+5V", 3, 6.8f, 10, 0));
127 v.Add(new Voltage("+12V", 4, 30, 10, 0));
128 v.Add(new Voltage("NB Core", 5));
129 v.Add(new Voltage("VDIMM", 6));
130 v.Add(new Voltage("+5VSB", 7, 6.8f, 10, 0));
131 v.Add(new Voltage("VBat", 8));
132 t.Add(new Temperature("CPU", 0));
133 t.Add(new Temperature("System", 1));
134 t.Add(new Temperature("Chipset", 2));
135 f.Add(new Fan("Fan #1", 0));
136 f.Add(new Fan("Fan #2", 1));
137 f.Add(new Fan("Fan #3", 2));
139 case Model.LP_DK_P55_T3eH9: // IT8720F
140 v.Add(new Voltage("CPU VCore", 0));
141 v.Add(new Voltage("VTT", 1));
142 v.Add(new Voltage("+3.3V", 2));
143 v.Add(new Voltage("+5V", 3, 6.8f, 10, 0));
144 v.Add(new Voltage("+12V", 4, 30, 10, 0));
145 v.Add(new Voltage("CPU PLL", 5));
146 v.Add(new Voltage("DRAM", 6));
147 v.Add(new Voltage("+5VSB", 7, 6.8f, 10, 0));
148 v.Add(new Voltage("VBat", 8));
149 t.Add(new Temperature("Chipset", 0));
150 t.Add(new Temperature("CPU PWM", 1));
151 t.Add(new Temperature("CPU", 2));
152 f.Add(new Fan("Fan #1", 0));
153 f.Add(new Fan("Fan #2", 1));
154 f.Add(new Fan("Fan #3", 2));
157 v.Add(new Voltage("CPU VCore", 0));
158 v.Add(new Voltage("VTT", 1, true));
159 v.Add(new Voltage("+3.3V", 2, true));
160 v.Add(new Voltage("+5V", 3, 6.8f, 10, 0, true));
161 v.Add(new Voltage("+12V", 4, 30, 10, 0, true));
162 v.Add(new Voltage("Voltage #6", 5, true));
163 v.Add(new Voltage("DRAM", 6, true));
164 v.Add(new Voltage("+5VSB", 7, 6.8f, 10, 0, true));
165 v.Add(new Voltage("VBat", 8));
166 for (int i = 0; i < superIO.Temperatures.Length; i++)
167 t.Add(new Temperature("Temperature #" + (i + 1), i));
168 for (int i = 0; i < superIO.Fans.Length; i++)
169 f.Add(new Fan("Fan #" + (i + 1), i));
174 case Manufacturer.Gigabyte:
176 case Model._965P_S3: // IT8718F
177 v.Add(new Voltage("CPU VCore", 0));
178 v.Add(new Voltage("DRAM", 1));
179 v.Add(new Voltage("+3.3V", 2));
180 v.Add(new Voltage("+5V", 3, 6.8f, 10, 0));
181 v.Add(new Voltage("+12V", 7, 27, 9.1f, 0));
182 v.Add(new Voltage("VBat", 8));
183 t.Add(new Temperature("System", 0));
184 t.Add(new Temperature("CPU", 1));
185 f.Add(new Fan("CPU Fan", 0));
186 f.Add(new Fan("System Fan", 1));
188 case Model.EP45_DS3R: // IT8718F
189 case Model.EP45_UD3R:
191 v.Add(new Voltage("CPU VCore", 0));
192 v.Add(new Voltage("DRAM", 1));
193 v.Add(new Voltage("+3.3V", 2));
194 v.Add(new Voltage("+5V", 3, 6.8f, 10, 0));
195 v.Add(new Voltage("+12V", 7, 27, 9.1f, 0));
196 v.Add(new Voltage("VBat", 8));
197 t.Add(new Temperature("System", 0));
198 t.Add(new Temperature("CPU", 1));
199 f.Add(new Fan("CPU Fan", 0));
200 f.Add(new Fan("System Fan #2", 1));
201 f.Add(new Fan("Power Fan", 2));
202 f.Add(new Fan("System Fan #1", 3));
204 case Model.EX58_EXTREME: // IT8720F
205 v.Add(new Voltage("CPU VCore", 0));
206 v.Add(new Voltage("DRAM", 1));
207 v.Add(new Voltage("+5V", 3, 6.8f, 10, 0));
208 v.Add(new Voltage("VBat", 8));
209 t.Add(new Temperature("System", 0));
210 t.Add(new Temperature("CPU", 1));
211 t.Add(new Temperature("Northbridge", 2));
212 f.Add(new Fan("CPU Fan", 0));
213 f.Add(new Fan("System Fan #2", 1));
214 f.Add(new Fan("Power Fan", 2));
215 f.Add(new Fan("System Fan #1", 3));
217 case Model.P35_DS3: // IT8718F
218 case Model.P35_DS3L: // IT8718F
219 v.Add(new Voltage("CPU VCore", 0));
220 v.Add(new Voltage("DRAM", 1));
221 v.Add(new Voltage("+3.3V", 2));
222 v.Add(new Voltage("+5V", 3, 6.8f, 10, 0));
223 v.Add(new Voltage("+12V", 7, 27, 9.1f, 0));
224 v.Add(new Voltage("VBat", 8));
225 t.Add(new Temperature("System", 0));
226 t.Add(new Temperature("CPU", 1));
227 f.Add(new Fan("CPU Fan", 0));
228 f.Add(new Fan("System Fan #1", 1));
229 f.Add(new Fan("System Fan #2", 2));
230 f.Add(new Fan("Power Fan", 3));
232 case Model.P55_UD4: // IT8720F
233 case Model.P55M_UD4: // IT8720F
234 v.Add(new Voltage("CPU VCore", 0));
235 v.Add(new Voltage("DRAM", 1));
236 v.Add(new Voltage("+3.3V", 2));
237 v.Add(new Voltage("+5V", 3, 6.8f, 10, 0));
238 v.Add(new Voltage("+12V", 5, 27, 9.1f, 0));
239 v.Add(new Voltage("VBat", 8));
240 t.Add(new Temperature("System", 0));
241 t.Add(new Temperature("CPU", 2));
242 f.Add(new Fan("CPU Fan", 0));
243 f.Add(new Fan("System Fan #2", 1));
244 f.Add(new Fan("Power Fan", 2));
245 f.Add(new Fan("System Fan #1", 3));
247 case Model.GA_MA770T_UD3: // IT8720F
248 v.Add(new Voltage("CPU VCore", 0));
249 v.Add(new Voltage("DRAM", 1));
250 v.Add(new Voltage("+3.3V", 2));
251 v.Add(new Voltage("+5V", 3, 6.8f, 10, 0));
252 v.Add(new Voltage("+12V", 4, 27, 9.1f, 0));
253 v.Add(new Voltage("VBat", 8));
254 t.Add(new Temperature("System", 0));
255 t.Add(new Temperature("CPU", 1));
256 f.Add(new Fan("CPU Fan", 0));
257 f.Add(new Fan("System Fan #1", 1));
258 f.Add(new Fan("System Fan #2", 2));
259 f.Add(new Fan("Power Fan", 3));
261 case Model.GA_MA785GMT_UD2H: // IT8718F
262 v.Add(new Voltage("CPU VCore", 0));
263 v.Add(new Voltage("DRAM", 1));
264 v.Add(new Voltage("+3.3V", 2));
265 v.Add(new Voltage("+5V", 3, 6.8f, 10, 0));
266 v.Add(new Voltage("+12V", 4, 27, 9.1f, 0));
267 v.Add(new Voltage("VBat", 8));
268 t.Add(new Temperature("System", 0));
269 t.Add(new Temperature("CPU", 1));
270 f.Add(new Fan("CPU Fan", 0));
271 f.Add(new Fan("System Fan", 1));
272 f.Add(new Fan("NB Fan", 2));
274 case Model.X58A_UD3R: // IT8720F
275 v.Add(new Voltage("CPU VCore", 0));
276 v.Add(new Voltage("DRAM", 1));
277 v.Add(new Voltage("+3.3V", 2));
278 v.Add(new Voltage("+5V", 3, 6.8f, 10, 0));
279 v.Add(new Voltage("+12V", 5, 27, 9.1f, 0));
280 v.Add(new Voltage("VBat", 8));
281 t.Add(new Temperature("System", 0));
282 t.Add(new Temperature("CPU", 1));
283 t.Add(new Temperature("Northbridge", 2));
284 f.Add(new Fan("CPU Fan", 0));
285 f.Add(new Fan("System Fan #2", 1));
286 f.Add(new Fan("Power Fan", 2));
287 f.Add(new Fan("System Fan #1", 3));
290 v.Add(new Voltage("CPU VCore", 0));
291 v.Add(new Voltage("DRAM", 1, true));
292 v.Add(new Voltage("+3.3V", 2, true));
293 v.Add(new Voltage("+5V", 3, 6.8f, 10, 0, true));
294 v.Add(new Voltage("Voltage #5", 4, true));
295 v.Add(new Voltage("Voltage #6", 5, true));
296 v.Add(new Voltage("Voltage #7", 6, true));
297 v.Add(new Voltage("+12V", 7, 27, 9.1f, 0, true));
298 v.Add(new Voltage("VBat", 8));
299 for (int i = 0; i < superIO.Temperatures.Length; i++)
300 t.Add(new Temperature("Temperature #" + (i + 1), i));
301 for (int i = 0; i < superIO.Fans.Length; i++)
302 f.Add(new Fan("Fan #" + (i + 1), i));
308 v.Add(new Voltage("CPU VCore", 0));
309 v.Add(new Voltage("Voltage #2", 1, true));
310 v.Add(new Voltage("Voltage #3", 2, true));
311 v.Add(new Voltage("Voltage #4", 3, 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("Voltage #8", 7, 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 switch (manufacturer) {
327 case Manufacturer.ECS:
329 case Model.A890GXM_A: // IT8721F
330 v.Add(new Voltage("CPU VCore", 0));
331 v.Add(new Voltage("VDIMM", 1));
332 v.Add(new Voltage("NB Voltage", 2));
333 v.Add(new Voltage("Analog +3.3V", 3, 10, 10, 0));
334 // v.Add(new Voltage("VDIMM", 6, true));
335 v.Add(new Voltage("Standby +3.3V", 7, 10, 10, 0));
336 v.Add(new Voltage("VBat", 8, 10, 10, 0));
337 t.Add(new Temperature("CPU", 0));
338 t.Add(new Temperature("System", 1));
339 t.Add(new Temperature("Northbridge", 2));
340 f.Add(new Fan("CPU Fan", 0));
341 f.Add(new Fan("System Fan", 1));
342 f.Add(new Fan("Power Fan", 2));
345 v.Add(new Voltage("Voltage #1", 0, true));
346 v.Add(new Voltage("Voltage #2", 1, true));
347 v.Add(new Voltage("Voltage #3", 2, true));
348 v.Add(new Voltage("Analog +3.3V", 3, 10, 10, 0, true));
349 v.Add(new Voltage("Voltage #5", 4, true));
350 v.Add(new Voltage("Voltage #6", 5, true));
351 v.Add(new Voltage("Voltage #7", 6, true));
352 v.Add(new Voltage("Standby +3.3V", 7, 10, 10, 0, true));
353 v.Add(new Voltage("VBat", 8, 10, 10, 0));
354 for (int i = 0; i < superIO.Temperatures.Length; i++)
355 t.Add(new Temperature("Temperature #" + (i + 1), i));
356 for (int i = 0; i < superIO.Fans.Length; i++)
357 f.Add(new Fan("Fan #" + (i + 1), i));
362 v.Add(new Voltage("Voltage #1", 0, true));
363 v.Add(new Voltage("Voltage #2", 1, true));
364 v.Add(new Voltage("Voltage #3", 2, true));
365 v.Add(new Voltage("Analog +3.3V", 3, 10, 10, 0, true));
366 v.Add(new Voltage("Voltage #5", 4, true));
367 v.Add(new Voltage("Voltage #6", 5, true));
368 v.Add(new Voltage("Voltage #7", 6, true));
369 v.Add(new Voltage("Standby +3.3V", 7, 10, 10, 0, true));
370 v.Add(new Voltage("VBat", 8, 10, 10, 0));
371 for (int i = 0; i < superIO.Temperatures.Length; i++)
372 t.Add(new Temperature("Temperature #" + (i + 1), i));
373 for (int i = 0; i < superIO.Fans.Length; i++)
374 f.Add(new Fan("Fan #" + (i + 1), i));
380 v.Add(new Voltage("VCC3V", 0, 150, 150, 0));
381 v.Add(new Voltage("VSB3V", 1, 150, 150, 0));
382 v.Add(new Voltage("Battery", 2, 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));
393 switch (manufacturer) {
394 case Manufacturer.EVGA:
396 case Model.X58_SLI_Classified: // F71882
397 v.Add(new Voltage("VCC3V", 0, 150, 150, 0));
398 v.Add(new Voltage("CPU VCore", 1, 47, 100, 0));
399 v.Add(new Voltage("DIMM", 2, 47, 100, 0));
400 v.Add(new Voltage("CPU VTT", 3, 24, 100, 0));
401 v.Add(new Voltage("IOH Vcore", 4, 24, 100, 0));
402 v.Add(new Voltage("+5V", 5, 51, 12, 0));
403 v.Add(new Voltage("+12V", 6, 56, 6.8f, 0));
404 v.Add(new Voltage("3VSB", 7, 150, 150, 0));
405 v.Add(new Voltage("VBat", 8, 150, 150, 0));
406 t.Add(new Temperature("CPU", 0));
407 t.Add(new Temperature("VREG", 1));
408 t.Add(new Temperature("System", 2));
409 f.Add(new Fan("CPU Fan", 0));
410 f.Add(new Fan("Power Fan", 1));
411 f.Add(new Fan("Chassis Fan", 2));
414 v.Add(new Voltage("VCC3V", 0, 150, 150, 0));
415 v.Add(new Voltage("CPU VCore", 1));
416 v.Add(new Voltage("Voltage #3", 2, true));
417 v.Add(new Voltage("Voltage #4", 3, true));
418 v.Add(new Voltage("Voltage #5", 4, true));
419 v.Add(new Voltage("Voltage #6", 5, true));
420 v.Add(new Voltage("Voltage #7", 6, true));
421 v.Add(new Voltage("VSB3V", 7, 150, 150, 0));
422 v.Add(new Voltage("VBat", 8, 150, 150, 0));
423 for (int i = 0; i < superIO.Temperatures.Length; i++)
424 t.Add(new Temperature("Temperature #" + (i + 1), i));
425 for (int i = 0; i < superIO.Fans.Length; i++)
426 f.Add(new Fan("Fan #" + (i + 1), i));
431 v.Add(new Voltage("VCC3V", 0, 150, 150, 0));
432 v.Add(new Voltage("CPU VCore", 1));
433 v.Add(new Voltage("Voltage #3", 2, true));
434 v.Add(new Voltage("Voltage #4", 3, true));
435 v.Add(new Voltage("Voltage #5", 4, true));
436 v.Add(new Voltage("Voltage #6", 5, true));
437 v.Add(new Voltage("Voltage #7", 6, true));
438 v.Add(new Voltage("VSB3V", 7, 150, 150, 0));
439 v.Add(new Voltage("VBat", 8, 150, 150, 0));
440 for (int i = 0; i < superIO.Temperatures.Length; i++)
441 t.Add(new Temperature("Temperature #" + (i + 1), i));
442 for (int i = 0; i < superIO.Fans.Length; i++)
443 f.Add(new Fan("Fan #" + (i + 1), i));
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 v.Add(new Voltage("Voltage #10", 9, true));
459 t.Add(new Temperature("CPU", 0));
460 t.Add(new Temperature("Auxiliary", 1));
461 t.Add(new Temperature("System", 2));
462 f.Add(new Fan("System Fan", 0));
463 f.Add(new Fan("CPU Fan", 1));
464 f.Add(new Fan("Auxiliary Fan", 2));
465 f.Add(new Fan("CPU Fan #2", 3));
466 f.Add(new Fan("Auxiliary Fan #2", 4));
469 case Chip.W83627DHGP:
472 switch (manufacturer) {
473 case Manufacturer.ASRock:
475 case Model._880GMH_USB3: // W83627DHG-P
476 v.Add(new Voltage("CPU VCore", 0));
477 v.Add(new Voltage("+3.3V", 3, 34, 34, 0));
478 v.Add(new Voltage("+5V", 5, 15, 7.5f, 0));
479 v.Add(new Voltage("+12V", 6, 56, 10, 0));
480 v.Add(new Voltage("Standby +3.3V", 7, 34, 34, 0));
481 v.Add(new Voltage("VBAT", 8, 34, 34, 0));
482 t.Add(new Temperature("CPU", 0));
483 t.Add(new Temperature("Motherboard", 2));
484 f.Add(new Fan("Chassis Fan", 0));
485 f.Add(new Fan("CPU Fan", 1));
486 f.Add(new Fan("Power Fan", 2));
489 v.Add(new Voltage("CPU VCore", 0));
490 v.Add(new Voltage("Voltage #2", 1, true));
491 v.Add(new Voltage("AVCC", 2, 34, 34, 0));
492 v.Add(new Voltage("3VCC", 3, 34, 34, 0));
493 v.Add(new Voltage("Voltage #5", 4, true));
494 v.Add(new Voltage("Voltage #6", 5, true));
495 v.Add(new Voltage("Voltage #7", 6, true));
496 v.Add(new Voltage("3VSB", 7, 34, 34, 0));
497 v.Add(new Voltage("VBAT", 8, 34, 34, 0));
498 t.Add(new Temperature("CPU", 0));
499 t.Add(new Temperature("Auxiliary", 1));
500 t.Add(new Temperature("System", 2));
501 f.Add(new Fan("System Fan", 0));
502 f.Add(new Fan("CPU Fan", 1));
503 f.Add(new Fan("Auxiliary Fan", 2));
504 f.Add(new Fan("CPU Fan #2", 3));
505 f.Add(new Fan("Auxiliary Fan #2", 4));
509 case Manufacturer.ASUS:
511 case Model.P6X58D_E: // W83667HG
512 case Model.Rampage_II_GENE: // W83667HG
513 v.Add(new Voltage("CPU VCore", 0));
514 v.Add(new Voltage("+12V", 1, 11.5f, 1.91f, 0));
515 v.Add(new Voltage("Analog +3.3V", 2, 34, 34, 0));
516 v.Add(new Voltage("+3.3V", 3, 34, 34, 0));
517 v.Add(new Voltage("+5V", 4, 15, 7.5f, 0));
518 v.Add(new Voltage("Standby +3.3V", 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("Motherboard", 2));
522 f.Add(new Fan("Chassis Fan #1", 0));
523 f.Add(new Fan("CPU Fan", 1));
524 f.Add(new Fan("Power Fan", 2));
525 f.Add(new Fan("Chassis Fan #2", 3));
526 f.Add(new Fan("Chassis Fan #3", 4));
528 case Model.Rampage_Extreme: // W83667HG
529 v.Add(new Voltage("CPU VCore", 0));
530 v.Add(new Voltage("+12V", 1, 12, 2, 0));
531 v.Add(new Voltage("Analog +3.3V", 2, 34, 34, 0));
532 v.Add(new Voltage("+3.3V", 3, 34, 34, 0));
533 v.Add(new Voltage("+5V", 4, 15, 7.5f, 0));
534 v.Add(new Voltage("Standby +3.3V", 7, 34, 34, 0));
535 v.Add(new Voltage("VBAT", 8, 34, 34, 0));
536 t.Add(new Temperature("CPU", 0));
537 t.Add(new Temperature("Motherboard", 2));
538 f.Add(new Fan("Chassis Fan #1", 0));
539 f.Add(new Fan("CPU Fan", 1));
540 f.Add(new Fan("Power Fan", 2));
541 f.Add(new Fan("Chassis Fan #2", 3));
542 f.Add(new Fan("Chassis Fan #3", 4));
545 v.Add(new Voltage("CPU VCore", 0));
546 v.Add(new Voltage("Voltage #2", 1, true));
547 v.Add(new Voltage("AVCC", 2, 34, 34, 0));
548 v.Add(new Voltage("3VCC", 3, 34, 34, 0));
549 v.Add(new Voltage("Voltage #5", 4, true));
550 v.Add(new Voltage("Voltage #6", 5, true));
551 v.Add(new Voltage("Voltage #7", 6, true));
552 v.Add(new Voltage("3VSB", 7, 34, 34, 0));
553 v.Add(new Voltage("VBAT", 8, 34, 34, 0));
554 t.Add(new Temperature("CPU", 0));
555 t.Add(new Temperature("Auxiliary", 1));
556 t.Add(new Temperature("System", 2));
557 f.Add(new Fan("System Fan", 0));
558 f.Add(new Fan("CPU Fan", 1));
559 f.Add(new Fan("Auxiliary Fan", 2));
560 f.Add(new Fan("CPU Fan #2", 3));
561 f.Add(new Fan("Auxiliary Fan #2", 4));
566 v.Add(new Voltage("CPU VCore", 0));
567 v.Add(new Voltage("Voltage #2", 1, true));
568 v.Add(new Voltage("AVCC", 2, 34, 34, 0));
569 v.Add(new Voltage("3VCC", 3, 34, 34, 0));
570 v.Add(new Voltage("Voltage #5", 4, true));
571 v.Add(new Voltage("Voltage #6", 5, true));
572 v.Add(new Voltage("Voltage #7", 6, true));
573 v.Add(new Voltage("3VSB", 7, 34, 34, 0));
574 v.Add(new Voltage("VBAT", 8, 34, 34, 0));
575 t.Add(new Temperature("CPU", 0));
576 t.Add(new Temperature("Auxiliary", 1));
577 t.Add(new Temperature("System", 2));
578 f.Add(new Fan("System Fan", 0));
579 f.Add(new Fan("CPU Fan", 1));
580 f.Add(new Fan("Auxiliary Fan", 2));
581 f.Add(new Fan("CPU Fan #2", 3));
582 f.Add(new Fan("Auxiliary Fan #2", 4));
589 v.Add(new Voltage("CPU VCore", 0));
590 v.Add(new Voltage("Voltage #2", 1, true));
591 v.Add(new Voltage("Voltage #3", 2, true));
592 v.Add(new Voltage("AVCC", 3, 34, 51, 0));
593 v.Add(new Voltage("Voltage #5", 4, true));
594 v.Add(new Voltage("5VSB", 5, 34, 51, 0));
595 v.Add(new Voltage("VBAT", 6));
596 t.Add(new Temperature("CPU", 0));
597 t.Add(new Temperature("Auxiliary", 1));
598 t.Add(new Temperature("System", 2));
599 f.Add(new Fan("System Fan", 0));
600 f.Add(new Fan("CPU Fan", 1));
601 f.Add(new Fan("Auxiliary Fan", 2));
604 for (int i = 0; i < superIO.Voltages.Length; i++)
605 v.Add(new Voltage("Voltage #" + (i + 1), i, true));
606 for (int i = 0; i < superIO.Temperatures.Length; i++)
607 t.Add(new Temperature("Temperature #" + (i + 1), i));
608 for (int i = 0; i < superIO.Fans.Length; i++)
609 f.Add(new Fan("Fan #" + (i + 1), i));
613 string formula = "Voltage = value + (value - Vf) * Ri / Rf.";
614 foreach (Voltage voltage in v)
615 if (voltage.Index < superIO.Voltages.Length) {
616 Sensor sensor = new Sensor(voltage.Name, voltage.Index,
617 voltage.Hidden, SensorType.Voltage, this,
618 new ParameterDescription[] {
619 new ParameterDescription("Ri [kΩ]", "Input resistance.\n" +
620 formula, voltage.Ri),
621 new ParameterDescription("Rf [kΩ]", "Reference resistance.\n" +
622 formula, voltage.Rf),
623 new ParameterDescription("Vf [V]", "Reference voltage.\n" +
626 voltages.Add(sensor);
629 foreach (Temperature temperature in t)
630 if (temperature.Index < superIO.Temperatures.Length) {
631 Sensor sensor = new Sensor(temperature.Name, temperature.Index,
632 SensorType.Temperature, this, new ParameterDescription[] {
633 new ParameterDescription("Offset [°C]", "Temperature offset.", 0)
635 temperatures.Add(sensor);
638 foreach (Fan fan in f)
639 if (fan.Index < superIO.Fans.Length) {
640 Sensor sensor = new Sensor(fan.Name, fan.Index, SensorType.Fan,
646 public override Identifier Identifier {
648 return new Identifier("lpc",
649 superIO.Chip.ToString().ToLower(CultureInfo.InvariantCulture));
653 public override HardwareType HardwareType {
654 get { return HardwareType.SuperIO; }
657 public override IHardware Parent {
658 get { return mainboard; }
661 public override string Name {
665 public override string GetReport() {
666 return superIO.GetReport();
669 public override void Update() {
672 foreach (Sensor sensor in voltages) {
673 float? value = superIO.Voltages[sensor.Index];
674 if (value.HasValue) {
675 sensor.Value = value + (value - sensor.Parameters[2].Value) *
676 sensor.Parameters[0].Value / sensor.Parameters[1].Value;
677 ActivateSensor(sensor);
681 foreach (Sensor sensor in temperatures) {
682 float? value = superIO.Temperatures[sensor.Index];
683 if (value.HasValue) {
684 sensor.Value = value + sensor.Parameters[0].Value;
685 ActivateSensor(sensor);
689 foreach (Sensor sensor in fans) {
690 float? value = superIO.Fans[sensor.Index];
691 if (value.HasValue) {
692 sensor.Value = value;
694 ActivateSensor(sensor);
699 private class Voltage {
700 public readonly string Name;
701 public readonly int Index;
702 public readonly float Ri;
703 public readonly float Rf;
704 public readonly float Vf;
705 public readonly bool Hidden;
707 public Voltage(string name, int index) :
708 this(name, index, 0, 1, 0, false) { }
710 public Voltage(string name, int index, bool hidden) :
711 this(name, index, 0, 1, 0, hidden) { }
713 public Voltage(string name, int index, float ri, float rf, float vf) :
714 this(name, index, ri, rf, vf, false) { }
716 public Voltage(string name, int index, float ri, float rf, float vf,
723 this.Hidden = hidden;
727 private class Temperature {
728 public readonly string Name;
729 public readonly int Index;
731 public Temperature(string name, int index) {
738 public readonly string Name;
739 public readonly int Index;
741 public Fan(string name, int index) {