def AcpiRawEntry.encode

bend-osdev-acpi@0.1.1.0 · entries.bend:78

import bend-osdev-acpi@0.1.1.0/entries.bend as Entries
import Base
import bend-osdev-bytes@0.1.1.0/bytes.bend as B

78# the structure as bytes: its type, its length, then body (the bytes after
79# the two header bytes)
80def AcpiRawEntry.encode(+k: U32, +body: B.Octets) -> B.Octets:
81  B.Octets.append(B.Octets.of_list([k, U32.from_nat(Nat.add(2n, B.Octets.len(body)))]), body)

Uses (8)

Used by (2)