DUE TO SPAM, SIGN-UP IS DISABLED. Goto Selfserve wiki signup and request an account.
NAKing USB OUT/IN Tokens
USB supports a NAKing mechanism to pace incoming OUT data from the USB host. The USB device class driver can control this NAKing only indirectly by the manner in which it manages read requests.
...
NOTE: USB direction naming is host-centric. This makes life difficult for people working USB device drivers: IN refers to data coming from the device INto the host. But for the device, this is a write operation (write being peripheral-centric: from-memory-to-peripheral). OUT refers to data sent from the host OUT to the device. For the device this is a read (peripheral-to-memory) operation.
NAKing USB OUT Tokens
Below is how the NAKing is implemented in the interaction between the USB device class driver and USB Device Controller Drivers (DCDs):
...
6c. If the receive logic needs more data in order to complete the application read operation, it will wait until it is awakened by the receipt of a newly filled.
CDC/ACM driver
The CDC/ACM driver differs from all other drivers because it is REQUIRED to discard data if there is no application ready to receive the data. This is how a serial device works. So there is nothing like step 5 in the CDC/ACM driver and in step 6 the CDC/ACM driver will not remember the point where it left off; if the application cannot accept any further data, it will return the partially emptied read request to the DCD immediately to be filled – dropping an untransferred data into the bit bucket.
...
NOTE: As of this writing, the logic that implements the CDC/ACM _hardware flow control has not been implemented. There is a place holder for such logic, but the implementation is missing._
NAKing USB IN Tokens
The DCD will NAK IN tokens whenever it has nothing to send to the host PC. Without going into as much detail, suffice it to say that the logic flow is very similar to the case off OUT tokens with the following differences:
...