mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2025-12-26 01:07:21 +00:00
[USB Device]fix an error on msc
This commit is contained in:
@@ -2144,8 +2144,9 @@ static void rt_usbd_thread_entry(void* parameter)
|
||||
break;
|
||||
case USB_MSG_RESET:
|
||||
RT_DEBUG_LOG(RT_DEBUG_USB, ("reset %d\n", device->state));
|
||||
if (device->state == USB_STATE_ADDRESS)
|
||||
if (device->state == USB_STATE_ADDRESS || device->state == USB_STATE_CONFIGURED)
|
||||
_stop_notify(device);
|
||||
device->state = USB_STATE_NOTATTACHED;
|
||||
break;
|
||||
case USB_MSG_PLUG_IN:
|
||||
device->state = USB_STATE_ATTACHED;
|
||||
|
||||
Reference in New Issue
Block a user