def in.field.rd

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

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_host.bend as Hs
import bend-osdev-acpi@0.1.1.0/aml_field.bend as F

527def in.field.rd(~H: Data, ~io: H -> Hs.AmlHostOp -> Result<&2, &2, E.AcpiError, Hs.AmlHostAns<H>>, small: Bool, +w: AmlWorld<H>, r: Result<&2, &2, E.AcpiError, F.AmlFieldDesc>) -> Result<&2, &2, E.AcpiError, AmlRead<H>>:
528  match small:
529    case True{}:
530      match r:
531        case Fail{e}:
532          Fail{e}
533        case Done{+d}:
534          in.got.int(H, in.wide(H, w), w, F.AmlField.read_int(~H, ~io, d, AmlWorld.host(H, w)))
535    case False{}:
536      match r:
537        case Fail{e}:
538          Fail{e}
539        case Done{+d}:
540          in.got.buf(H, w, F.AmlField.read_buf(~H, ~io, d, AmlWorld.host(H, w)))

Uses (14)

Used by (1)