Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
usbd: device_next: cdc: wait IN EP ready before enqueue data to EP
Under the current structure of usbd_cdc_acm, there is a possibility that TX data is enqueued to UDC driver before the previous transaction is completed, hence causing the dropped data. This commit adds a mechanism for usbd_cdc_acm driver to wait for IN endpoint to complete existing transaction before allows the subsequent transaction to be enqueued. Signed-off-by: Chew Zeh Yang <[email protected]> usbd: device_next: cdc: fix possible CPU hogging issue As pointed out by tmon-nordic, the method to re-queue CDC tx transaction has possible issue of CPU hogging that could start system workqueue and lower priority thread. Instead of keep requeing the tx_fifo work, simply raise altered flag. The pending TX transaction will be triggered when TX transfer completion interrupt is raised. Signed-off-by: Chew Zeh Yang <[email protected]>
- Loading branch information