Hardware/LPC/Chip.cs
author moel.mich
Sat, 31 Dec 2011 17:31:04 +0000
changeset 324 c6ee430d6995
parent 296 414783d1cda9
child 341 5172a92c5c20
permissions -rw-r--r--
Modified and extended version of the patch v4 by Roland Reinl (see Issue 256). Main differences to the original patch: DeviceIoControl refactorings removed, SmartAttribute is now descriptive only and does not hold any state, report is written as one 80 columns table, sensors are created only for meaningful values and without duplicates (remaining life, temperatures, host writes and reads). Also the current implementation should really preserve all the functionality of the old system. Additionally there is now a simple SMART devices emulation class (DebugSmart) that can be used in place of WindowsSmart for testing with reported data.
moel@182
     1
/*
moel@182
     2
  
moel@182
     3
  Version: MPL 1.1/GPL 2.0/LGPL 2.1
moel@182
     4
moel@182
     5
  The contents of this file are subject to the Mozilla Public License Version
moel@182
     6
  1.1 (the "License"); you may not use this file except in compliance with
moel@182
     7
  the License. You may obtain a copy of the License at
moel@182
     8
 
moel@182
     9
  http://www.mozilla.org/MPL/
moel@182
    10
moel@182
    11
  Software distributed under the License is distributed on an "AS IS" basis,
moel@182
    12
  WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
moel@182
    13
  for the specific language governing rights and limitations under the License.
moel@182
    14
moel@182
    15
  The Original Code is the Open Hardware Monitor code.
moel@182
    16
moel@182
    17
  The Initial Developer of the Original Code is 
moel@182
    18
  Michael Möller <m.moeller@gmx.ch>.
moel@265
    19
  Portions created by the Initial Developer are Copyright (C) 2009-2011
moel@182
    20
  the Initial Developer. All Rights Reserved.
moel@182
    21
moel@182
    22
  Contributor(s):
moel@182
    23
moel@182
    24
  Alternatively, the contents of this file may be used under the terms of
moel@182
    25
  either the GNU General Public License Version 2 or later (the "GPL"), or
moel@182
    26
  the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
moel@182
    27
  in which case the provisions of the GPL or the LGPL are applicable instead
moel@182
    28
  of those above. If you wish to allow use of your version of this file only
moel@182
    29
  under the terms of either the GPL or the LGPL, and not to allow others to
moel@182
    30
  use your version of this file under the terms of the MPL, indicate your
moel@182
    31
  decision by deleting the provisions above and replace them with the notice
moel@182
    32
  and other provisions required by the GPL or the LGPL. If you do not delete
moel@182
    33
  the provisions above, a recipient may use your version of this file under
moel@182
    34
  the terms of any one of the MPL, the GPL or the LGPL.
moel@182
    35
 
moel@182
    36
*/
moel@1
    37
moel@1
    38
namespace OpenHardwareMonitor.Hardware.LPC {
moel@1
    39
moel@165
    40
  internal enum Chip : ushort {
moel@1
    41
    Unknown = 0,
moel@266
    42
moel@266
    43
    ATK0110 = 0x0110,
moel@266
    44
moel@266
    45
    F71858 = 0x0507,
moel@266
    46
    F71862 = 0x0601, 
moel@266
    47
    F71869 = 0x0814,
moel@266
    48
    F71882 = 0x0541,
moel@296
    49
    F71889AD = 0x1005,
moel@266
    50
    F71889ED = 0x0909,
moel@266
    51
    F71889F = 0x0723,
moel@266
    52
moel@93
    53
    IT8712F = 0x8712,
moel@21
    54
    IT8716F = 0x8716,
moel@21
    55
    IT8718F = 0x8718,
moel@21
    56
    IT8720F = 0x8720,
moel@170
    57
    IT8721F = 0x8721,
moel@21
    58
    IT8726F = 0x8726,
moel@277
    59
    IT8728F = 0x8728,
moel@319
    60
    IT8772E = 0x8772,
moel@266
    61
moel@266
    62
    NCT6771F = 0xB470,
moel@266
    63
    NCT6776F = 0xC330,
moel@266
    64
moel@7
    65
    W83627DHG = 0xA020,
moel@19
    66
    W83627DHGP = 0xB070,
moel@108
    67
    W83627EHF = 0x8800,    
moel@31
    68
    W83627HF = 0x5200,
moel@147
    69
    W83627THF = 0x8280,
moel@34
    70
    W83667HG = 0xA510,
moel@34
    71
    W83667HGB = 0xB350,
moel@266
    72
    W83687THF = 0x8541
moel@167
    73
  }
moel@167
    74
moel@167
    75
  internal class ChipName {
moel@167
    76
moel@167
    77
    private ChipName() { }
moel@167
    78
moel@167
    79
    public static string GetName(Chip chip) {
moel@167
    80
      switch (chip) {
moel@266
    81
        case Chip.ATK0110: return "Asus ATK0110";
moel@266
    82
moel@167
    83
        case Chip.F71858: return "Fintek F71858";
moel@167
    84
        case Chip.F71862: return "Fintek F71862";
moel@167
    85
        case Chip.F71869: return "Fintek F71869";
moel@167
    86
        case Chip.F71882: return "Fintek F71882";
moel@296
    87
        case Chip.F71889AD: return "Fintek F71889AD";
moel@167
    88
        case Chip.F71889ED: return "Fintek F71889ED";
moel@167
    89
        case Chip.F71889F: return "Fintek F71889F";
moel@266
    90
moel@167
    91
        case Chip.IT8712F: return "ITE IT8712F";
moel@167
    92
        case Chip.IT8716F: return "ITE IT8716F";
moel@277
    93
        case Chip.IT8718F: return "ITE IT8718F";        
moel@277
    94
        case Chip.IT8720F: return "ITE IT8720F";
moel@170
    95
        case Chip.IT8721F: return "ITE IT8721F";
moel@167
    96
        case Chip.IT8726F: return "ITE IT8726F";
moel@277
    97
        case Chip.IT8728F: return "ITE IT8728F";
moel@319
    98
        case Chip.IT8772E: return "ITE IT8772E";
moel@266
    99
moel@266
   100
        case Chip.NCT6771F: return "Nuvoton NCT6771F";
moel@266
   101
        case Chip.NCT6776F: return "Nuvoton NCT6776F";
moel@266
   102
moel@167
   103
        case Chip.W83627DHG: return "Winbond W83627DHG";
moel@167
   104
        case Chip.W83627DHGP: return "Winbond W83627DHG-P";
moel@167
   105
        case Chip.W83627EHF: return "Winbond W83627EHF";
moel@167
   106
        case Chip.W83627HF: return "Winbond W83627HF";
moel@167
   107
        case Chip.W83627THF: return "Winbond W83627THF";
moel@167
   108
        case Chip.W83667HG: return "Winbond W83667HG";
moel@167
   109
        case Chip.W83667HGB: return "Winbond W83667HG-B";
moel@167
   110
        case Chip.W83687THF: return "Winbond W83687THF";
moel@266
   111
moel@167
   112
        case Chip.Unknown: return "Unkown";
moel@167
   113
        default: return "Unknown";
moel@167
   114
      }
moel@167
   115
    }
moel@1
   116
  }
moel@1
   117
moel@1
   118
}