To construct the USB setup packet's bmRequestType byte, readControl uses marshallControlSetup, which in turn calls marshalRequestType.
Nothing in this function touches bit 7 of the bmRequestType byte, so the transfer is always sent out as a host-to-device transfer (rather than device-to-host), effectively writing rather than reading.
To construct the USB setup packet's
bmRequestType
byte,readControl
usesmarshallControlSetup
, which in turn callsmarshalRequestType
.Nothing in this function touches bit 7 of the
bmRequestType
byte, so the transfer is always sent out as a host-to-device transfer (rather than device-to-host), effectively writing rather than reading.