Hello,
can you tell me which function in the Keil USB library sends a nack back to the host? I have a CDC bulk endpoint. I cannot find any reference to this in the code itself (it was mentioned in the forum but nobody says HOW...)
thanks
As long as I know, all of USB devices return NAK (not nack - NACK is the term for I2C) automatically, responding to IN or OUT transactions from host. The required timing for NAK response is too short to handle it with a firmware. Then, NAK is handled by hardware.
Endpoint returns NAK when it is configured (enabled) on the USB register of the chip. - IN endpoint returns NAK, when an IN transaction comes from host, AND when the endpoint is empty. - OUT endpoint returns NAK when an OUT-DATAx transaction comes from host, AND when the endpoint is still occupied by the last data.
Tsuneo