27.10.2015 Views

Advanced Configuration and Power Interface Specification

ACPI_6.0

ACPI_6.0

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

ACPI Source Language (ASL)Reference<br />

Description<br />

Function declares a named package containing a series of terms that collectively represent a control<br />

method. A control method is a procedure that can be invoked to perform computation. Function<br />

opens a name scope.<br />

System software executes a control method by executing the terms in the package in order. For more<br />

information on method execution, see Section 5.5.2, “Control Method Execution.”<br />

The current namespace location used during name creation is adjusted to be the current location on<br />

the namespace tree. Any names created within this scope are “below” the name of this package. The<br />

current namespace location is assigned to the method package, <strong>and</strong> all namespace references that<br />

occur during control method execution for this package are relative to that location.<br />

Functions are equivalent to a Method that specifies NotSerialized. As such, a function should not<br />

create any named objects, since a second thread that might re-enter the function will cause a fatal<br />

error if an attempt is made to create the same named object twice.<br />

Note: (Compatibility Note) New for ACPI 3.0<br />

Example<br />

The following block of ASL sample code shows the use of Function for defining a control method:<br />

Function (EXAM, IntObj, {StrObj, {IntObj, StrObj}})<br />

{<br />

}<br />

Name (Temp,””)<br />

Store (Arg0, Temp)<br />

// could have used Arg1<br />

Return (SizeOf (Concatenate (Arg1, Temp)))<br />

This declaration is equivalent to:<br />

Method (EXAM, 2, NotSerialized, 0, IntObj, {StrObj, {IntObj, StrObj}})<br />

{<br />

…<br />

}<br />

19.6.54 GpioInt (GPIO Interrupt Connection Resource Descriptor<br />

Macro)<br />

GpioInt (EdgeLevel, ActiveLevel, Shared, PinConfig, DebounceTimeout, ResourceSource,<br />

ResourceSourceIndex, ResourceUsage, DescriptorName, VendorData) {PinList}<br />

Arguments<br />

EdgeLevel can be either Edge or Level. The bit field name _MOD is automatically created to refer<br />

to this portion of the resource descriptor.<br />

ActiveLevel can be one of ActiveHigh, ActiveLow or ActiveBoth. ActiveBoth can be specified<br />

only if EdgeLevel is Edge. The bit field name _POL is automatically created to refer to this portion<br />

of the resource descriptor.<br />

Shared is an optional argument <strong>and</strong> can be one of Shared, Exclusive, SharedAndWake or<br />

ExclusiveAndWake. If not specified, Exclusive is assumed. The "Wake" designation indicates that<br />

the interrupt is capable of waking the system from a low-power idle state or a system sleep state. The<br />

bit field name _SHR is automatically created to refer to this portion of the resource descriptor.<br />

Version 6.0 843

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

Saved successfully!

Ooh no, something went wrong!