27.10.2015 Views

Advanced Configuration and Power Interface Specification

ACPI_6.0

ACPI_6.0

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

ACPI-Defined Devices <strong>and</strong> Device-Specific Objects<br />

Example 1: Define an ACPI Wake Alarm device<br />

Device(\_SB.AWAK){<br />

Name(_HID, "ACPI000E") //device ID<br />

Name(_PRW, Package(){...})//enable or disable to wake up the system<br />

OperationRegion(CMOP, EmbeddedControl, ...)<br />

Field(CMOP, ByteAcc, ...){<br />

…….. //timer status <strong>and</strong> policies<br />

}<br />

Method(_GCP) {<br />

Return (0x03)<br />

//Both AC <strong>and</strong> DC alarms are implemented; Time capability is NOT supported<br />

}<br />

Method(_STP, 2){<br />

If(LEqual(Arg0, 0) {<br />

Store(Arg1, …)<br />

//Set AC timer policy<br />

}<br />

Else {<br />

Store(Arg1, …)<br />

//Set DC timer policy<br />

}<br />

Return(0)<br />

}<br />

Method(_TIP, 1){<br />

If(LEqual(Arg0, 1) {<br />

Store(…, Local0) //Get DC timer policy<br />

}<br />

Else {<br />

Store(…, Local0) //Get AC timer policy<br />

}<br />

Return (Local0)<br />

}<br />

Method(_STV, 2){<br />

If(LEqual(Arg0, 0) {<br />

Store(Arg1, …)<br />

//Set AC timer value<br />

}<br />

Else {<br />

Store(Arg1, …)<br />

//Set DC timer value<br />

}<br />

Return(0)<br />

}<br />

Method(_TIV, 1){<br />

If(LEqual(Arg0, 1) {<br />

Store(…, Local0)<br />

}<br />

Else {<br />

Store(…, Local0)<br />

}<br />

Return (Local0)<br />

}<br />

//Get DC timer value<br />

//Get AC timer value<br />

Version 6.0 549

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!