aoa

package
v1.0.22 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 2, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package aoa implements the ReadWriteCloser interface for a USB AoA endpoint. See https://source.android.com/devices/accessories/protocol

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Reset

func Reset(serial string) error

Reset resets a USB endpoint to its default configuration.

Types

type ReadWriteCloser

type ReadWriteCloser struct {
	// contains filtered or unexported fields
}

ReadWriteCloser implements io.ReadWriteCloser backed by an AoA USB connection.

func Connect

func Connect(serial string) (*ReadWriteCloser, error)

Connect configures the USB device identified by serial to use the AoA protocol and returns a ReadWriteCloser that allows communicating with the endpoint.

func (*ReadWriteCloser) Close

func (u *ReadWriteCloser) Close() error

Close closes the USB interface.

func (*ReadWriteCloser) Read

func (u *ReadWriteCloser) Read(in []byte) (int, error)

Read reads from the USB device.

func (*ReadWriteCloser) Write

func (u *ReadWriteCloser) Write(out []byte) (int, error)

Write write to the USB device.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL