PyD2XX 0.0.2__tar.gz → 0.0.3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {pyd2xx-0.0.2 → pyd2xx-0.0.3}/PKG-INFO +1 -1
- {pyd2xx-0.0.2 → pyd2xx-0.0.3}/pyproject.toml +1 -1
- {pyd2xx-0.0.2 → pyd2xx-0.0.3}/src/PyD2XX/PyD2XX.py +29 -3
- {pyd2xx-0.0.2 → pyd2xx-0.0.3}/LICENSE +0 -0
- {pyd2xx-0.0.2 → pyd2xx-0.0.3}/README.md +0 -0
- {pyd2xx-0.0.2 → pyd2xx-0.0.3}/src/PyD2XX/FTD2XX.dll +0 -0
- {pyd2xx-0.0.2 → pyd2xx-0.0.3}/src/PyD2XX/FTD2XX_32.dll +0 -0
- {pyd2xx-0.0.2 → pyd2xx-0.0.3}/src/PyD2XX/FTD2XX_ARM.dll +0 -0
- {pyd2xx-0.0.2 → pyd2xx-0.0.3}/src/PyD2XX/Licenses/FTDI DRIVER LICENSE.txt +0 -0
- {pyd2xx-0.0.2 → pyd2xx-0.0.3}/src/PyD2XX/Licenses/PyD2XX LICENSE.txt +0 -0
- {pyd2xx-0.0.2 → pyd2xx-0.0.3}/src/PyD2XX/__init__.py +0 -0
- {pyd2xx-0.0.2 → pyd2xx-0.0.3}/src/PyD2XX/libftd2xx.dylib +0 -0
- {pyd2xx-0.0.2 → pyd2xx-0.0.3}/src/PyD2XX/libftd2xx.so +0 -0
- {pyd2xx-0.0.2 → pyd2xx-0.0.3}/src/PyD2XX/libftd2xx_32.so +0 -0
- {pyd2xx-0.0.2 → pyd2xx-0.0.3}/src/PyD2XX/libftd2xx_ARM.so +0 -0
- {pyd2xx-0.0.2 → pyd2xx-0.0.3}/src/PyD2XX/libftd2xx_ARM_32.so +0 -0
|
@@ -20,8 +20,8 @@ from sys import platform as Platform
|
|
|
20
20
|
|
|
21
21
|
# ---| Python Library Specific Definitions |---
|
|
22
22
|
|
|
23
|
-
VERSION = "0.0.
|
|
24
|
-
VERSION_TEST = "0.0.
|
|
23
|
+
VERSION = "0.0.3"
|
|
24
|
+
VERSION_TEST = "0.0.5_legătură_sufletească"
|
|
25
25
|
|
|
26
26
|
PRINT_NONE = int("00000", 2) # Print no messages.
|
|
27
27
|
PRINT_ERROR_CRITICAL = int("00001", 2) # Print critical error messages.
|
|
@@ -339,7 +339,6 @@ def FT_GetDeviceInfoList(DeviceCount: int) -> tuple[int, list[FT_Device]] | tupl
|
|
|
339
339
|
_Print(FT_STATUS_STR[Status] + " | ERROR: DeviceCount IS LESS THAN 1.", PRINT_ERROR_MINOR, False)
|
|
340
340
|
return Status, "FT_OTHER_ERROR"
|
|
341
341
|
DeviceList = (_FT_DEVICE_LIST_INFO_NODE * DeviceCount.value)()
|
|
342
|
-
Handle = ctypes.c_void_p(0)
|
|
343
342
|
Status = _DLL.FT_GetDeviceInfoList(ctypes.byref(DeviceList), ctypes.byref(DeviceCount))
|
|
344
343
|
if(Status != FT_OK):
|
|
345
344
|
_Print(FT_STATUS_STR[Status] + " | ERROR: FAILED TO GET DEVICE INFO LIST.", PRINT_ERROR_MAJOR, False)
|
|
@@ -354,8 +353,35 @@ def FT_GetDeviceInfoList(DeviceCount: int) -> tuple[int, list[FT_Device]] | tupl
|
|
|
354
353
|
ReturnDeviceList[i].LocID = DeviceList[i].LocID
|
|
355
354
|
ReturnDeviceList[i].SerialNumber = DeviceList[i].SerialNumber.decode("utf-8")
|
|
356
355
|
ReturnDeviceList[i].Description = DeviceList[i].Description.decode("utf-8")
|
|
356
|
+
ReturnDeviceList[i].Handle = DeviceList[i].Handle.value if (DeviceList[i].Handle is not None) else 0
|
|
357
357
|
return Status, ReturnDeviceList
|
|
358
358
|
|
|
359
|
+
def FT_GetDeviceInfoDetail(Index: int) -> tuple[int, FT_Device] | tuple[int, str]:
|
|
360
|
+
Status = FT_OK
|
|
361
|
+
Index = ctypes.c_ulong(Index)
|
|
362
|
+
Device = _FT_DEVICE_LIST_INFO_NODE()
|
|
363
|
+
Status = _DLL.FT_GetDeviceInfoDetail(Index,
|
|
364
|
+
ctypes.addressof(Device) + _FT_DEVICE_LIST_INFO_NODE.Flags.offset,
|
|
365
|
+
ctypes.addressof(Device) + _FT_DEVICE_LIST_INFO_NODE.Type.offset,
|
|
366
|
+
ctypes.addressof(Device) + _FT_DEVICE_LIST_INFO_NODE.ID.offset,
|
|
367
|
+
ctypes.addressof(Device) + _FT_DEVICE_LIST_INFO_NODE.LocID.offset,
|
|
368
|
+
ctypes.addressof(Device) + _FT_DEVICE_LIST_INFO_NODE.SerialNumber.offset,
|
|
369
|
+
ctypes.addressof(Device) + _FT_DEVICE_LIST_INFO_NODE.Description.offset,
|
|
370
|
+
ctypes.addressof(Device) + _FT_DEVICE_LIST_INFO_NODE.Handle.offset)
|
|
371
|
+
if(Status != FT_OK):
|
|
372
|
+
_Print(FT_STATUS_STR[Status] + " | ERROR: FAILED TO GET DEVICE INFO DETAIL.", PRINT_ERROR_MAJOR, False)
|
|
373
|
+
return Status, "FT_OTHER_ERROR"
|
|
374
|
+
ReturnDevice = _CreateDevice()
|
|
375
|
+
ReturnDevice.Handle = "FT_OTHER_ERROR"
|
|
376
|
+
ReturnDevice.Flags = Device.Flags
|
|
377
|
+
ReturnDevice.Type = Device.Type
|
|
378
|
+
ReturnDevice.ID = Device.ID
|
|
379
|
+
ReturnDevice.LocID = Device.LocID
|
|
380
|
+
ReturnDevice.SerialNumber = Device.SerialNumber.decode("utf-8")
|
|
381
|
+
ReturnDevice.Description = Device.Description.decode("utf-8")
|
|
382
|
+
ReturnDevice.Handle = Device.Handle.value if (Device.Handle is not None) else 0
|
|
383
|
+
return Status, ReturnDevice
|
|
384
|
+
|
|
359
385
|
def FT_Open(Index: int, Device: FT_Device) -> int:
|
|
360
386
|
Status = FT_OTHER_ERROR
|
|
361
387
|
if(not(isinstance(Device, FT_Device))):
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|