Hardware/LPC/NCT677X.cs
changeset 419 07d44b20bbd4
parent 417 4865cf06a7fa
     1.1 --- a/Hardware/LPC/NCT677X.cs	Sat Aug 03 13:12:07 2013 +0000
     1.2 +++ b/Hardware/LPC/NCT677X.cs	Sun Aug 04 06:54:46 2013 +0000
     1.3 @@ -20,6 +20,8 @@
     1.4  
     1.5      private readonly Chip chip;
     1.6  
     1.7 +    private readonly bool isNuvotonVendor;
     1.8 +
     1.9      private readonly float?[] voltages = new float?[0];
    1.10      private readonly float?[] temperatures = new float?[0];
    1.11      private readonly float?[] fans = new float?[0];
    1.12 @@ -162,7 +164,10 @@
    1.13        this.revision = revision;
    1.14        this.port = port;
    1.15  
    1.16 -      if (!IsNuvotonVendor())
    1.17 +
    1.18 +      this.isNuvotonVendor = IsNuvotonVendor();
    1.19 +
    1.20 +      if (!isNuvotonVendor)
    1.21          return;
    1.22  
    1.23        switch (chip) {
    1.24 @@ -293,6 +298,9 @@
    1.25      }
    1.26  
    1.27      public void SetControl(int index, byte? value) {
    1.28 +      if (!isNuvotonVendor)
    1.29 +        return;
    1.30 +
    1.31        if (index < 0 || index >= controls.Length)
    1.32          throw new ArgumentOutOfRangeException("index");
    1.33  
    1.34 @@ -321,6 +329,9 @@
    1.35      public float?[] Controls { get { return controls; } }
    1.36  
    1.37      public void Update() {
    1.38 +      if (!isNuvotonVendor)
    1.39 +        return;
    1.40 +
    1.41        if (!Ring0.WaitIsaBusMutex(10))
    1.42          return;
    1.43