mirror of
https://github.com/hathach/tinyusb.git
synced 2025-01-24 05:42:57 +08:00
b949ae596f
For IN endpoints output FIFO is filled in interrupt, therefor before endpoint is enabled, DIEPTSIZ is set with correct size of packet. Then endpoint is enabled and FIFO empty interrupt is enabled. This works fine except for the ZLP. Enabling FIFO empty interrupt results in interrupt handler being called all the time because there is nothing to put in the FIFO. Eventually it ends when IN token is received and empty packed is transmitted out. This change does not enable FIFO empty interrupt for ZLP reducing CPU load.