Hardware/LPC/F718XX.cs
changeset 195 0ee888c485d5
parent 166 fa9dfbfc4145
child 228 458a6c3de579
     1.1 --- a/Hardware/LPC/F718XX.cs	Tue Sep 21 10:33:28 2010 +0000
     1.2 +++ b/Hardware/LPC/F718XX.cs	Tue Sep 21 20:32:36 2010 +0000
     1.3 @@ -35,20 +35,18 @@
     1.4   
     1.5  */
     1.6  
     1.7 -using System;
     1.8 -using System.Collections.Generic;
     1.9  using System.Globalization;
    1.10  using System.Text;
    1.11  
    1.12  namespace OpenHardwareMonitor.Hardware.LPC {
    1.13    internal class F718XX : ISuperIO {
    1.14  
    1.15 -    private ushort address;
    1.16 -    private Chip chip;
    1.17 +    private readonly ushort address;
    1.18 +    private readonly Chip chip;
    1.19  
    1.20 -    private float?[] voltages;
    1.21 -    private float?[] temperatures;
    1.22 -    private float?[] fans;
    1.23 +    private readonly float?[] voltages;
    1.24 +    private readonly float?[] temperatures;
    1.25 +    private readonly float?[] fans;
    1.26  
    1.27      // Hardware Monitor
    1.28      private const byte ADDRESS_REGISTER_OFFSET = 0x05;
    1.29 @@ -58,7 +56,8 @@
    1.30      private const byte VOLTAGE_BASE_REG = 0x20;
    1.31      private const byte TEMPERATURE_CONFIG_REG = 0x69;
    1.32      private const byte TEMPERATURE_BASE_REG = 0x70;
    1.33 -    private byte[] FAN_TACHOMETER_REG = new byte[] { 0xA0, 0xB0, 0xC0, 0xD0 };
    1.34 +    private readonly byte[] FAN_TACHOMETER_REG = 
    1.35 +      new byte[] { 0xA0, 0xB0, 0xC0, 0xD0 };
    1.36      
    1.37      private byte ReadByte(byte register) {
    1.38        WinRing0.WriteIoPortByte(
    1.39 @@ -126,7 +125,7 @@
    1.40        for (int i = 0; i < temperatures.Length; i++) {
    1.41          switch (chip) {
    1.42            case Chip.F71858: {
    1.43 -              int tableMode = 0x3 & ReadByte((byte)(TEMPERATURE_CONFIG_REG));
    1.44 +              int tableMode = 0x3 & ReadByte(TEMPERATURE_CONFIG_REG);
    1.45                int high = 
    1.46                  ReadByte((byte)(TEMPERATURE_BASE_REG + 2 * i));
    1.47                int low =