PyD3XX


NamePyD3XX JSON
Version 1.0.1 PyPI version JSON
download
home_pageNone
SummaryAn unofficial Python wrapper for the FTDI D3XX library.
upload_time2024-07-16 21:26:12
maintainerNone
docs_urlNone
authorNone
requires_python>=3.8
licenseNone
keywords ftdi ftdichip pyd3xx d3xx ftd3xx ft600 ft601
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # PyD3XX
An unofficial Python wrapper for the FTDI D3XX library.  
PyD3XX supports Windows, Linux, and MacOS.  
All D3XX dynamic library variants are included in this package, so you don't need to include them directly in your project!  
\^You don't need and should not have any D3XX .dll, .dylib, or .so file in your script's directory.  
This was designed so the user needs zero ctypes knowledge and not need to import anything besides PyD3XX to interact with D3XX (FT600 & FT601) devices. The user should never have to interact with a ctypes object or method.  

## Plans
1. Fix segfault on program exit when on Linux or MacOS.  
2. Add a FT602 sub module in the future.  

## API - Classes
Here are the class equivalents for the D3XX structures and unique Python classes for this wrapper.

All D3XX Structure equivalents have variants of their variables with a "\_". These are usually a ctypes equivalent of the variable but are NOT directly used in the Python function calls except "\_Handle" in the FT\_Device class. YOU SHOULD IGNORE THE "_" variants unless you know what you're doing.

**All D3XX Structure equivalent classes have every variable accessible that the original structure has. The variables will have the same name as in the programming guide unless otherwise stated here.**

**If a class/structure's field/variable is not mentioned, it is an integer**.

### API - Classes - D3XX Structure Equivalents

**FT\_Device** == FT_DEVICE_LIST_INFO_NODE
> *FT\_Device should be passed into function calls and not FT\_Device.Handle or FT\_Device.\_Handle. Those just exist for your reference.*  
> Handle (int)  
> Flags (int)  
> Type (int)  
> ID (int)  
> LocID (int)  
> SerialNumber (str)  
> Description  (str)  

**FT\_DeviceDescriptor** == FT\_DEVICE\_DESCRIPTOR  
**FT\_ConfigurationDescriptor** == FT\_CONFIGURATION\_DESCRIPTOR  
**FT\_InterfaceDescriptor** == FT\_DEVICE\_DESCRIPTOR  
**FT\_StringDescriptor** == FT\_STRING\_DESCRIPTOR  
> szString (str)  

**FT\_Pipe** == FT\_PIPE\_INFORMATION  
**FT\_Overlapped** == OVERLAPPED  
**FT\_Pipe** == FT\_PIPE\_INFORMATION  
**FT\_SetupPacket** == FT\_SETUP\_PACKET  

**FT\_60XCONFIGURATION** == FT\_60XCONFIGURATION
> StringDescriptors (A list of str objects in the "utf_16_le" format).

### API - Classes - Python Specific
**FT_Buffer** | Used as a buffer for function calls.  
> from_int() - Creates an FT_Buffer from an integer.  
> from_str() - Creates an FT_Buffer from a string.  
> from_bytearray() - Creates an FT_Buffer from a bytearray.  
> from_bytes() - Creates an FT_Buffer from bytes.  
> Value() - Returns a bytearray of the FT_Buffer.  


## API - Functions

**FT_CreateDeviceInfoList() -> Status (int), DeviceCount (int):**

**FT_CreateDeviceInfoList() -> Status (int), DeviceCount (int):**

**FT_GetDeviceInfoList(DeviceCount: int) -> Status (int), DeviceList (list[FT_Device]):**

**FT_GetDeviceInfoDetail(Index: int) -> Status (int), Device (FT_Device):**

**FT_ListDevices(IndexCount: int, Flags: int) -> Status (int), Information (int  |  str  |  list[str]):**
> IndexCount = Index or Device Count

**FT_Create(Identifier, OpenFlag: int, Device: FT_Device) -> Status (int):**

**FT_Close(Device: FT_Device) -> Status (int):**

**FT_WritePipe(Device: FT_Device, Pipe: FT_Pipe, Buffer: FT_Buffer, BufferLength: int, Overlapped) -> Status (int), BytesTransferred(int):**
> Overlapped = FT_Overlapped or int(0) or NULL

**FT_WritePipeEx(Device: FT_Device, Pipe: FT_Pipe, Buffer: FT_Buffer, BufferLength: int, Overlapped) -> Status (int), BytesTransferred(int):**

**FT_ReadPipe(Device: FT_Device, Pipe: FT_Pipe, BufferLength: int, Overlapped) -> Status (int), Buffer (FT_Buffer), BytesTransferred (int):**

**FT_ReadPipeEx(Device: FT_Device, Pipe: FT_Pipe, BufferLength: int, Overlapped) -> Status (int), Buffer (FT_Buffer), BytesTransferred (int):**

**FT_GetOverlappedResult(Device: FT_Device, Overlapped: FT_Overlapped, Wait: bool) -> Status (int), LengthTransferred (int):**

**FT_InitializeOverlapped(Device: FT_Device) -> Status (int), Overlapped (FT_Overlapped):**
> Create an overlapped object.

**FT_ReleaseOverlapped(Device: FT_Device, Overlapped: FT_Overlapped) -> Status (int):**

**FT_SetStreamPipe(Device: FT_Device, AllWritePipes: bool, AllReadPipes: bool, Pipe: FT_Pipe  |  int, StreamSize: int) -> Status (int):**

**FT_ClearStreamPipe(Device: FT_Device, AllWritePipes: bool, AllReadPipes: bool, Pipe: FT_Pipe  |  int) -> Status (int):**

**FT_SetPipeTimeout(Device: FT_Device, Pipe: FT_Pipe, Timeout: int) -> Status (int):**

**FT_GetPipeTimeout(Device: FT_Device, Pipe: FT_Pipe) -> Status (int), Timeout (int):**

**FT_AbortPipe(Device: FT_Device, Pipe: FT_Pipe) -> Status (int):**

**FT_GetDeviceDescriptor(Device: FT_Device) -> Status (int), DeviceDescriptor (FT_DeviceDescriptor):**

**FT_GetConfigurationDescriptor(Device: FT_Device) -> Status (int),  ConfigurationDescriptor (FT_ConfigurationDescriptor):**

**FT_GetInterfaceDescriptor(Device: FT_Device, InterfaceIndex) -> Status (int),  InterfaceDescriptor (FT_InterfaceDescriptor):**

**FT_GetPipeInformation(Device: FT_Device, InterfaceIndex: int, PipeIndex: int) -> Status (int), Pipe (FT_Pipe):**

**FT_GetDescriptor(Device: FT_Device, DescriptorType: int, Index: int) -> Status (int), Descriptor (FT_DeviceDescriptor  |  FT_InterfaceDescriptor  |  FT_ConfigurationDescriptor  |  FT_StringDescriptor), LengthTransferred (int):**

**FT_ControlTransfer(Device: FT_Device, SetupPacket: FT_SetupPacket, Buffer: FT_Buffer, BufferLength: int) -> Status (int), LengthTransferred (int):**

**FT_GetVIDPID(Device: FT_Device) -> Status (int), VID (int), PID (int):**

**FT_EnableGPIO(Device: FT_Device, EnableMask: int, DirectionMask: int) -> Status (int):**

**FT_WriteGPIO(Device: FT_Device, SelectMask: int, Data: int) -> Status (int):**

**FT_ReadGPIO(Device: FT_Device) -> Status (int), GPIO_Data (int):**

**FT_SetGPIOPull(Device: FT_Device, SelectMask: int, PullMask: int) -> Status (int):**

**FT_SetNotificationCallback(Device: FT_Device, CallbackFunction: typing.Callable[[int, int, int], None]) -> Status (int):**

**FT_ClearNotificationCallback(Device: FT_Device) -> Status (int):**

**FT_GetChipConfiguration(Device: FT_Device) -> Status (int), Configuration (FT_60XCONFIGURATION):**

**FT_SetChipConfiguration(Device: FT_Device, Configuration: FT_60XCONFIGURATION) -> Status (int):**

**FT_IsDevicePath(Device: FT_Device, DevicePath: str) -> Status (int):**

**FT_GetDriverVersion(Device: FT_Device) -> Status (int), Version (int):**

**FT_GetLibraryVersion() -> Status (int), Version (int):**

**FT_CycleDevicePort(Device: FT_Device) -> Status (int):**

**FT_SetSuspendTimeout(Device: FT_Device, Timeout: int) -> Status (int):**

**FT_GetSuspendTimeout(Device: FT_Device) -> Status (int), Timeout (int):**

**FT_GetStringDescriptor(Device: FT_Device, StringIndex: int) -> Status (int), String Descriptor (FT_StringDescriptor):**

**FT_ReadPipeAsync(Device: FT_Device, FIFO_Index: int, BufferLength: int, Overlapped) -> Status (int), Buffer (FT_Buffer), BytesTransferred (int):**

**FT_WritePipeAsync(Device: FT_Device, FIFO_Index, Buffer: FT_Buffer, BufferLength: int, Overlapped) -> Status (int), BytesTransferred (int):**

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "PyD3XX",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": "FTDI, ftdichip, PyD3XX, D3XX, FTD3XX, FT600, FT601",
    "author": null,
    "author_email": "Hector Soto <hector.soto@ftdichip.com>",
    "download_url": "https://files.pythonhosted.org/packages/6a/4f/f8ff0a35dc68422e64414a5dc98a74410507c8c28f9e4b75c1628f1f6dfb/pyd3xx-1.0.1.tar.gz",
    "platform": null,
    "description": "# PyD3XX\nAn unofficial Python wrapper for the FTDI D3XX library.  \nPyD3XX supports Windows, Linux, and MacOS.  \nAll D3XX dynamic library variants are included in this package, so you don't need to include them directly in your project!  \n\\^You don't need and should not have any D3XX .dll, .dylib, or .so file in your script's directory.  \nThis was designed so the user needs zero ctypes knowledge and not need to import anything besides PyD3XX to interact with D3XX (FT600 & FT601) devices. The user should never have to interact with a ctypes object or method.  \n\n## Plans\n1. Fix segfault on program exit when on Linux or MacOS.  \n2. Add a FT602 sub module in the future.  \n\n## API - Classes\nHere are the class equivalents for the D3XX structures and unique Python classes for this wrapper.\n\nAll D3XX Structure equivalents have variants of their variables with a \"\\_\". These are usually a ctypes equivalent of the variable but are NOT directly used in the Python function calls except \"\\_Handle\" in the FT\\_Device class. YOU SHOULD IGNORE THE \"_\" variants unless you know what you're doing.\n\n**All D3XX Structure equivalent classes have every variable accessible that the original structure has. The variables will have the same name as in the programming guide unless otherwise stated here.**\n\n**If a class/structure's field/variable is not mentioned, it is an integer**.\n\n### API - Classes - D3XX Structure Equivalents\n\n**FT\\_Device** == FT_DEVICE_LIST_INFO_NODE\n> *FT\\_Device should be passed into function calls and not FT\\_Device.Handle or FT\\_Device.\\_Handle. Those just exist for your reference.*  \n> Handle (int)  \n> Flags (int)  \n> Type (int)  \n> ID (int)  \n> LocID (int)  \n> SerialNumber (str)  \n> Description  (str)  \n\n**FT\\_DeviceDescriptor** == FT\\_DEVICE\\_DESCRIPTOR  \n**FT\\_ConfigurationDescriptor** == FT\\_CONFIGURATION\\_DESCRIPTOR  \n**FT\\_InterfaceDescriptor** == FT\\_DEVICE\\_DESCRIPTOR  \n**FT\\_StringDescriptor** == FT\\_STRING\\_DESCRIPTOR  \n> szString (str)  \n\n**FT\\_Pipe** == FT\\_PIPE\\_INFORMATION  \n**FT\\_Overlapped** == OVERLAPPED  \n**FT\\_Pipe** == FT\\_PIPE\\_INFORMATION  \n**FT\\_SetupPacket** == FT\\_SETUP\\_PACKET  \n\n**FT\\_60XCONFIGURATION** == FT\\_60XCONFIGURATION\n> StringDescriptors (A list of str objects in the \"utf_16_le\" format).\n\n### API - Classes - Python Specific\n**FT_Buffer** | Used as a buffer for function calls.  \n> from_int() - Creates an FT_Buffer from an integer.  \n> from_str() - Creates an FT_Buffer from a string.  \n> from_bytearray() - Creates an FT_Buffer from a bytearray.  \n> from_bytes() - Creates an FT_Buffer from bytes.  \n> Value() - Returns a bytearray of the FT_Buffer.  \n\n\n## API - Functions\n\n**FT_CreateDeviceInfoList() -> Status (int), DeviceCount (int):**\n\n**FT_CreateDeviceInfoList() -> Status (int), DeviceCount (int):**\n\n**FT_GetDeviceInfoList(DeviceCount: int) -> Status (int), DeviceList (list[FT_Device]):**\n\n**FT_GetDeviceInfoDetail(Index: int) -> Status (int), Device (FT_Device):**\n\n**FT_ListDevices(IndexCount: int, Flags: int) -> Status (int), Information (int  |  str  |  list[str]):**\n> IndexCount = Index or Device Count\n\n**FT_Create(Identifier, OpenFlag: int, Device: FT_Device) -> Status (int):**\n\n**FT_Close(Device: FT_Device) -> Status (int):**\n\n**FT_WritePipe(Device: FT_Device, Pipe: FT_Pipe, Buffer: FT_Buffer, BufferLength: int, Overlapped) -> Status (int), BytesTransferred(int):**\n> Overlapped = FT_Overlapped or int(0) or NULL\n\n**FT_WritePipeEx(Device: FT_Device, Pipe: FT_Pipe, Buffer: FT_Buffer, BufferLength: int, Overlapped) -> Status (int), BytesTransferred(int):**\n\n**FT_ReadPipe(Device: FT_Device, Pipe: FT_Pipe, BufferLength: int, Overlapped) -> Status (int), Buffer (FT_Buffer), BytesTransferred (int):**\n\n**FT_ReadPipeEx(Device: FT_Device, Pipe: FT_Pipe, BufferLength: int, Overlapped) -> Status (int), Buffer (FT_Buffer), BytesTransferred (int):**\n\n**FT_GetOverlappedResult(Device: FT_Device, Overlapped: FT_Overlapped, Wait: bool) -> Status (int), LengthTransferred (int):**\n\n**FT_InitializeOverlapped(Device: FT_Device) -> Status (int), Overlapped (FT_Overlapped):**\n> Create an overlapped object.\n\n**FT_ReleaseOverlapped(Device: FT_Device, Overlapped: FT_Overlapped) -> Status (int):**\n\n**FT_SetStreamPipe(Device: FT_Device, AllWritePipes: bool, AllReadPipes: bool, Pipe: FT_Pipe  |  int, StreamSize: int) -> Status (int):**\n\n**FT_ClearStreamPipe(Device: FT_Device, AllWritePipes: bool, AllReadPipes: bool, Pipe: FT_Pipe  |  int) -> Status (int):**\n\n**FT_SetPipeTimeout(Device: FT_Device, Pipe: FT_Pipe, Timeout: int) -> Status (int):**\n\n**FT_GetPipeTimeout(Device: FT_Device, Pipe: FT_Pipe) -> Status (int), Timeout (int):**\n\n**FT_AbortPipe(Device: FT_Device, Pipe: FT_Pipe) -> Status (int):**\n\n**FT_GetDeviceDescriptor(Device: FT_Device) -> Status (int), DeviceDescriptor (FT_DeviceDescriptor):**\n\n**FT_GetConfigurationDescriptor(Device: FT_Device) -> Status (int),  ConfigurationDescriptor (FT_ConfigurationDescriptor):**\n\n**FT_GetInterfaceDescriptor(Device: FT_Device, InterfaceIndex) -> Status (int),  InterfaceDescriptor (FT_InterfaceDescriptor):**\n\n**FT_GetPipeInformation(Device: FT_Device, InterfaceIndex: int, PipeIndex: int) -> Status (int), Pipe (FT_Pipe):**\n\n**FT_GetDescriptor(Device: FT_Device, DescriptorType: int, Index: int) -> Status (int), Descriptor (FT_DeviceDescriptor  |  FT_InterfaceDescriptor  |  FT_ConfigurationDescriptor  |  FT_StringDescriptor), LengthTransferred (int):**\n\n**FT_ControlTransfer(Device: FT_Device, SetupPacket: FT_SetupPacket, Buffer: FT_Buffer, BufferLength: int) -> Status (int), LengthTransferred (int):**\n\n**FT_GetVIDPID(Device: FT_Device) -> Status (int), VID (int), PID (int):**\n\n**FT_EnableGPIO(Device: FT_Device, EnableMask: int, DirectionMask: int) -> Status (int):**\n\n**FT_WriteGPIO(Device: FT_Device, SelectMask: int, Data: int) -> Status (int):**\n\n**FT_ReadGPIO(Device: FT_Device) -> Status (int), GPIO_Data (int):**\n\n**FT_SetGPIOPull(Device: FT_Device, SelectMask: int, PullMask: int) -> Status (int):**\n\n**FT_SetNotificationCallback(Device: FT_Device, CallbackFunction: typing.Callable[[int, int, int], None]) -> Status (int):**\n\n**FT_ClearNotificationCallback(Device: FT_Device) -> Status (int):**\n\n**FT_GetChipConfiguration(Device: FT_Device) -> Status (int), Configuration (FT_60XCONFIGURATION):**\n\n**FT_SetChipConfiguration(Device: FT_Device, Configuration: FT_60XCONFIGURATION) -> Status (int):**\n\n**FT_IsDevicePath(Device: FT_Device, DevicePath: str) -> Status (int):**\n\n**FT_GetDriverVersion(Device: FT_Device) -> Status (int), Version (int):**\n\n**FT_GetLibraryVersion() -> Status (int), Version (int):**\n\n**FT_CycleDevicePort(Device: FT_Device) -> Status (int):**\n\n**FT_SetSuspendTimeout(Device: FT_Device, Timeout: int) -> Status (int):**\n\n**FT_GetSuspendTimeout(Device: FT_Device) -> Status (int), Timeout (int):**\n\n**FT_GetStringDescriptor(Device: FT_Device, StringIndex: int) -> Status (int), String Descriptor (FT_StringDescriptor):**\n\n**FT_ReadPipeAsync(Device: FT_Device, FIFO_Index: int, BufferLength: int, Overlapped) -> Status (int), Buffer (FT_Buffer), BytesTransferred (int):**\n\n**FT_WritePipeAsync(Device: FT_Device, FIFO_Index, Buffer: FT_Buffer, BufferLength: int, Overlapped) -> Status (int), BytesTransferred (int):**\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "An unofficial Python wrapper for the FTDI D3XX library.",
    "version": "1.0.1",
    "project_urls": {
        "D3xx_programming_guide": "https://ftdichip.com/wp-content/uploads/2020/08/AN_379-D3xx-Programmers-Guide-1.pdf",
        "Ftdi_d3xx_drivers": "https://ftdichip.com/drivers/d3xx-drivers/",
        "Ftdi_homepage": "https://ftdichip.com/"
    },
    "split_keywords": [
        "ftdi",
        " ftdichip",
        " pyd3xx",
        " d3xx",
        " ftd3xx",
        " ft600",
        " ft601"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "069e22099ab8a4cb21ee6595e2d6fab16eb942b5ccf7a68978fbf2ee5d4e22be",
                "md5": "38f5a7134f7d1160d57f0ae18042e48b",
                "sha256": "75d0cb8944a04a2ed5e712f4914343c717820f7e8e1d49a807267d593f08d345"
            },
            "downloads": -1,
            "filename": "pyd3xx-1.0.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "38f5a7134f7d1160d57f0ae18042e48b",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 1904799,
            "upload_time": "2024-07-16T21:26:09",
            "upload_time_iso_8601": "2024-07-16T21:26:09.711260Z",
            "url": "https://files.pythonhosted.org/packages/06/9e/22099ab8a4cb21ee6595e2d6fab16eb942b5ccf7a68978fbf2ee5d4e22be/pyd3xx-1.0.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "6a4ff8ff0a35dc68422e64414a5dc98a74410507c8c28f9e4b75c1628f1f6dfb",
                "md5": "117a3e58dfd119244dc17bee7c070f6a",
                "sha256": "b7b0fa4f950a0cbdce833efc5ba8af8c24874f42ba2037b26d79574c262e9992"
            },
            "downloads": -1,
            "filename": "pyd3xx-1.0.1.tar.gz",
            "has_sig": false,
            "md5_digest": "117a3e58dfd119244dc17bee7c070f6a",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 1890738,
            "upload_time": "2024-07-16T21:26:12",
            "upload_time_iso_8601": "2024-07-16T21:26:12.009326Z",
            "url": "https://files.pythonhosted.org/packages/6a/4f/f8ff0a35dc68422e64414a5dc98a74410507c8c28f9e4b75c1628f1f6dfb/pyd3xx-1.0.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-07-16 21:26:12",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "pyd3xx"
}
        
Elapsed time: 1.37337s