Skip to content

dwaite/Swift-HID-Example

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Swift HID Example (Formerly 'KuandoSwift')

How to use pure Swift to talk to a USB HID device Since it was a pain in the ass to get Swift to work with HID without resorting to inline objective-c or bindings, I thought it would be good to publish the solution I found. I hope its of use to others.

Originally this used an output report type to talk to a Kuando busylight, but I replace that device with a ThingM blink(1), which uses a feature report type.

Topics:

  • IOHIDDeviceCallback
  • IOHIDDevice
  • UnsafeMutablePointer
  • unsafeBitCast

About

Using Swift to talk to a USB HID device

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Swift 100.0%