pyft232
This module provides a simple Serial-Like interface to FT232 chips while still allowing access to the CBUS pins for controlling simple signals.
Ctypes is used to interface with either FTDI's d2xx library (when available) or libftdi. In this way this package works on both Windows and Linux (and other libftdi supported OS's) without needing to mess with the FTDI drivers on windows.
In contrast, pyftdi is more feature rich and also cross platform but requires special drivers on windows so you can't also use the FTDI chip as a pure COM port.
Usage
import ft232
serial_number = "FT1234"
try:
sp = ft232.Ft232(serial_number, baudrate=115200)
except ft232.Ft232Exception:
print("Unable to open the ftdi device: %s" % serial_number)
sys.exit(1)
#You may use sp as you would a Serial object
sp.write(b"Hello World!\n")
resp = sp.read(100)
#If you want to use the CBUS pins, you enable them with cbus_setup
# 'mask' is a bitmask which specifies which pins to enable
# 'init' is a bitmask for the initial value for each pin
sp.cbus_setup(mask=3, init=3)
#Change the current value of all setup pins
sp.cbus_write(2)
#Print the current value of all setup pins
print("CBUS: %s" % sp.cbus_read())
Metadata
Release files for pyft232 0.12
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pyft232-0.12.tar.gz | 16.7 kB | Without provenance | Details for pyft232-0.12.tar.gz |
Release files / pyft232-0.12.tar.gz
| Download URL | pyft232-0.12.tar.gz |
|---|---|
| Size | 16.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
819b8d0d6f33e97bb5d6c850cc63645b7638c1917523a22ff900b0cb8ce4d5d7
|
|
BLAKE2b-256 checksum How to use checksums |
68a75445cd6acdc82d31062d313fceea1ee62078101f8a1fbf355ceb54a00237
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.7.3
|
Security for pyft232 0.12
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.