def in.desc.go

bend-osdev-acpi@0.1.1.0 · aml_interp.bend:426

import bend-osdev-acpi@0.1.1.0/aml_interp.bend as AmlInterp
import Base
import bend-osdev-acpi@0.1.1.0/error.bend as E
import bend-osdev-acpi@0.1.1.0/aml_ns.bend as S
import bend-osdev-acpi@0.1.1.0/aml_field.bend as F

426def in.desc.go(o: Maybe<&2, S.AmlObject>, +ns: S.AmlNs, +off: Nat, +bits: Nat, +flags: U32) -> Result<&2, &2, E.AcpiError, F.AmlFieldDesc>:
427  match o:
428    case Some{S.AmlORegion{+sp, +roff, len, +parent}}:
429      Done{F.AmlFieldDesc{sp, in.base.pick(U32.is_eq(sp, 2), ns, parent, roff), len, off, bits, flags}}
430    case _:
431      Fail{E.AcpiAmlBadType{"the region of a field is not an OperationRegion"}}

Uses (10)

Used by (1)