mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2025-12-26 09:08:25 +00:00
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:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user