Skip to content

pzl/usb

Repository files navigation

usb

Pure Go USB stack

GoDoc Go Report Card MIT license Tag

Logo

usb is a pure Go implementation of the USB stack (no CGo). It is a libusb alternative for situations you need a go-native library.

usb currently only supports linux, but with enough interest or requests, we can add more platforms.

Getting Started

package main

import  "github.com/pzl/usb"

func main() {
    dev, err := usb.VidPid(0x0c45, 0x6300) // get device by IDs
    if err != nil {
        // handle...
    }
}

Usage

The top-level of this project can be used as a high-level library. See the docs at godoc.

The gusb sub-directory can be used as a more low-level library, if that suits your needs. Documentation also at godoc.

Status

Conversion from libusb is underway. Almost all enumeration and device descriptor function is implemented. IO (both sync and async) is in progress.

See API for a direct mapping of libusb calls to usb methods.

Release History

  • 0.0.1
    • Work in Progress

License

MIT

Copyright 2019 Dan Panzarella

See LICENSE file for full License details

About

USB library for Go (linux, no cgo)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages