diff options
author | Josh Gao <jmgao@google.com> | 2016-09-28 12:32:45 -0700 |
---|---|---|
committer | Josh Gao <jmgao@google.com> | 2017-01-25 13:52:53 -0800 |
commit | 1c70e1bcbcced190b351d4fb418f32b4e428f496 (patch) | |
tree | 522a0402259c7606f09757cdb0a5ed8303750c43 /adb/adb.h | |
parent | 4c38a921c225ef065ab0b3765f193fea64e2d6fb (diff) | |
download | system_core-1c70e1bcbcced190b351d4fb418f32b4e428f496.tar.gz system_core-1c70e1bcbcced190b351d4fb418f32b4e428f496.tar.bz2 system_core-1c70e1bcbcced190b351d4fb418f32b4e428f496.zip |
adb: add libusb implementation for Linux/Darwin.
Add a libusb-based implementation alongside the existing native
implementations, controlled by the ADB_LIBUSB environment variable.
Windows will need more work for the usb driver.
Bug: http://b/31321337
Test: python test_device.py on linux/darwin, with ADB_LIBUSB=0 and 1
Change-Id: Ib68fb2c6c05475eae3ff4cc19f55802a6f489bb7
Diffstat (limited to 'adb/adb.h')
-rw-r--r-- | adb/adb.h | 14 |
1 files changed, 1 insertions, 13 deletions
@@ -28,6 +28,7 @@ #include "adb_trace.h" #include "fdevent.h" #include "socket.h" +#include "usb.h" constexpr size_t MAX_PAYLOAD_V1 = 4 * 1024; constexpr size_t MAX_PAYLOAD_V2 = 256 * 1024; @@ -54,7 +55,6 @@ std::string adb_version(); #define ADB_SERVER_VERSION 38 class atransport; -struct usb_handle; struct amessage { uint32_t command; /* command identifier constant */ @@ -195,18 +195,6 @@ void local_init(int port); bool local_connect(int port); int local_connect_arbitrary_ports(int console_port, int adb_port, std::string* error); -// USB host/client interface. -void usb_init(); -int usb_write(usb_handle *h, const void *data, int len); -int usb_read(usb_handle *h, void *data, int len); -int usb_close(usb_handle *h); -void usb_kick(usb_handle *h); - -// USB device detection. -#if ADB_HOST -int is_adb_interface(int usb_class, int usb_subclass, int usb_protocol); -#endif - ConnectionState connection_state(atransport *t); extern const char* adb_device_banner; |