Skip to content

Commit 2626ee4

Browse files
committed
updated
1 parent c610e97 commit 2626ee4

File tree

1 file changed

+11
-24
lines changed

1 file changed

+11
-24
lines changed

python_bladerf/pylibbladerf/pybladerf.pyi

Lines changed: 11 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1185,7 +1185,10 @@ class PyBladeRFDeviceList:
11851185

11861186
@property
11871187
def instances(self) -> list[int]:
1188-
'''List of instances or ID's of found devices'''
1188+
'''
1189+
List of instances or ID's of found devices.
1190+
On Android list of file descriptors of found devices.
1191+
'''
11891192
...
11901193

11911194
@property
@@ -1198,6 +1201,7 @@ class PyBladeRFDeviceList:
11981201
'''List of product description string of found devices'''
11991202
...
12001203

1204+
12011205
class PyBladerfDevice:
12021206
'''
12031207
Class implementing interaction with the device.
@@ -1975,32 +1979,15 @@ class PyBladerfDevice:
19751979
'''
19761980
...
19771981

1978-
def pybladerf_open(device_identifier: str = '') -> PyBladerfDevice:
1979-
'''
1980-
Open specified device using a device identifier string. See pybladerf_open_with_devinfo() if a device identifier string is not readily available.
1981-
1982-
The general form of the device identifier string is:
1983-
`<backend>:[device=<bus>:<addr>] [instance=<n>] [serial=<serial>]`
1984-
1985-
An empty ("") device identifier will result in the first encountered device being opened (using the first discovered backend)
1986-
1987-
The 'backend' describes the mechanism used to communicate with the device, and may be one of the following:
1988-
- *: Any available backend
1989-
- libusb: libusb (See libusb changelog notes for required version, given your OS and controller)
1990-
- cypress: Cypress CyUSB/CyAPI backend (Windows only)
1991-
1992-
If no arguments are provided after the backend, the first encountered device on the specified backend will be opened. Note that a backend is required, if any arguments are to be provided.
1993-
1994-
Next, any provided arguments are provide as used to find the desired device. Be sure not to over constrain the search. Generally, only one of the above is required -- providing all of these may over constrain the search for the desired device (e.g., if a serial number matches, but not on the specified bus and address.)
1995-
- device=<bus>:<addr> (Specifies USB bus and address. Decimal or hex prefixed by '0x' is permitted)
1996-
- instance=<n> (Nth instance encountered, 0-indexed)
1997-
- serial=<serial> (Device's serial number)
1982+
def pybladerf_open() -> PyBladerfDevice | None:
1983+
'''Open first available bladeRF device'''
1984+
...
19981985

1999-
Below is an example of how to open a device with a specific serial number, using any avaiable backend supported by libbladeRF:
2000-
'''
1986+
def pybladerf_open_by_serial(desired_serial_number: str) -> PyBladerfDevice | None:
1987+
'''Open bladeRF device by serial number'''
20011988
...
20021989

2003-
def pybladerf_open_with_devinfo(devinfo: pybladerf_devinfo) -> PyBladerfDevice:
1990+
def pybladerf_open_with_devinfo(devinfo: pybladerf_devinfo) -> PyBladerfDevice | None:
20041991
'''
20051992
Opens device specified by provided pybladerf_devinfo structure
20061993

0 commit comments

Comments
 (0)