diff options
Diffstat (limited to 'fastboot/usb.h')
-rw-r--r-- | fastboot/usb.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/fastboot/usb.h b/fastboot/usb.h index 5b44468bb..7ca44c414 100644 --- a/fastboot/usb.h +++ b/fastboot/usb.h @@ -52,6 +52,14 @@ struct usb_ifc_info { char device_path[256]; }; +class UsbTransport : public Transport { + // Resets the underlying transport. Returns 0 on success. + // This effectively simulates unplugging and replugging + public: + virtual int Reset() = 0; +}; + typedef int (*ifc_match_func)(usb_ifc_info *ifc); -Transport* usb_open(ifc_match_func callback); +// 0 is non blocking +UsbTransport* usb_open(ifc_match_func callback, uint32_t timeout_ms = 0); |