📄 device.asl
字号:
Store(Foo1, Debug)
Fatal(0xa0, 19, 0)
}
}
Store(Arg0, ECD0)
}
// Event control for D1
// Arg0 has 0 for disable, non 0 for enable
Method(WED1, 1) {
if (LEqual(Arg0, Zero))
{
// We are disabling
if (LEqual(ECD1, Zero))
{
// ERROR - Event Control was already disabled
Name(Foo, "WMIACPI: ASL: WED1 called, but ECD1 is 0\n")
Store(Foo, Debug)
Fatal(0xa0, 22, 0)
}
} else {
// We are enabling
if (LNotEqual(ECD1, Zero))
{
// ERROR - Event Control was already enabled
Name(Foo1, "WMIACPI: ASL: WED1 called, but WED1 is 1\n")
Store(Foo1, Debug)
Fatal(0xa0, 21, 0)
}
}
Store(Arg0, ECD1)
}
// Event control for D2
// Arg0 has 0 for disable, non 0 for enable
Method(WED2, 1) {
if (LEqual(Arg0, Zero))
{
// We are disabling
if (LEqual(ECD2, Zero))
{
// ERROR - Event Control was already disabled
Name(Foo, "WMIACPI: ASL: WED2 called, but ECD2 is 0\n")
Store(Foo, Debug)
Fatal(0xa0, 24, 0)
}
} else {
// We are enabling
if (LNotEqual(ECD2, Zero))
{
// ERROR - Event Control was already enabled
Name(Foo1, "WMIACPI: ASL: WED2 called, but WED2 is 1\n")
Store(Foo1, Debug)
Fatal(0xa0, 23, 0)
}
}
Store(Arg0, ECD2)
}
// Get value for package A
Method(GETA, 1)
{
//
// Return data corresponding to instance specified
if (LEqual(Arg0, Zero)) {
Return(SAA0)
}
if (LEqual(Arg0, 1)) {
Return(SAA1)
}
if (LEqual(Arg0, 2)) {
Return(SAA2)
}
if (LEqual(Arg0, 3)) {
Return(SAA3)
}
Name(Foo, "WMIACPI: ASL: GETA called with InstanceIndex = ")
Store(Foo, Debug)
Store(Arg0, Debug)
Fatal(0xa0, 2, 0)
}
// Get value for package A
Method(GETB, 1)
{
//
// Return data corresponding to instance specified
if (LEqual(Arg0, Zero)) {
Return(SAB0)
}
if (LEqual(Arg0, 1)) {
Return(SAB1)
}
if (LEqual(Arg0, 2)) {
Return(SAB2)
}
if (LEqual(Arg0, 3)) {
Return(SAB3)
}
Name(Foo, "WMIACPI: ASL: GETB called with InstanceIndex = ")
Store(Foo, Debug)
Store(Arg0, Debug)
Fatal(0xa0, 4, 0)
}
Method(GETC, 1)
{
//
// Return data corresponding to instance specified
if (LEqual(Arg0, Zero)) {
Return(SAC0)
}
if (LEqual(Arg0, 1)) {
Return(SAC1)
}
if (LEqual(Arg0, 2)) {
Return(SAC2)
}
if (LEqual(Arg0, 3)) {
Return(SAC3)
}
Name(Foo, "WMIACPI: ASL: GETC called with InstanceIndex = ")
Store(Foo, Debug)
Store(Arg0, Debug)
Fatal(0xa0, 6, 0)
}
//
// Package Query data block
// Arg0 has the instance being queried
Method(WQAA, 1) {
if (LEqual(CCAA, Zero))
{
// ERROR - Collection Control was not enabled
Name(Foo, "WMIACPI: ASL: WQAA called, but CCAA is 0\n")
Store(Foo, Debug)
Name(Foo1, "aa")
Store(Debug, Foo1)
Fatal(0xa0, 1, 0)
}
Return(GETA(Arg0))
}
//
// String Query data block
// Arg0 has the instance being queried
Method(WQAB, 1) {
if (LEqual(CCAB, Zero))
{
// ERROR - Collection Control was not enabled
Name(Foo, "WMIACPI: ASL: WQAB called, but CCAB is 0\n")
Store(Foo, Debug)
Fatal(0xa0, 3, 0)
}
Return(GETB(Arg0))
}
//
// ULONG Query data block
// Arg0 has the instance being queried
Method(WQAC, 1) {
if (LEqual(CCAC, Zero))
{
// ERROR - Collection Control was not enabled
Name(Foo, "WMIACPI: ASL: WQAC called, but CCAC is 0\n")
Store(Foo, Debug)
Fatal(0xa0, 5, 0)
}
Return(GETC(Arg0))
}
Method(SETA, 2)
{
//
// Return data corresponding to instance specified
if (LEqual(Arg0, Zero)) {
Store(Arg1, SAA0)
Return(SAA0)
}
if (LEqual(Arg0, 1)) {
Store(Arg1, SAA1)
Return(SAA1)
}
if (LEqual(Arg0, 2)) {
Store(Arg1, SAA2)
Return(SAA2)
}
if (LEqual(Arg0, 3)) {
Store(Arg1, SAA3)
Return(SAA3)
}
Name(Foo, "WMIACPI: ASL: SETA called with InstanceIndex = ")
Store(Foo, Debug)
Store(Arg0, Debug)
Fatal(0xa0, 8, 0)
}
Method(SETB, 2)
{
//
// Return data corresponding to instance specified
if (LEqual(Arg0, Zero)) {
Store(Arg1, SAB0)
Return(SAB0)
}
if (LEqual(Arg0, 1)) {
Store(Arg1, SAB1)
Return(SAB1)
}
if (LEqual(Arg0, 2)) {
Store(Arg1, SAB2)
Return(SAB2)
}
if (LEqual(Arg0, 3)) {
Store(Arg1, SAB3)
Return(SAB3)
}
Name(Foo, "WMIACPI: ASL: SETB called with InstanceIndex = ")
Store(Foo, Debug)
Store(Arg0, Debug)
Fatal(0xa0, 10, 0)
}
Method(SETC, 2)
{
//
// Return data corresponding to instance specified
if (LEqual(Arg0, Zero)) {
Store(Arg1, SAC0)
Return(SAC0)
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -