def pk.multi

bend-osdev-acpi@0.1.1.0 · aml_pkglength.bend:88

import bend-osdev-acpi@0.1.1.0/aml_pkglength.bend as AmlPkglength
import Base
import bend-osdev-acpi@0.1.1.0/error.bend as E

88# bits 5-4 must be zero in the multi-byte forms; n: how many bytes follow
89def pk.multi(l4: Bool, l5: Bool, n: Nat, l0: Bool, l1: Bool, l2: Bool, l3: Bool, t: List<&2, U32>) -> Result<&2, &2, E.AcpiError, AmlPkgL>:
90  match l4 l5:
91    case False{} False{}:
92      match n:
93        case 1n:
94          pk.d2(l0, l1, l2, l3, t)
95        case 2n:
96          pk.d3(l0, l1, l2, l3, t)
97        case _:
98          pk.d4(l0, l1, l2, l3, t)
99    case _ _:
100      Fail{E.AcpiAmlBadPkgLength{}}

Uses (10)

Used by (1)