|
|
Source code |
1 2 3 4 |
<?xml version="1.0"?> <Hewlett_Packard> <Model name="30c2" location="MAINBOARD" class="6715" file="Hewlett_Packard.cs" /> </Hewlett_Packard> |
|
|
Source code |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 |
//
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
// N o t e b o o k H a r d w a r e C o n t r o l A C P I D L L
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
// for Hewlett-Packard Notebooks
//
// This file is provided "as is" with no expressed or implied warranty.
// The authors accepts no liability for any damage/loss of business that
// this product may cause.
//
// It is recommended to use a c# editor which supports c# syntax highlighting
// and supports the directive #region and #endregion. With these directives
// the source code is much more readable and it is easy to hide or show block
// of code (for example you can use the c# editor "SharpDevelop 2.0").
//
// Author: Mateusz Ludwin
// This Files are written by Henry100 (the Information by Mateusz Ludwin!)
//
// Last Update: 27 September 2006
//
public static class HEWLETT_PACKARD
{
#region Notebook Hewlett_Packard 6715s : class 6715
//
// class author: Henry100
//
public static class 6715
{
#region Class for Hewlett_Packard 6715s FAN-ON_OFF control : class FAN-ON_OFF
//
public static class FAN_ON_OFF
{
// Info
public const string description = "Notebook FAN ON|OFF Control"; // Description of current class
public const bool default_enable = false; // false = By default the current class is disabled in NHC
public const int icon = 2; // 0 = Hardware icon, 1 = Brightness icon, 2 = Fan icon, 3 = Battery icon, 4 = Audio icon
public static bool initialisation = false; // Initialisation variable: on initialisation NHC will set this variable to true; after the initialisation NHC will set this variabel to false
#region Value class for FAN_LOW_Level : class FAN_LOW_Level
//
public static class FAN_LOW_LEVEL
{
// Properties of the value class
public const string description = "FAN low level on temperature"; // Description of current value
public const bool nhc_visible = true; // true -> value is visible in NHC
// Value
public static int fan_low_level = 50; // It must have the same name as the class (case are ignored)
public const string unit = " °C"; // unit of value
// With this class it is possible to change the value in NHC on runtime
public static class NHC_WRITE
{
public const bool nhc_write = true; // true -> it is possible to change the value in NHC
public const int nhc_minimum_value = 10; // minimum input value
public const int nhc_maximum_value = 100; // maximum input value
public const int nhc_default_value = 50; // default value
public const int base_level = 2732; // Bias for K to C conversion
public static bool nhc_on_write() // Optional function - NHC will call this function if the user change the value on runtime and on NHC initialisation
{
ACPI.PACKAGE.Write("_TZ.C37D", "PKG[0].PKG[1].PKG[0]", fan_low_level * 10 + base_level); // set the low_level_on value in the package
ACPI.PACKAGE.Write("_TZ.C37D", "PKG[1].PKG[1].PKG[0]", fan_low_level * 10 + base_level);
{
return ACPI.METHOD.Call("_TZ.C392");
}
}
}
}
#endregion
}
#endregion
//no fan-speed
}
|
Quoted
Die 30c2 habe ich aus der Mainboard-Sektion. Hier taucht schon die erste Ungereimtheit auf, denn laut Anleitung kann man den Model-Namen entweder unter System oder unter Mainboard nachsehen. Nur sind bei meinem Notebook dort jeweils unterschiedliche Namen angegeben. Unter System steht der Name "HP Compaq 6715s (GC075ES#ABD)" und unter Mainboard der Name "30c2". Welcher ist denn nun der richtige?
Quoted
XML definition files
NHC will use XML definition files to load the right class for the detected hardware. The XML filename and the first node must have the manufacturer name (full or short name). The second node of the xml file must have the name Model and defined the parameter name, location, class and file.
1. The parameter"name" defines the model name.
2. The parameter "location" defines the location of the model name parameter.
Valid values for the location parameter are SYSTEM, PRODUCT and MAINBOARD. NHC will then read the model name from the defined location. You will find the SYSTEM, PRODUCT and MAINBOARD section in the "Computer Hardware Info" window of NHC
3. The parameter "class" defines the class name in the source file.
4. The parameter "file" defines the filename of the source file.
|
|
Source code |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 |
PowerResource (C395, 0x00, 0x0000)
{
Method (_STA, 0, NotSerialized)
{
Return (C38C (0x01, 0x64))
}
Method (_ON, 0, NotSerialized)
{
If (LLessEqual (\C00D (), 0x03))
{
C38D (0x01, 0x64)
}
Else
{
If (LGreater (DerefOf (Index (C389, 0x00)), C38F (C381, 0x00)))
{
C38D (0x01, 0x64)
}
}
}
Method (_OFF, 0, NotSerialized)
{
C38E (0x01, 0x50)
}
}
PowerResource (C396, 0x00, 0x0000)
{
Method (_STA, 0, NotSerialized)
{
Return (C38C (0x02, 0x50))
}
Method (_ON, 0, NotSerialized)
{
If (LLessEqual (\C00D (), 0x03))
{
C38D (0x02, 0x50)
}
Else
{
If (LGreater (DerefOf (Index (C389, 0x00)), C38F (C380, 0x00)))
{
C38D (0x02, 0x50)
}
}
}
Method (_OFF, 0, NotSerialized)
{
C38E (0x02, 0x3C)
}
}
PowerResource (C397, 0x00, 0x0000)
{
Method (_STA, 0, NotSerialized)
{
Return (C38C (0x04, 0x3C))
}
Method (_ON, 0, NotSerialized)
{
If (LLessEqual (\C00D (), 0x03))
{
C38D (0x04, 0x3C)
}
Else
{
If (LGreater (DerefOf (Index (C389, 0x00)), C38F (C37F, 0x00)))
{
C38D (0x04, 0x3C)
}
}
}
Method (_OFF, 0, NotSerialized)
{
C38E (0x04, 0x28)
}
}
PowerResource (C398, 0x00, 0x0000)
{
Method (_STA, 0, NotSerialized)
{
Return (C38C (0x08, 0x28))
}
Method (_ON, 0, NotSerialized)
{
If (LLessEqual (\C00D (), 0x03))
{
C38D (0x08, 0x28)
}
Else
{
If (LGreater (DerefOf (Index (C389, 0x00)), C38F (C37E, 0x00)))
{
C38D (0x08, 0x28)
}
}
}
Method (_OFF, 0, NotSerialized)
{
C38E (0x08, 0x00)
}
}
|
|
|
Source code |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 |
Scope (\_TZ)
{
Name (C37D, Package (0x04)
{
Package (0x02)
{
Package (0x06)
{
0x05AC,
0x0C3C,
0x0CA0,
0x0D04,
0x0D68,
0x0E30
},
Package (0x06)
{
0x0C6E,
0x0CD2,
0x0D36,
0x0D9A,
0x0E62,
0x0FA3
}
},
Package (0x02)
{
Package (0x06)
{
0x05AC,
0x0C3C,
0x0CA0,
0x0D04,
0x0D68,
0x0E30
},
Package (0x06)
{
0x0C6E,
0x0CD2,
0x0D36,
0x0D9A,
0x0E62,
0x0FA3
}
},
Package (0x02)
{
Package (0x02)
{
0x05AC,
0x0DCC
},
Package (0x02)
{
0x0E30,
0x0FA3
}
},
Package (0x02)
{
Package (0x02)
{
0x05AC,
0x0CA0
},
Package (0x02)
{
0x0D04,
0x0FA3
}
}
})
|
This post has been edited 2 times, last edit by "WhiteyWhiteman" (Sep 19th 2007, 11:13am)
This post has been edited 1 times, last edit by "WhiteyWhiteman" (Oct 6th 2007, 10:02pm)
This post has been edited 3 times, last edit by "grkn" (Jan 6th 2008, 2:34am)
Quoted
ACPI.PACKAGE.Write("_TZ.C37D", "PKG[0].PKG[0].PKG[0]", 1452) . . . ERROR
This post has been edited 1 times, last edit by "Hallo32" (Jan 6th 2008, 12:21pm)
