The guard against running when flash is disabled isn't perfect and
may lead to calling the row handler anyway. We were crashing due
to mp_hal_delay_us being in flash. So, move it to RAM.
Also move the panic handler to IRAM so we get nice output when this
happens.
Turn off JTAG by default so its pins can be used by code.py.
Fixes#8987
Incorrect error handling in send/recv would raise an OSError with
an incorrect (negative) code.
It's likely that this bug was always happening in the Pico W
implementation, which became the basis of the current shared
implementation.
Push handling of WANT_{READ,WRITE} down into mbedtls_raise_error
and use it in recv_into and send.
Tested by connecting to google.com:443, sending nothing, and trying
to read a byte:
```py
import socketpool, ssl, time, wifi
socket = socketpool.SocketPool(wifi.radio)
ctx = ssl.SSLContext()
with ctx.wrap_socket(socket.socket()) as ss:
ss.connect(("google.com", 443))
ss.settimeout(1)
b = bytearray(1)
try:
t0 = time.monotonic()
ss.recv_into(b)
except Exception as ee:
t1 = time.monotonic()
exc = ee
print(t1-t0)
raise exc
```
As desired, an exception `OSError: [Errno 116] ETIMEDOUT` occurred
and the time delta value was 1.0 seconds.
(tested on pycamera)
Closes: #8988
I tested this by fetching a .txt file repeatedly using curl while
running the fancy camera demo. (100+ times without failure). I also
repeatedly loaded the filesystem view http://.../fs/#/sd/ which worked
10+ times without failure, but does take some time (multiple seconds) to
show a listing with a few dozen files.
(I suspect there's an accidentally quadratic behavior in oofatfs to stat
every file in a directory, because it repeatedly does a linear search of
the directory for the stat information of each file, but that's not an
issue for Right Now(TM))
Closes: #8980
The original implementation couldn't allocate to a region that was
just freed even though the freed region was the same size as the
new request. This was due to allocation sizes being rounded up
during search but not when marking the region in use.
Fixes https://github.com/adafruit/Adafruit_Learning_System_Guides/issues/2746
- add tuh_event_hook_cb() in SRAM, required when updated to latest tinyusb
- bump up pico-pio-usb to latest
- bump up tinyusb to latest for new tuh_hid_receive_abort(), and all endpoint abort when
SET_CONFIGURATION