summaryrefslogtreecommitdiff
path: root/components/drivers/include
diff options
context:
space:
mode:
authorGrissiom <[email protected]>2013-06-06 15:21:40 +0800
committerGrissiom <[email protected]>2013-06-06 15:21:40 +0800
commited19483cb4f026c40e7c6a6bc09583e054ef0c5e (patch)
tree3b4b61b512546e0fc1b2cc80be0992446729ff96 /components/drivers/include
parent03e8d24688ae56c6c53db81e42d40109026d1aac (diff)
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.
Diffstat (limited to 'components/drivers/include')
-rw-r--r--components/drivers/include/drivers/usb_device.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/components/drivers/include/drivers/usb_device.h b/components/drivers/include/drivers/usb_device.h
index f0e0989ce5..2f464def3f 100644
--- a/components/drivers/include/drivers/usb_device.h
+++ b/components/drivers/include/drivers/usb_device.h
@@ -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;