Kaynağa Gözat

update(core/usbd_core): clear configuration in disconnect callback

Signed-off-by: sakumisu <1203593632@qq.com>
sakumisu 9 ay önce
ebeveyn
işleme
b4fb10ee98
1 değiştirilmiş dosya ile 1 ekleme ve 0 silme
  1. 1 0
      core/usbd_core.c

+ 1 - 0
core/usbd_core.c

@@ -1123,6 +1123,7 @@ void usbd_event_connect_handler(uint8_t busid)
 
 void usbd_event_disconnect_handler(uint8_t busid)
 {
+    g_usbd_core[busid].configuration = 0;
     g_usbd_core[busid].event_handler(busid, USBD_EVENT_DISCONNECTED);
 }