usbdevice/core: add reset function to support hotplug

When the USB got RESET packet from the host and the address is setup,
all the classes will got reset. The reset is done by class stop and than
class run. So the classes should reset their internal state in
class_{run,stop}.

Besides, the USB device driver could post a USB_MSG_RESET message on
every RESET packet.
This commit is contained in:
qiuyiuestc
2013-05-25 15:55:27 +08:00
committed by Grissiom
parent 046182be94
commit 97a507e667
2 changed files with 41 additions and 7 deletions
@@ -145,6 +145,7 @@ enum udev_msg_type
USB_MSG_SETUP_NOTIFY,
USB_MSG_DATA_NOTIFY,
USB_MSG_SOF,
USB_MSG_RESET,
};
typedef enum udev_msg_type udev_msg_type;