def res.u.go

bend-osdev-acpi@0.1.1.0 · aml_resource.bend:50

import bend-osdev-acpi@0.1.1.0/aml_resource.bend as AmlResource
import Base
import bend-osdev-word64@0.1.1.0/word64.bend as W
import bend-osdev-bytes@0.1.1.0/bytes.bend as B
import bend-osdev-acpi@0.1.1.0/fields.bend as F

50def res.u.go(+w: Nat, +d: B.Octets, +i: Nat) -> W.W64:
51  match w:
52    case 2n:
53      W.W64.from_u32(F.AcpiF.u16(d, i))
54    case 4n:
55      W.W64.from_u32(F.AcpiF.u32(d, i))
56    case _:
57      F.AcpiF.u64(d, i)

Uses (7)

Used by (1)