A lean stack written primarily in Swift for using the FTDI FT232H USB-to-serial adapter in I2C, SPI, and GPIO applications, built on the portable C-library libusb.
This library provides
Synchronous serial communication is data that is timed according to a separate clock signal. While the FTDI also supports asynchronous [UART] communications (such as RS-232), the operating system likely provides support for this mode through one of the /dev/cuserial special devices.
Mac requirements
SPM Dependencies
Linux dependencies
Loggers are instantiated using the deft-log library
using the label prefix com.didactek.ftdi-synchronous-serial
.
On Linux, users will not have access to a hot-plugged FTDI device by default. The cleanest way to systematically grant permissions to the device is to set up a udev rule that adjusts permissions whenever the device is connected.
The paths and group in the template below assume:
Under /etc/udev/rules.d/, create a file (suggested name: "70-gpio-ftdi-ft232h.rules") with the contents:
# FTDI FT232H USB -> GPIO + serial adapter
# 2020-09-07 support working with the FT232H using Swift ftdi-synchronous-serial library
ACTION=="add", SUBSYSTEM=="usb", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6014", MODE="660", GROUP="plugdev"
eLinux.org has a useful wiki entry on accessing devices without sudo.
link |
Stars: 4 |
Last commit: 2 years ago |
Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics