Sending a Zero-length data packet on the M8 parts

Question: Using the M8, how do I send a zero-length data packet to the host?



(1) Set the data count register to 0.

(2) Enable the endpoint to ACK the next IN packet.

If this is a status stage of a control transfer, you can also set the Endpoint0 Mode to "STATUS IN ONLY" (see the Mode table in the data sheet). By setting the mode, the hardware (SIE) automatically sends a zero-length packet to a valid IN in the status stage of the transfer.