Swiftpack.co - Automotive-Swift/Swift-CAN-Anywhere as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by Automotive-Swift.
Automotive-Swift/Swift-CAN-Anywhere 0.9.2
A platform independent CAN library
⭐️ 1
🕓 17 weeks ago
macOS linux
.package(url: "https://github.com/Automotive-Swift/Swift-CAN-Anywhere.git", from: "0.9.2")

Swift-CAN-Anywhere

A platform independent CAN library

This package is a shim that returns a Swift-TouCAN interface on macOS and a Swift-SocketCAN interface on Linux, both conforming to the Swift-CAN interface protocol.

Integration

This is a Swift Package Manager (SPM) compliant package. Add

.package(url: "https://github.com/AutomotiveSwift/Swift-SocketCAN.git", from: "0.9.0")

to your Package.swift.

How to use

Create the interface by using the static factory method:

import Swift_CAN_Anywhere

let can = CAN.attachToInterface("can0")

Contributions

Feel free to use this under the obligations of the MIT license. Contributions are always welcome. Stay safe and sound!

GitHub

link
Stars: 1
Last commit: 2 weeks ago
jonrohan Something's broken? Yell at me @ptrpavlik. Praise and feedback (and money) is also welcome.

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