AmlField.fld.wr: def of bend-osdev-acpi@0.1.1.0 Import: import bend-osdev-acpi@0.1.1.0/aml_field.bend as AmlField Lines 202-213 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=202&end_line=213 import Base import bend-osdev-word64@0.1.1.0/word64.bend as W 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 # units k .. k + n - 1 written with their share of x def fld.wr(~H: Data, ~io: H -> Hs.AmlHostOp -> Result<&2, &2, E.AcpiError, Hs.AmlHostAns>, n: Nat, +f: AmlFieldDesc, +k: Nat, +x: W.W64, r: Result<&2, &2, E.AcpiError, Hs.AmlHostAns>) -> Result<&2, &2, E.AcpiError, Hs.AmlHostAns>: match n: case 0n: r case 1n+p: match r: case Fail{e}: Fail{e} case Done{Hs.AmlHostAns{h, v}}: +u = fld.unit(f, k) fld.wr(~H, ~io, p, f, 1n+k, x, fld.wr.fits(~H, ~io, AmlUnit.fits(u), h, f, u, x)) Uses (10): 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=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=AmlUnit.fits https://jend.leeeet.dev/definition.txt?path=bend-osdev-acpi@0.1.1.0/aml_field.bend&name=fld.unit https://jend.leeeet.dev/definition.txt?path=bend-osdev-acpi@0.1.1.0/aml_field.bend&name=fld.wr.fits 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-word64@0.1.1.0/word64.bend&name=W64