reset flag in USBD_EVENT_CONFIGURED

This commit is contained in:
sakumisu
2024-03-23 17:50:49 +08:00
parent f28b1c61ba
commit 2bfb7255cd
13 changed files with 27 additions and 10 deletions

View File

@@ -252,6 +252,8 @@ static void usbd_event_handler(uint8_t busid, uint8_t event)
case USBD_EVENT_SUSPEND:
break;
case USBD_EVENT_CONFIGURED:
ep_tx_busy_flag = false;
hid_state = HID_STATE_IDLE;
/* setup first out ep read transfer */
usbd_ep_start_read(busid, CDC_OUT_EP, read_buffer, 2048);
break;