Swiftpack.co - michto01/spm-ftdi-d2xx as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by michto01.
michto01/spm-ftdi-d2xx 2.0.2
SwiftPM wrapper around the FTDI D2xx library.
⭐️ 0
🕓 2 years ago
macOS
.package(url: "https://github.com/michto01/spm-ftdi-d2xx.git", from: "2.0.2")

FTDI D2xx wrapper

As the wrapper had linker issues for now, it is converted into Framework with the plans to return back to pure Swift PM after some investigation.

Swift PM wrapper around the FTDI D2xx driver.

Example usage:

import FTDI

let candidates = try! FTDI.availableCandidates()
guard let serial = candidates.first?.serialNumber else {
   fatalError()
}
guard let handle = try? FTDI.open(using: .serialNumber, value: serial) else {
   fatalError()
}

do {
   try configure(handle, using: Configuration())
   let info = try describe(handle)
   print(info)
   
   try write(handle, string: "Hello, world!")
   let data = try read(handle, length: 30)
   
   try close(handle)
} catch {
    print(error)
    fatalError()
}

Libraries

FTDI D2xx

EULA

Full FTDI D2xx license lives here.

semver

ISC

The ISC License

Copyright (c) Isaac Z. Schlueter and Contributors

Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

License

The MIT License (MIT)

Copyright (c) 2020 Tomáš Michalek See the file "LICENSE" for the full license governing this code.

GitHub

link
Stars: 0
Last commit: 1 year ago
Advertisement: IndiePitcher.com - Cold Email Software for Startups

Release Notes

Fixing the library
2 years ago

Thanks to Adam, the library works once again!

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics