circuitpython/ports/raspberrypi/supervisor
Jeff Epler 78fc43baab
raspberrypi: Make port_idle_until_interrupt work
This needs thorough testing before it's merged, as we tried
and reverted this once before (#5341 and #5356).

I think that besides checking for tinyusb having "something to do",
the fact that `port_interrupt_after_ticks` and `port_disable_tick`
weren't implemented that was causing a secondary problem.

I've tested this on a pico w over reboot-cycles and ctrl-c-cycles,
with and without drive automounting, with and without serial repl open,
and on a power-only connection.

I didn't notice the problem reported in #5356 after merely implementing
port_idle_until_interrupt; but I did notice that sleeps in general would
take over-long until "something" (like writing to the USB drive) happened;
I think "something" was probably calling port_enable_tick(). When this
problem was happening, sleeps would take a lot longer; for instance,
`sleep(.001)` would take about 1/20s and `sleep(.1)` would take about 1/7s.
2022-11-12 09:16:41 -06:00
..
internal_flash.c Fix CIRCUITPY drive offset in flash correctly, accounting for NVM 2022-10-06 12:39:46 -05:00
internal_flash.h Add initial RP2040 support 2021-01-20 19:16:56 -08:00
internal_flash_root_pointers.h Add initial RP2040 support 2021-01-20 19:16:56 -08:00
port.c raspberrypi: Make port_idle_until_interrupt work 2022-11-12 09:16:41 -06:00
rp2_cpu.s Add initial RP2040 support 2021-01-20 19:16:56 -08:00
usb.c Start of USB host API 2022-03-07 18:07:25 -08:00