
Hi, False alarm.
Unfortunately it does not work properly. The `read()` function only recursed to mask 32 (P4). The `write()` function only resursed to mask 16 (P3).
The generated assembly (ATxmega128a1u) can be seen here [4]. Compare the read (line 534) and write (line 338) function calls of `SoftwareGpioWord` with the read (line 618) and write (line 707) function calls of `SoftwareGpioPort`. The latter stop recursing at 32 (line 701) and 16 (line 714) respectively.
Actually, this works fine. I did not expect the compiler output, as the both functions are partially inlined into the main function. `write()`: Line 938ff sets P5, Line 966ff sets P4. 'read()': Line 996ff checks P5. It works. I wrote something that actually works!1!! \o/ Niklas