micropython/docs/library
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
..
_thread.rst
array.rst
asyncio.rst
binascii.rst
bluetooth.rst
btree.rst
builtins.rst
cmath.rst
collections.rst
cryptolib.rst
deflate.rst
errno.rst
esp.rst
esp32.rst
espnow.rst
framebuf.rst
gc.rst
gzip.rst
hashlib.rst
heapq.rst
index.rst
io.rst
json.rst
lcd160cr.rst
machine.ADC.rst
machine.ADCBlock.rst
machine.ADCWiPy.rst
machine.I2C.rst
machine.I2S.rst
machine.PWM.rst
machine.Pin.rst
machine.RTC.rst
machine.SD.rst
machine.SDCard.rst
machine.SPI.rst
machine.Signal.rst
machine.Timer.rst
machine.TimerWiPy.rst
machine.UART.rst
machine.USBDevice.rst shared/tinyusb: Fix dynamic USB control callbacks for wLength==0. 2024-04-17 12:39:47 +10:00
machine.WDT.rst
machine.rst
math.rst
micropython.rst
neopixel.rst
network.LAN.rst
network.WIZNET5K.rst
network.WLAN.rst
network.WLANWiPy.rst
network.rst
openamp.rst
os.rst
platform.rst
pyb.ADC.rst
pyb.Accel.rst
pyb.CAN.rst
pyb.DAC.rst
pyb.ExtInt.rst
pyb.Flash.rst
pyb.I2C.rst
pyb.LCD.rst
pyb.LED.rst
pyb.Pin.rst
pyb.RTC.rst
pyb.SPI.rst
pyb.Servo.rst
pyb.Switch.rst
pyb.Timer.rst
pyb.UART.rst
pyb.USB_HID.rst
pyb.USB_VCP.rst
pyb.rst
random.rst
re.rst
rp2.DMA.rst
rp2.Flash.rst
rp2.PIO.rst
rp2.StateMachine.rst
rp2.rst
select.rst
socket.rst
ssl.rst
stm.rst
struct.rst
sys.rst
time.rst
uctypes.rst
vfs.rst
wipy.rst
wm8960.rst
zephyr.DiskAccess.rst
zephyr.FlashArea.rst
zephyr.rst
zephyr.zsensor.rst
zlib.rst