AmlField.fld.bytes.rd: def of bend-osdev-acpi@0.1.1.0 Import: import bend-osdev-acpi@0.1.1.0/aml_field.bend as AmlField Lines 236-250 of bend-osdev-acpi@0.1.1.0/aml_field.bend: https://jend.leeeet.dev/read.txt?path=bend-osdev-acpi@0.1.1.0/aml_field.bend&start_line=236&end_line=250 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/error.bend as E import bend-osdev-acpi@0.1.1.0/aml_host.bend as Hs # bytes j .. j + n of the field; r: the read of byte j - 1 def fld.bytes.rd(~H: Data, ~io: H -> Hs.AmlHostOp -> Result<&2, &2, E.AcpiError, Hs.AmlHostAns>, n: Nat, +f: AmlFieldDesc, +j: Nat, r: Result<&2, &2, E.AcpiError, Hs.AmlHostAns>, acc: List<&2, U32>) -> Result<&2, &2, E.AcpiError, AmlFieldBuf>: match n: case 0n: match r: case Fail{e}: Fail{e} case Done{Hs.AmlHostAns{h, v}}: Done{AmlFieldBuf{h, B.Octets.of_list(fld.rev(Con{W.W64.lo(v), acc}, Nil{}))}} case 1n+p: match r: case Fail{e}: Fail{e} case Done{Hs.AmlHostAns{h, v}}: fld.bytes.rd(~H, ~io, p, f, 1n+j, AmlField.read_int(~H, ~io, fld.byte(f, j), h), Con{W.W64.lo(v), acc}) Uses (14): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Result https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=bend-osdev-acpi@0.1.1.0/aml_field.bend&name=AmlField.read_int https://jend.leeeet.dev/definition.txt?path=bend-osdev-acpi@0.1.1.0/aml_field.bend&name=AmlFieldBuf https://jend.leeeet.dev/definition.txt?path=bend-osdev-acpi@0.1.1.0/aml_field.bend&name=AmlFieldDesc https://jend.leeeet.dev/definition.txt?path=bend-osdev-acpi@0.1.1.0/aml_field.bend&name=fld.byte https://jend.leeeet.dev/definition.txt?path=bend-osdev-acpi@0.1.1.0/aml_field.bend&name=fld.rev https://jend.leeeet.dev/definition.txt?path=bend-osdev-acpi@0.1.1.0/aml_host.bend&name=AmlHostAns https://jend.leeeet.dev/definition.txt?path=bend-osdev-acpi@0.1.1.0/aml_host.bend&name=AmlHostOp https://jend.leeeet.dev/definition.txt?path=bend-osdev-acpi@0.1.1.0/error.bend&name=AcpiError https://jend.leeeet.dev/definition.txt?path=bend-osdev-bytes@0.1.1.0/bytes.bend&name=Octets.of_list https://jend.leeeet.dev/definition.txt?path=bend-osdev-word64@0.1.1.0/word64.bend&name=W64.lo