output report go right to usbfunctinowrite?
Posted: Sun Aug 13, 2017 10:56 pm
This is not making sense to me. I have a descriptor that uses a set, get, and 5 outputs. This descriptor is the FFB example by Microsoft. I can show all relevant code if needed but it will dramatically complete things. I rather step my way in to this mystery question at a time. So here is what I currently see.
gett -> gets cough in usbFunctionSetup GOOD.
set -> gets cough in usbFunctionSetup GOOD.
output t -> gets cough in 1usbFunctionWrite HUH.
output 2-> gets cough in 1usbFunctionWrite HUH.
output 2-> gets cough in 1usbFunctionWrite HUH.
output 3-> gets cough in 1usbFunctionWrite HUH.
output 4-> gets cough in 1usbFunctionWrite HUH.
output 5-> gets cough in 1usbFunctionWrite HUH.
Now, to my understating you use the return USB_NO_MSG from a get or a set to run the usb function write or read. This is only needed if data exceeds 8 bytes and you can not return the payload up front. So I'm very confused how the outputs go right to 1usbFunctionWrite. I would except them to first hit usbFunctionSetup (set report). Now the output reports are bulk, maybe this is why, if so where is this explained?
Now for the part that really complicates matters. If my first get returns the size 5 (as it should based on the descriptor) none of the outputs are caught in the usbFunctionWrite . I actually have to return USB_NO_MSG from my get report. This makes absolutely no sense because outs are not gets at all, they should be sets....
If neither of these questions have answers then my confusion is sane. I'll add the code and see if its a programing issue and not an understanding issue. If what I typed above does make sense, what am I missing?
to make things worse
Windows sends output reports as interrupt-out data if possible and expects input reports on the interrupt-in endpoint. Only feature reports are always communicated as control transfers on endpoint 0. It is therefore advisable to use feature reports for your data. We will only cover feature reports here.
Isn't that a nice how do you do...
gett -> gets cough in usbFunctionSetup GOOD.
set -> gets cough in usbFunctionSetup GOOD.
output t -> gets cough in 1usbFunctionWrite HUH.
output 2-> gets cough in 1usbFunctionWrite HUH.
output 2-> gets cough in 1usbFunctionWrite HUH.
output 3-> gets cough in 1usbFunctionWrite HUH.
output 4-> gets cough in 1usbFunctionWrite HUH.
output 5-> gets cough in 1usbFunctionWrite HUH.
Now, to my understating you use the return USB_NO_MSG from a get or a set to run the usb function write or read. This is only needed if data exceeds 8 bytes and you can not return the payload up front. So I'm very confused how the outputs go right to 1usbFunctionWrite. I would except them to first hit usbFunctionSetup (set report). Now the output reports are bulk, maybe this is why, if so where is this explained?
Now for the part that really complicates matters. If my first get returns the size 5 (as it should based on the descriptor) none of the outputs are caught in the usbFunctionWrite . I actually have to return USB_NO_MSG from my get report. This makes absolutely no sense because outs are not gets at all, they should be sets....
If neither of these questions have answers then my confusion is sane. I'll add the code and see if its a programing issue and not an understanding issue. If what I typed above does make sense, what am I missing?
to make things worse
Windows sends output reports as interrupt-out data if possible and expects input reports on the interrupt-in endpoint. Only feature reports are always communicated as control transfers on endpoint 0. It is therefore advisable to use feature reports for your data. We will only cover feature reports here.
Isn't that a nice how do you do...