200sc / go-usb

A (unfinished) port of libusb to Go

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

go-usb

An in-progress port of libusb to Go

Current state

OS-Agnostic code is converted and needs to be passed over for compile errors:

Syntax:

  • backend.go
  • core.go
  • descriptor.go
  • hotplug.go
  • io.go
  • io_unix.go
  • io_windows.go
  • libusb.go
  • libusbi.go
  • list.go
  • strerror.go
  • sync.go

Semantic:

  • backend.go
  • core.go
  • descriptor.go
  • hotplug.go
  • io.go
  • io_unix.go
  • io_windows.go
  • libusb.go
  • libusbi.go
  • list.go
  • strerror.go
  • sync.go

OS-Specific code is in the process of conversion

All of the small OS-specific files have been converted, the smallest remaining file at over 600 LOC.

Before I start converting the larger files I want to look into whether the poll semantics that libusb uses are even a thing we need to care about, or if they can be replicated with channels. All references to poll in the libusb docs suggest that they are "fake" and just used for signalling, which sounds a heck of a lot like a chan struct{}.

About

A (unfinished) port of libusb to Go

License:GNU Lesser General Public License v2.1


Languages

Language:C 53.2%Language:Go 46.8%