Slit.AcpiSlit.build: def of bend-osdev-acpi@0.1.1.0 Import: import bend-osdev-acpi@0.1.1.0/slit.bend as Slit Lines 67-71 of bend-osdev-acpi@0.1.1.0/slit.bend: https://jend.leeeet.dev/read.txt?path=bend-osdev-acpi@0.1.1.0/slit.bend&start_line=67&end_line=71 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/header.bend as H import bend-osdev-acpi@0.1.1.0/fields.bend as F # the table, from N and the matrix (fitted to N x N bytes) def AcpiSlit.build(s: AcpiSlit) -> B.Octets: match s: case AcpiSlit{H.AcpiHeader{sg, l, r, c, o, t, orv, ci, cr}, +n, m}: H.AcpiSdt.build(H.AcpiHeader{B.Octets.of_string("SLIT"), l, r, c, o, t, orv, ci, cr}, B.Octets.append(B.Octets.le64(W.W64.from_nat(n)), F.AcpiF.fit(Nat.mul(n, n), m))) Uses (10): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat.mul https://jend.leeeet.dev/definition.txt?path=bend-osdev-acpi@0.1.1.0/fields.bend&name=AcpiF.fit https://jend.leeeet.dev/definition.txt?path=bend-osdev-acpi@0.1.1.0/header.bend&name=AcpiHeader https://jend.leeeet.dev/definition.txt?path=bend-osdev-acpi@0.1.1.0/header.bend&name=AcpiSdt.build https://jend.leeeet.dev/definition.txt?path=bend-osdev-acpi@0.1.1.0/slit.bend&name=AcpiSlit https://jend.leeeet.dev/definition.txt?path=bend-osdev-bytes@0.1.1.0/bytes.bend&name=Octets https://jend.leeeet.dev/definition.txt?path=bend-osdev-bytes@0.1.1.0/bytes.bend&name=Octets.append https://jend.leeeet.dev/definition.txt?path=bend-osdev-bytes@0.1.1.0/bytes.bend&name=Octets.le64 https://jend.leeeet.dev/definition.txt?path=bend-osdev-bytes@0.1.1.0/bytes.bend&name=Octets.of_string https://jend.leeeet.dev/definition.txt?path=bend-osdev-word64@0.1.1.0/word64.bend&name=W64.from_nat