usb: add USB_MSG_PLUG_OUT event

When the core received an USB_MSG_PLUG_OUT event, it will stop all the
classes. This make a chance that the classes could get rid off doing
useless stuff while the USB cable is plugged out.
This commit is contained in:
Grissiom
2013-06-06 15:21:40 +08:00
parent 03e8d24688
commit ed19483cb4
2 changed files with 64 additions and 11 deletions

View File

@@ -146,6 +146,11 @@ enum udev_msg_type
USB_MSG_DATA_NOTIFY,
USB_MSG_SOF,
USB_MSG_RESET,
/* we don't need to add a "PLUG_IN" event because after the cable is
* plugged in(before any SETUP) the classed have nothing to do. If the host
* is ready, it will send RESET and we will have USB_MSG_RESET. So, a RESET
* should reset and run the class while plug_in is not. */
USB_MSG_PLUG_OUT,
};
typedef enum udev_msg_type udev_msg_type;