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.

<strong>Advanced</strong> <strong>Configuration</strong> <strong>and</strong> <strong>Power</strong> <strong>Interface</strong> <strong>Specification</strong><br />

Description<br />

Fprintf is a macro that converts the evaluated FormatString into a series of string Concatenate<br />

operations, storing the result in Destination<br />

Example<br />

The following ASL example uses Fprintf to write a formatted string of Arg0 <strong>and</strong> Arg1 to the Named<br />

Object STR1.<br />

Fprintf (STR1, "%o: %o Successful", Arg1, Arg0)<br />

This Fprintf macro expression evaluates to the following ASL operation.<br />

Store (Concatenate (Concatenate (Concatenate (Concatenate<br />

("", Arg1), ": "), Arg0), " Successful"), STR1)<br />

19.6.52 FromBCD (Convert BCD To Integer)<br />

Syntax<br />

FromBCD (BCDValue, Result) => Integer<br />

Arguments<br />

BCDValue is evaluated as an Integer.<br />

Description<br />

The FromBCD operation is used to convert BCDValue to a numeric format <strong>and</strong> store the numeric<br />

value into Result.<br />

19.6.53 Function (Declare Control Method)<br />

Syntax<br />

Function (FunctionName, ReturnType, ParameterTypes) {TermList}<br />

Arguments<br />

ReturnType is optional <strong>and</strong> specifies the type(s) of the object(s) returned by the method. If the<br />

method does not return an object, then nothing is specified or UnknownObj is specified. To specify<br />

a single return type, simply use the ObjectTypeKeyword (e.g. IntObj, PkgObj, etc.). To specify<br />

multiple possible return types, enclose the comma-separated ObjectTypeKeywords with braces. For<br />

example: {IntObj, BuffObj}.<br />

ParameterTypes specifies both the number <strong>and</strong> type of the method parameters. It is a commaseparated,<br />

variable-length list of the expected object type or types for each of the method parameters,<br />

enclosed in braces. For each parameter, the parameter type consists of either an ObjectTypeKeyword<br />

or a comma-separated sub-list of ObjectTypeKeywords enclosed in braces. There can be no more<br />

than seven parameters in total.<br />

842 April, 2015 Version 6.0

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

Saved successfully!

Ooh no, something went wrong!