Hardware/LPC/W83627DHG.cs
author moel.mich
Fri, 29 Jan 2010 21:14:23 +0000
changeset 11 64b46a2cc8ae
parent 1 361e324a0ed4
child 13 d32fc5f2e822
permissions -rw-r--r--
Release version 0.1.3.1. Added a a bit more info to ADL reports.
moel@1
     1
using System;
moel@1
     2
using System.Collections.Generic;
moel@1
     3
using System.Drawing;
moel@1
     4
using System.Text;
moel@1
     5
moel@1
     6
namespace OpenHardwareMonitor.Hardware.LPC {
moel@1
     7
  public class W83627DHG : IHardware {
moel@1
     8
moel@1
     9
    private byte revision;
moel@1
    10
moel@1
    11
    private string name;
moel@1
    12
    private Image icon;
moel@1
    13
moel@1
    14
    private bool available = false;
moel@7
    15
    private ushort address;
moel@1
    16
moel@7
    17
    public W83627DHG(byte revision, ushort address) {      
moel@1
    18
      this.revision = revision;
moel@7
    19
      this.address = address;
moel@1
    20
moel@1
    21
      this.name = "Winbond W83627DHG";
moel@1
    22
      this.icon = Utilities.EmbeddedResources.GetImage("chip.png");
moel@1
    23
    }
moel@1
    24
moel@1
    25
    public bool IsAvailable {
moel@1
    26
      get { return available; }
moel@1
    27
    }
moel@1
    28
moel@1
    29
    public string Name {
moel@1
    30
      get { return name; }
moel@1
    31
    }
moel@1
    32
moel@1
    33
    public string Identifier {
moel@1
    34
      get { return "/lpc/w83627dhg"; }
moel@1
    35
    }
moel@1
    36
moel@1
    37
    public Image Icon {
moel@1
    38
      get { return icon; }
moel@1
    39
    }
moel@1
    40
moel@1
    41
    public ISensor[] Sensors {
moel@1
    42
      get { return new ISensor[0]; }
moel@1
    43
    }
moel@1
    44
moel@1
    45
    public string GetReport() {
moel@1
    46
      StringBuilder r = new StringBuilder();
moel@1
    47
moel@1
    48
      r.AppendLine("LPC W83627DHG");
moel@1
    49
      r.AppendLine();
moel@7
    50
      r.Append("Chip revision: 0x"); r.AppendLine(revision.ToString("X"));
moel@7
    51
      r.Append("Base Adress: 0x"); r.AppendLine(address.ToString("X4"));
moel@7
    52
      r.AppendLine();
moel@1
    53
moel@1
    54
      return r.ToString();
moel@1
    55
    }
moel@1
    56
moel@1
    57
    public void Update() { }
moel@1
    58
moel@1
    59
    #pragma warning disable 67
moel@1
    60
    public event SensorEventHandler SensorAdded;
moel@1
    61
    public event SensorEventHandler SensorRemoved;
moel@1
    62
    #pragma warning restore 67
moel@1
    63
  }
moel@1
    64
}