We're technically supposed to wait for these resets to finish before poking at registers. This seems to fix the instability I was seeing on the input example especially (TBH I have no idea how it ever worked)
Sorry this is a large commit :(
This adds support for input pins, including pulling them high or low.
It also adds two examples: the start of a classic blinky LED example, and an example for reading input.
It seems like the rom_table_lookup missed one level of
pointer dereferencing.
After comparing it to the working call to reset_usb_boot() in
https://github.com/jannic/rp-microcontroller-rs/blob/master/util/rp2040-panic-usb-boot/src/lib.rs,
I changed the code until it generated basically the same assembly.
With that change, I was able to successfully call rom_data::reset_to_usb_boot()
I still don't like the type RomTableLookupFn, which just returns
some generic T without any checks, and I think rom_table_lookup
should be unsafe. But as none of those are pub, it doesn't matter too
much. So I just made the changes necessary to make the code work.