def dv.prt.one

bend-osdev-acpi@0.1.1.0 · aml_device.bend:116

import bend-osdev-acpi@0.1.1.0/aml_device.bend as AmlDevice
import Base
import bend-osdev-word64@0.1.1.0/word64.bend as W
import bend-osdev-acpi@0.1.1.0/error.bend as E
import bend-osdev-acpi@0.1.1.0/aml_value.bend as V

116def dv.prt.one(v: V.AmlValue) -> Result<&2, &2, E.AcpiError, AmlPrtEntry>:
117  match v:
118    case V.AmlPkg{[V.AmlInt{a}, V.AmlInt{p}, src, V.AmlInt{i}]}:
119      Done{AmlPrtEntry{a, W.W64.lo(p), dv.prt.src(src), W.W64.lo(i)}}
120    case _:
121      Fail{E.AcpiAmlBadType{"a _PRT entry is not a package of four"}}

Uses (7)

Used by (1)