Access Restricted

This page contains internal documentation that is not publicly available.


DHWCtrl.UsbHostTransferCtrlIn

Control transfer to (Addr, EP0) with a device-to-host data stage. Setup carries the 8-byte USB SETUP packet (bmRequestType, bRequest, wValue, wIndex, wLength - the wXxx fields are little-endian per USB spec and transmitted as opaque bytes). Firmware must reject SETUPs whose bmRequestType[7] = 0 with ErrInvalidParam. Firmware reads up to InLen bytes as the IN data stage; InData carries the bytes actually returned. Mps is the device's bMaxPacketSize0 (typically 8 / 16 / 32 / 64).

Parameters (request frame)

Name Type/Size Description
Index Integer (8 bits) Zero-based instance index within this peripheral category. The valid range is firmware / hardware-variant specific; discoverable via ListPeripherals.
Addr Integer (8 bits) USB device address on the host port.
(Minimum value: 0, maximum value: 127)
Mps Integer (8 bits) Device's bMaxPacketSize0 for EP0 (typically 8, 16, 32 or 64).
Setup Raw data (length 8 Bytes) 8-byte USB SETUP packet: bmRequestType, bRequest, wValue, wIndex, wLength. The wXxx fields are little-endian per USB spec (not BRP convention) and are transmitted as opaque bytes.
InLen Integer (16 bits) Maximum number of bytes to read in the IN data stage.
TimeoutMs Integer (16 bits) Maximum time the firmware will wait for the operation to complete, in milliseconds.

Returned values (response frame)

Name Type/Size Description
Length of InData Integer (16 bits) Length of InData in bytes
InData Raw data Bytes returned by the device in the IN data stage.