def AcpiExample.dsdt_terms
bend-osdev-acpi@0.1.1.0 · example.bend:152
import bend-osdev-acpi@0.1.1.0/example.bend as Example
import Base
import bend-osdev-acpi@0.1.1.0/aml_term.bend as T
152
153def AcpiExample.dsdt_terms() -> List<&2, T.AmlTerm>:
154 [T.AmlT.scope("\\_SB", [
155 ex.pci0(),
156 ex.lnka(),
157 T.AmlT.device("PWRB", [T.AmlT.name("_HID", T.AmlT.eisaid("PNP0C0C"))]),
158 T.AmlT.device("CPU0", [T.AmlT.name("_HID", T.AmlT.str("ACPI0007")), T.AmlT.name("_UID", T.AmlT.zero())]),
159 ex.osys(),
160 T.AmlT.method("SUM_", 1n, False{}, [
161 T.AmlT.store(T.AmlT.zero(), T.AmlT.local(0)),
162 T.AmlT.store(T.AmlT.zero(), T.AmlT.local(1)),
163 T.AmlT.while_(T.AmlT.lless_equal(T.AmlT.local(1), T.AmlT.arg(0)), [
164 T.AmlT.add(T.AmlT.local(0), T.AmlT.local(1), T.AmlT.local(0)),
165 T.AmlT.increment(T.AmlT.local(1))]),
166 T.AmlT.ret(T.AmlT.local(0))]),
167 T.AmlT.method("SPIN", 0n, False{}, [T.AmlT.while_(T.AmlT.one(), [T.AmlT.noop()])])]),
168 T.AmlT.scope("\\_TZ", [
169 T.AmlT.thermal_zone("TZ00", [
170 T.AmlT.method("_TMP", 0n, False{}, [T.AmlT.ret(T.AmlT.add(T.AmlT.multiply(T.AmlT.nm("\\_SB.PCI0.LPCB.EC0.TMP0"), ex.i(10), T.AmlT.none()), ex.i(2732), T.AmlT.none()))]),
171 T.AmlT.name("_CRT", ex.i(3732))])])]