-
Notifications
You must be signed in to change notification settings - Fork 551
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update ACPILib with last @MishaTy changes
- Loading branch information
1 parent
0dadc0b
commit 78d9068
Showing
9 changed files
with
755 additions
and
524 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
namespace ACPILib.AML | ||
namespace ACPILibs.AML | ||
{ | ||
public class Definitions | ||
{ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
namespace ACPIAML.Interupter | ||
{ | ||
public class EisaId | ||
{ | ||
public static string ToText(long ID) | ||
{ | ||
var vendor = ID & 0xFFFF; | ||
var device = ID >> 16; | ||
var device1 = device & 0xFF; | ||
var device2 = device >> 8; | ||
var vendor_rev = ((vendor & 0xFF) << 8) | vendor >> 8; | ||
var vendor1 = ((vendor_rev >> 10)&0x1f)+64; | ||
var vendor2 = ((vendor_rev >> 5)&0x1f)+64; | ||
var vendor3= ((vendor_rev >> 0)&0x1f)+64; | ||
|
||
string vendorStr = new(new char[] { (char)vendor1 , (char)vendor2 , (char)vendor3 }); | ||
return vendorStr + device1.ToString("X2") + device2.ToString("X2"); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
using ACPILib.Parser2; | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
namespace ACPIAML.Interupter | ||
{ | ||
public class StackObject | ||
{ | ||
private StackObject() | ||
{ | ||
|
||
} | ||
|
||
public object? Value; | ||
public StackObjectType Type; | ||
|
||
public static StackObject Create(string s) | ||
{ | ||
return new() { Type = StackObjectType.String, Value = s }; | ||
} | ||
public static StackObject Create(ParseNode s) | ||
{ | ||
return new() { Type = StackObjectType.ParseNode, Value = s }; | ||
} | ||
public static StackObject Create(byte s) | ||
{ | ||
return new() { Type = StackObjectType.Byte, Value = s }; | ||
} | ||
public static StackObject Create(short s) | ||
{ | ||
return new() { Type = StackObjectType.Word, Value = s }; | ||
} | ||
public static StackObject Create(int s) | ||
{ | ||
return new() { Type = StackObjectType.DWord, Value = s }; | ||
} | ||
public static StackObject Create(long s) | ||
{ | ||
return new() { Type = StackObjectType.QWord, Value = s }; | ||
} | ||
public static StackObject Create(byte[] s) | ||
{ | ||
return new() { Type = StackObjectType.ByteArray, Value = s }; | ||
} | ||
} | ||
public enum StackObjectType | ||
{ | ||
Null, | ||
ParseNode, | ||
String, | ||
Byte, | ||
ByteArray, | ||
/// <summary> | ||
/// short | ||
/// </summary> | ||
Word, | ||
/// <summary> | ||
/// int | ||
/// </summary> | ||
DWord, | ||
/// <summary> | ||
/// long | ||
/// </summary> | ||
QWord, | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.