micropython/shared
Angus Gratton d11ca092f7 shared/tinyusb: Fix dynamic USB control callbacks for wLength==0.
In the case where an OUT control transfer triggers with wLength==0 (i.e.
all data sent in the SETUP phase, and no additional data phase) the
callbacks were previously implemented to return b"" (i.e. an empty buffer
for the data phase).

However this didn't actually work as intended because b"" can't provide a
RW buffer (needed for OUT transfers with a data phase to write data into),
so actually the endpoint would stall.

The symptom was often that the device process the request (if processing
it in the SETUP phase when all information was already available), but the
host sees the endpoint stall and eventually returns an error.

This commit changes the behaviour so returning True from the SETUP phase of
a control transfer queues a zero length status response.

Signed-off-by: Angus Gratton <angus@redyak.com.au>
2024-04-17 12:39:47 +10:00
..
libc all: Remove the "STATIC" macro and just use "static" instead. 2024-03-07 14:20:42 +11:00
memzip py/mkrules.mk: Add rule for compiling auto-generated source files. 2023-11-03 13:57:47 +11:00
netutils extmod/modlwip: Support IPv6. 2024-02-16 11:46:40 +11:00
readline all: Remove the "STATIC" macro and just use "static" instead. 2024-03-07 14:20:42 +11:00
runtime all: Remove the "STATIC" macro and just use "static" instead. 2024-03-07 14:20:42 +11:00
timeutils all: Remove the "STATIC" macro and just use "static" instead. 2024-03-07 14:20:42 +11:00
tinyusb shared/tinyusb: Fix dynamic USB control callbacks for wLength==0. 2024-04-17 12:39:47 +10:00
upytesthelper py/modsys: Allow sys.path to be assigned to. 2023-06-08 17:54:24 +10:00
README.md lib,shared: Update README's based on contents of these dirs. 2021-07-13 00:17:02 +10:00

README.md

This directory contains libraries, utilities and helper code developed specifically for this project. The code is intended to be portable and usable by any port.