<?xml version="1.0" encoding="ISO-8859-15"?>
<!DOCTYPE proc_def SYSTEM "proc_def.dtd"[]>
<proc_def name="gpioGetInputValueFast" version="1.0.0">
    <desc>Gets the value of a single GPIO input pin.</desc>
    <task_resource_ref>Digital Input Pins</task_resource_ref>
    <task_resource_ref>Digital Output Pins</task_resource_ref>
    <task_resource_ref>Digital Open-Drain Pins</task_resource_ref>
    <task_resource_ref>Digital Open-Source Pins</task_resource_ref>
    <impl chip_family="0">
        <param type="imm" name="auxio" reg="R5">The GPIO pin to be checked (index of AUX I/O pin)</param>
        <return name="value" reg="R7">The GPIO pin value (1=high, 0=low)</return>
        <code>
            <![CDATA[
            ref         RG{auxio}
            .if I{auxio} >= 8
                        in          R7, [#IOP_AIODIO1_GPIODIN]
                        lsr         R7, #(I{auxio} - 8)
            .endif
            .if I{auxio} < 8
                        in          R7, [#IOP_AIODIO0_GPIODIN]
                        lsr         R7, #(I{auxio})
            .endif
                        and         R7, #0x0001
                        ref         RS{value}
            ]]>
        </code>
    </impl>
</proc_def>
