Disable SOF on configuration change.

This commit is contained in:
HiFiPhile 2024-05-09 18:44:27 +02:00
parent 11b5b2af51
commit ca479d6e4b

View File

@ -725,6 +725,9 @@ static bool process_control_request(uint8_t rhport, tusb_control_request_t const
// already configured: need to clear all endpoints and driver first
TU_LOG_USBD(" Clear current Configuration (%u) before switching\r\n", _usbd_dev.cfg_num);
// disable SOF
dcd_sof_enable(rhport, false);
// close all non-control endpoints, cancel all pending transfers if any
dcd_edpt_close_all(rhport);