Skip to content

Commit df8db2b

Browse files
committed
Rename 'CPU VDDIO / MC' to 'CPU VDDIO Memory'
Update SuperIOHardware.cs
1 parent c68476f commit df8db2b

1 file changed

Lines changed: 39 additions & 40 deletions

File tree

OpenHardwareMonitorLib/Hardware/Motherboard/SuperIOHardware.cs

Lines changed: 39 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ namespace OpenHardwareMonitor.Hardware.Motherboard;
77

88
internal sealed class SuperIOHardware : Hardware
99
{
10-
private readonly List<Sensor> _controls = new();
11-
private readonly List<Sensor> _fans = new();
10+
private readonly List<Sensor> _controls = [];
11+
private readonly List<Sensor> _fans = [];
1212
private readonly Motherboard _motherboard;
1313

1414
private readonly UpdateDelegate _postUpdate;
@@ -18,8 +18,8 @@ internal sealed class SuperIOHardware : Hardware
1818
private readonly ReadValueDelegate _readVoltage;
1919

2020
private readonly ISuperIO _superIO;
21-
private readonly List<Sensor> _temperatures = new();
22-
private readonly List<Sensor> _voltages = new();
21+
private readonly List<Sensor> _temperatures = [];
22+
private readonly List<Sensor> _voltages = [];
2323

2424
public SuperIOHardware(Motherboard motherboard, ISuperIO superIO, Manufacturer manufacturer, Model model, ISettings settings, int index)
2525
: base(ChipName.GetName(superIO.Chip), new Identifier("lpc", superIO.Chip.ToString().ToLowerInvariant(), index.ToString()), settings)
@@ -138,7 +138,7 @@ private void CreateTemperatureSensors(ISuperIO superIO, ISettings settings, ILis
138138
temperature.Index,
139139
SensorType.Temperature,
140140
this,
141-
new[] { new ParameterDescription("Offset [°C]", "Temperature offset.", 0) },
141+
[new ParameterDescription("Offset [°C]", "Temperature offset.", 0)],
142142
settings);
143143

144144
_temperatures.Add(sensor);
@@ -158,12 +158,11 @@ private void CreateVoltageSensors(ISuperIO superIO, ISettings settings, IList<Vo
158158
voltage.Hidden,
159159
SensorType.Voltage,
160160
this,
161-
new[]
162-
{
161+
[
163162
new ParameterDescription("Ri [kΩ]", "Input resistance.\n" + formula, voltage.Ri),
164163
new ParameterDescription("Rf [kΩ]", "Reference resistance.\n" + formula, voltage.Rf),
165164
new ParameterDescription("Vf [V]", "Reference voltage.\n" + formula, voltage.Vf)
166-
},
165+
],
167166
settings);
168167

169168
_voltages.Add(sensor);
@@ -466,8 +465,8 @@ private static void GetBoardSpecificConfiguration
466465
v.Add(new Voltage("+12V", 0));
467466
v.Add(new Voltage("+5V", 1));
468467
v.Add(new Voltage("CPU Northbridge/SoC", 2));
469-
v.Add(new Voltage("CPU VDDIO", 3, 1, 1, 0));
470-
v.Add(new Voltage("Vcore", 4, -1, 2, 0));
468+
v.Add(new Voltage("CPU VDDIO", 3, 1, 1));
469+
v.Add(new Voltage("Vcore", 4, -1, 2));
471470
v.Add(new Voltage("+3.3V", 8));
472471
v.Add(new Voltage("+3V Standby", 11));
473472
v.Add(new Voltage("AVSB", 12));
@@ -676,7 +675,6 @@ private static void GetBoardSpecificConfiguration
676675
v.Add(new Voltage("CMOS Battery", 13));
677676

678677
break;
679-
680678
}
681679

682680
break;
@@ -1203,7 +1201,7 @@ private static void GetASRockConfiguration
12031201
return null;
12041202

12051203
// read the last 3 fans based on GPIO 83-85
1206-
int[] masks = { 0x05, 0x03, 0x06 };
1204+
int[] masks = [0x05, 0x03, 0x06];
12071205
return ((gpio.Value >> 3) & 0x07) == masks[index - 2] ? superIO.Fans[2] : null;
12081206
};
12091207

@@ -1217,7 +1215,7 @@ private static void GetASRockConfiguration
12171215
return;
12181216

12191217
// prepare the GPIO 83-85 for the next update
1220-
int[] masks = { 0x05, 0x03, 0x06 };
1218+
int[] masks = [0x05, 0x03, 0x06];
12211219
superIO.WriteGpio(7, (byte)((gpio.Value & 0xC7) | (masks[fanIndex] << 3)));
12221220
fanIndex = (fanIndex + 1) % 3;
12231221
};
@@ -3250,7 +3248,7 @@ private static void GetNuvotonConfigurationD(ISuperIO superIO, Manufacturer manu
32503248
t.Add(new Temperature("Motherboard", 2));
32513249
t.Add(new Temperature("Auxiliary", 3));
32523250
t.Add(new Temperature("VRM", 4));
3253-
t.Add(new Temperature("AUXTIN2", 5));
3251+
t.Add(new Temperature("Auxiliary Index #2", 5));
32543252
//t.Add(new Temperature("Temperature #6", 6));
32553253

32563254
for (int i = 0; i < superIO.Fans.Length; i++)
@@ -3542,11 +3540,11 @@ private static void GetNuvotonConfigurationD(ISuperIO superIO, Manufacturer manu
35423540

35433541
// no idea what these sources are actually connected to.
35443542
//t.Add(new Temperature("CPUTIN", 1));
3545-
//t.Add(new Temperature("AUXTIN0", 3));
3546-
//t.Add(new Temperature("AUXTIN1", 4));
3547-
//t.Add(new Temperature("AUXTIN2", 5));
3548-
//t.Add(new Temperature("AUXTIN3", 6));
3549-
//t.Add(new Temperature("AUXTIN4", 7));
3543+
//t.Add(new Temperature("Auxiliary Index #0", 3));
3544+
//t.Add(new Temperature("Auxiliary Index #1", 4));
3545+
//t.Add(new Temperature("Auxiliary Index #2", 5));
3546+
//t.Add(new Temperature("Auxiliary Index #3", 6));
3547+
//t.Add(new Temperature("Auxiliary Index #4", 7));
35503548
//t.Add(new Temperature("TSENSOR", 8));
35513549
//t.Add(new Temperature("VIRTUAL_TEMP", 24));
35523550

@@ -3643,6 +3641,7 @@ private static void GetNuvotonConfigurationD(ISuperIO superIO, Manufacturer manu
36433641
t.Add(new Temperature("External #2", 4));
36443642
t.Add(new Temperature("External #3", 5));
36453643
}
3644+
36463645
break;
36473646

36483647
case Model.B650M_C: // NCT6799D
@@ -3716,7 +3715,7 @@ private static void GetNuvotonConfigurationD(ISuperIO superIO, Manufacturer manu
37163715
t.Add(new Temperature("PCH TS10", 9));
37173716

37183717
t.Add(new Temperature("Auxiliary", 3));
3719-
t.Add(new Temperature("AUXTIN #1", 4));
3718+
t.Add(new Temperature("Auxiliary Index #1", 4));
37203719

37213720
t.Add(new Temperature("Thermistor Sensor #1", 5)); // T_SENSOR 1
37223721
t.Add(new Temperature("Thermistor Sensor #2", 6)); // T_SENSOR 2
@@ -3866,8 +3865,8 @@ private static void GetNuvotonConfigurationD(ISuperIO superIO, Manufacturer manu
38663865

38673866
// CPU Fan Optional uses the same fancontrol as CPU Fan.
38683867
// Water Pump speed can only be read from the EC.
3869-
string[] fanNames = { "Chassis Fan 1", "CPU Fan", "Chassis Fan 2", "Chassis Fan 3", "Chassis Fan 4", "CPU Fan Optional" };
3870-
fanControlNames = new[] { "Chassis Fan 1", "CPU Fan", "Chassis Fan 2", "Chassis Fan 3", "Chassis Fan 4", "Water Pump" };
3868+
string[] fanNames = ["Chassis Fan 1", "CPU Fan", "Chassis Fan 2", "Chassis Fan 3", "Chassis Fan 4", "CPU Fan Optional"];
3869+
fanControlNames = ["Chassis Fan 1", "CPU Fan", "Chassis Fan 2", "Chassis Fan 3", "Chassis Fan 4", "Water Pump"];
38713870

38723871
for (int i = 0; i < fanNames.Length; i++)
38733872
f.Add(new Fan(fanNames[i], i));
@@ -4033,7 +4032,7 @@ private static void GetNuvotonConfigurationD(ISuperIO superIO, Manufacturer manu
40334032
t.Add(new Temperature("PECI 1 Calibrated", 22));
40344033
t.Add(new Temperature("Virtual", 23));
40354034

4036-
fanControlNames = new[] { "Chassis Fan 1", "CPU Fan", "Chassis Fan 2", "Chassis Fan 3", "High Amp Fan", "Waterpump", "AIO Pump" };
4035+
fanControlNames = ["Chassis Fan 1", "CPU Fan", "Chassis Fan 2", "Chassis Fan 3", "High Amp Fan", "Waterpump", "AIO Pump"];
40374036
System.Diagnostics.Debug.Assert(fanControlNames.Length == superIO.Fans.Length,
40384037
$"Expected {fanControlNames.Length} fan register in the SuperIO chip");
40394038

@@ -4072,7 +4071,7 @@ private static void GetNuvotonConfigurationD(ISuperIO superIO, Manufacturer manu
40724071
t.Add(new Temperature("CPU (PECI)", 7));
40734072
t.Add(new Temperature("CPU", 8));
40744073

4075-
fanControlNames = new[] { "Chassis Fan 1", "CPU Fan", "Chassis Fan 2", "Chassis Fan 3", "High Amp Fan", "Water Pump+", "AIO Pump" };
4074+
fanControlNames = ["Chassis Fan 1", "CPU Fan", "Chassis Fan 2", "Chassis Fan 3", "High Amp Fan", "Water Pump+", "AIO Pump"];
40764075
System.Diagnostics.Debug.Assert(fanControlNames.Length == superIO.Fans.Length,
40774076
$"Expected {fanControlNames.Length} fan register in the SuperIO chip");
40784077

@@ -4154,7 +4153,7 @@ private static void GetNuvotonConfigurationD(ISuperIO superIO, Manufacturer manu
41544153
t.Add(new Temperature("Temperature #5", 6));
41554154

41564155
// note: CPU_Opt, W_Pump+, EXT_FAN 1 & 2 are on the ASUS EC controller. Together with VRM og PCH temperatures. And additional voltages and power
4157-
fanControlNames = new[] { "Chassis Fan 1", "CPU Fan", "Chassis Fan 2", "Chassis Fan 3", "AIO Pump", "HAMP" };
4156+
fanControlNames = ["Chassis Fan 1", "CPU Fan", "Chassis Fan 2", "Chassis Fan 3", "AIO Pump", "HAMP"];
41584157

41594158
for (int i = 0; i < fanControlNames.Length; i++)
41604159
f.Add(new Fan(fanControlNames[i], i));
@@ -4191,7 +4190,7 @@ private static void GetNuvotonConfigurationD(ISuperIO superIO, Manufacturer manu
41914190
t.Add(new Temperature("PCH", 12));
41924191
t.Add(new Temperature("Temperature #9", 21));
41934192

4194-
fanControlNames = new[] { "Chassis Fan 1", "CPU Fan", "Chassis Fan 2", "Chassis Fan 3", "Chassis Fan 4", "Waterpump", "AIO Pump" };
4193+
fanControlNames = ["Chassis Fan 1", "CPU Fan", "Chassis Fan 2", "Chassis Fan 3", "Chassis Fan 4", "Waterpump", "AIO Pump"];
41954194

41964195
System.Diagnostics.Debug.Assert(fanControlNames.Length == superIO.Fans.Length,
41974196
$"Expected {fanControlNames.Length} fan register in the SuperIO chip");
@@ -4237,7 +4236,7 @@ private static void GetNuvotonConfigurationD(ISuperIO superIO, Manufacturer manu
42374236
t.Add(new Temperature("CPU", 21)); // Matches CPU in HWinfo & Armoury Crate.
42384237

42394238
// note that CPU Opt Fan is on the ASUS EC controller. Together with VRM, T_Sensor, WaterIn, WaterOut and WaterFlow + additional sensors.
4240-
fanControlNames = new[] { "Chassis Fan 1", "CPU Fan", "Chassis Fan 2", "Chassis Fan 3", "Chassis Fan 4", "Waterpump", "AIO Pump" };
4239+
fanControlNames = ["Chassis Fan 1", "CPU Fan", "Chassis Fan 2", "Chassis Fan 3", "Chassis Fan 4", "Waterpump", "AIO Pump"];
42414240

42424241
System.Diagnostics.Debug.Assert(fanControlNames.Length == superIO.Fans.Length,
42434242
$"Expected {fanControlNames.Length} fan register in the SuperIO chip");
@@ -4281,7 +4280,7 @@ private static void GetNuvotonConfigurationD(ISuperIO superIO, Manufacturer manu
42814280
t.Add(new Temperature("PCH", 12));
42824281
t.Add(new Temperature("Temperature #9", 21));
42834282

4284-
fanControlNames = new[] { "Chassis Fan 1", "CPU Fan", "Radiator Fan 1", "Radiator Fan 2", "Chassis Fan 2", "Water Pump 1", "Water Pump 2" };
4283+
fanControlNames = ["Chassis Fan 1", "CPU Fan", "Radiator Fan 1", "Radiator Fan 2", "Chassis Fan 2", "Water Pump 1", "Water Pump 2"];
42854284
System.Diagnostics.Debug.Assert(fanControlNames.Length == superIO.Fans.Length,
42864285
$"Expected {fanControlNames.Length} fan register in the SuperIO chip");
42874286

@@ -4371,7 +4370,7 @@ private static void GetNuvotonConfigurationD(ISuperIO superIO, Manufacturer manu
43714370
break;
43724371

43734372
case Model.ROG_STRIX_B760_I_GAMING_WIFI: //NCT6798D
4374-
4373+
43754374
v.Add(new Voltage("Vcore", 0));
43764375
v.Add(new Voltage("+5V", 1, 4, 1));
43774376
v.Add(new Voltage("AVSB", 2, 34, 34));
@@ -4643,7 +4642,7 @@ private static void GetNuvotonConfigurationD(ISuperIO superIO, Manufacturer manu
46434642
v.Add(new Voltage("+3V Standby", 7, 34, 34));
46444643
v.Add(new Voltage("CMOS Battery", 8, 34, 34));
46454644
v.Add(new Voltage("CPU Termination", 9));
4646-
v.Add(new Voltage("CPU VDDIO / MC", 10, 1, 1));
4645+
v.Add(new Voltage("CPU VDDIO Memory", 10, 1, 1));
46474646

46484647
t.Add(new Temperature("CPU", 22));
46494648
t.Add(new Temperature("Motherboard", 2));
@@ -4743,12 +4742,12 @@ private static void GetNuvotonConfigurationD(ISuperIO superIO, Manufacturer manu
47434742
v.Add(new Voltage("+3V Standby", 7, 34, 34));
47444743
v.Add(new Voltage("CMOS Battery", 8, 34, 34));
47454744
v.Add(new Voltage("CPU Termination", 9, true)); // Value does not match any in hwmonnitor
4746-
v.Add(new Voltage("CPU VDDIO / MC", 10, 1, 1));
4745+
v.Add(new Voltage("CPU VDDIO Memory", 10, 1, 1));
47474746

47484747
t.Add(new Temperature("Motherboard", 2));
47494748
t.Add(new Temperature("CPU", 22));
47504749

4751-
fanControlNames = new[] { "Chassis Fan #1", "CPU Fan", "Chassis Fan #2", "Chassis Fan #3", "Chassis Fan #4", "Chassis Fan #5", "AIO Pump" };
4750+
fanControlNames = ["Chassis Fan #1", "CPU Fan", "Chassis Fan #2", "Chassis Fan #3", "Chassis Fan #4", "Chassis Fan #5", "AIO Pump"];
47524751

47534752
System.Diagnostics.Debug.Assert(fanControlNames.Length == superIO.Fans.Length, $"Expected {fanControlNames.Length} fan register in the SuperIO chip");
47544753
System.Diagnostics.Debug.Assert(superIO.Fans.Length == superIO.Controls.Length, "Expected counts of cans controls and fan speed registers to be equal");
@@ -4794,7 +4793,7 @@ private static void GetNuvotonConfigurationD(ISuperIO superIO, Manufacturer manu
47944793
v.Add(new Voltage("+3V Standby", 7, 34, 34));
47954794
v.Add(new Voltage("CMOS Battery", 8, 34, 34));
47964795
v.Add(new Voltage("CPU Termination", 9, 34, 34));
4797-
v.Add(new Voltage("CPU VDDIO / MC", 10, 1, 1));
4796+
v.Add(new Voltage("CPU VDDIO Memory", 10, 1, 1));
47984797
v.Add(new Voltage("Voltage #12", 11, true));
47994798
v.Add(new Voltage("+1.8V Standby", 12, true)); // Uknown values needed for tuning, hidden for now
48004799
v.Add(new Voltage("Voltage #14", 13, true));
@@ -4806,7 +4805,7 @@ private static void GetNuvotonConfigurationD(ISuperIO superIO, Manufacturer manu
48064805
t.Add(new Temperature("VRM", 7));
48074806
t.Add(new Temperature("CPU", 22));
48084807

4809-
fanControlNames = new[] { "Chassis Fan #1", "CPU Fan", "Chassis Fan #2", "Chassis Fan #3", "CPU_OPT", "Chassis Fan #4", "AIO Pump" };
4808+
fanControlNames = ["Chassis Fan #1", "CPU Fan", "Chassis Fan #2", "Chassis Fan #3", "CPU_OPT", "Chassis Fan #4", "AIO Pump"];
48104809

48114810
for (int i = 0; i < fanControlNames.Length; i++)
48124811
f.Add(new Fan(fanControlNames[i], i));
@@ -4825,7 +4824,7 @@ private static void GetNuvotonConfigurationD(ISuperIO superIO, Manufacturer manu
48254824
v.Add(new Voltage("+3V Standby", 7, 34, 34));
48264825
v.Add(new Voltage("CMOS Battery", 8, 34, 34));
48274826
v.Add(new Voltage("VTT", 9, 34, 34));
4828-
v.Add(new Voltage("CPU VDDIO / MC Voltage", 10, 34, 34));
4827+
v.Add(new Voltage("CPU VDDIO Memory", 10, 34, 34));
48294828
v.Add(new Voltage("VMISC", 11, 34, 34));
48304829
v.Add(new Voltage("1.8V Standby", 12, 7.66f, 10));
48314830

@@ -4859,7 +4858,7 @@ private static void GetNuvotonConfigurationD(ISuperIO superIO, Manufacturer manu
48594858
v.Add(new Voltage("Chipset 0 VDD", 10, 1, 1));
48604859
v.Add(new Voltage("Chipset 1 VDD", 11, 1, 1));
48614860
v.Add(new Voltage("Chipset Standby", 12));
4862-
v.Add(new Voltage("CPU VDDIO / MC", 13, 9, 82));
4861+
v.Add(new Voltage("CPU VDDIO Memory", 13, 9, 82));
48634862
v.Add(new Voltage("1.8V PLL", 14, 17, 36));
48644863

48654864
// The following mappings only apply when FanXpert is off in Armoury Crate.
@@ -4906,13 +4905,13 @@ private static void GetNuvotonConfigurationD(ISuperIO superIO, Manufacturer manu
49064905
v.Add(new Voltage("+3V Standby", 7, 34, 34));
49074906
v.Add(new Voltage("CMOS Battery", 8, 34, 34));
49084907
v.Add(new Voltage("CPU Termination", 9, true)); // Value does not match any in hwmonitor
4909-
v.Add(new Voltage("CPU VDDIO / MC", 10, 1, 1));
4908+
v.Add(new Voltage("CPU VDDIO Memory", 10, 1, 1));
49104909

49114910
t.Add(new Temperature("CPU Package", 0));
49124911
t.Add(new Temperature("Motherboard", 2));
49134912
t.Add(new Temperature("CPU", 22));
49144913

4915-
fanControlNames = new[] { "Chassis Fan #1", "CPU Fan", "Chassis Fan #2", "Chassis Fan #3", "Chassis Fan #4", "Water Pump", "AIO Pump" };
4914+
fanControlNames = ["Chassis Fan #1", "CPU Fan", "Chassis Fan #2", "Chassis Fan #3", "Chassis Fan #4", "Water Pump", "AIO Pump"];
49164915

49174916
System.Diagnostics.Debug.Assert(fanControlNames.Length == superIO.Fans.Length, $"Expected {fanControlNames.Length} fan register in the SuperIO chip");
49184917
System.Diagnostics.Debug.Assert(superIO.Fans.Length == superIO.Controls.Length, "Expected counts of fan controls and fan speed registers to be equal");
@@ -4964,7 +4963,7 @@ private static void GetNuvotonConfigurationD(ISuperIO superIO, Manufacturer manu
49644963
v.Add(new Voltage("+3V Standby", 7, 34, 34));
49654964
v.Add(new Voltage("CMOS Battery", 8, 34, 34));
49664965
v.Add(new Voltage("VTT", 9, 34, 34));
4967-
v.Add(new Voltage("CPU VDDIO / MC Voltage", 10, 34, 34));
4966+
v.Add(new Voltage("CPU VDDIO Memory", 10, 34, 34));
49684967
v.Add(new Voltage("VMISC", 11, 34, 34));
49694968
v.Add(new Voltage("1,8V Standby", 12, 7.66f, 10));
49704969
v.Add(new Voltage("Voltage #14", 13, true));
@@ -5132,7 +5131,7 @@ private static void GetNuvotonConfigurationD(ISuperIO superIO, Manufacturer manu
51325131
v.Add(new Voltage("+3.3V", 3, 34, 34));
51335132
v.Add(new Voltage("+12V", 4, 11, 1));
51345133
//v.Add(new Voltage("Voltage #6", 5));
5135-
v.Add(new Voltage("VIN4", 6, false));
5134+
v.Add(new Voltage("VIN4", 6));
51365135
v.Add(new Voltage("+3V Standby", 7, 34, 34));
51375136
v.Add(new Voltage("CMOS Battery", 8, 34, 34));
51385137
v.Add(new Voltage("CPU Termination", 9));

0 commit comments

Comments
 (0)