Skip to content

Commit

Permalink
USB support (final changes) (#97)
Browse files Browse the repository at this point in the history
* Documentation cleanup

* Documentation

* Documentation

* 'socket' -> 'USB'
  • Loading branch information
JeffLIrion committed Jun 6, 2020
1 parent a13ac91 commit 95ca16f
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
6 changes: 4 additions & 2 deletions adb_shell/adb_device.py
Expand Up @@ -1300,8 +1300,10 @@ class AdbDeviceUsb(AdbDevice):
Parameters
----------
serial : str
serial : str, None
The USB device serial ID
port_path : TODO, None
TODO
default_timeout_s : float, None
Default timeout in seconds for USB packets, or ``None``
banner : str, bytes, None
Expand All @@ -1319,7 +1321,7 @@ class AdbDeviceUsb(AdbDevice):
Whether an ADB connection to the device has been established
_banner : bytearray, bytes
The hostname of the machine where the Python interpreter is currently running
_handle : TcpHandle
_handle : UsbHandle
The handle that is used to connect to the device
"""
Expand Down
7 changes: 3 additions & 4 deletions adb_shell/handle/usb_handle.py
Expand Up @@ -146,14 +146,14 @@ class UsbHandle(BaseHandle): # pragma: no cover
Parameters
----------
default_timeout_s : TODO, None
Timeout in seconds for all I/O.
device : usb1.USBDevice
libusb_device to connect to.
setting : usb1.USBInterfaceSetting
libusb setting with the correct endpoints to communicate with.
usb_info : TODO, None
String describing the usb path/serial/device, for debugging.
default_timeout_s : TODO, None
Timeout in seconds for all I/O.
Attributes
----------
Expand Down Expand Up @@ -213,10 +213,9 @@ def connect(self, timeout_s=None):
Parameters
----------
timeout_s : float, None
Set the timeout on the socket instance
Set the timeout on the USB instance
"""

read_endpoint = None
write_endpoint = None

Expand Down
2 changes: 1 addition & 1 deletion tests/test_usb_handle.py
Expand Up @@ -21,7 +21,7 @@ def setUp(self):
self.handle.connect()

def tearDown(self):
"""Close the socket connection."""
"""Close the USB connection."""
self.handle.close()

def test_connect_with_timeout(self):
Expand Down

0 comments on commit 95ca16f

Please sign in to comment.