Without that the SPI_SR_RRDY bit isn't cleared for the next
transfer.
It uses to works simply because the PicoRV32 wasn't fast enough ...
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
Basically if VBUS is present, we enable USB and we don't go to
sleep to make sure we react in time.
Also add skeleton to read and handle button press events.
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
The press events are detected in the gateware and latched
and the firmware can just read them as "events". They also
trigger sys clock domain wake up if it was sleeping.
This is better since the 'sys' clock domain can be shutdown for
some non-negligible amount of time and it could lead to missed
presses or latency.
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>