Versions in this module Expand all Collapse all v1 v1.0.22 Dec 4, 2019 v1.0.21 Mar 22, 2018 Changes in this version + const BulkTransfer + const Class + const ControlTransfer + const DeviceRecipient + const DeviceToHost + const EndpointRecipient + const HostToDevice + const InterfaceRecipient + const InterruptTransfer + const IsoSyncTypeAdaptive + const IsoSyncTypeAsync + const IsoSyncTypeNone + const IsoSynceTypeSync + const IsochronousTransfer + const OtherRecipient + const Reserved + const Standard + const Vendor + func BitmapRequestType(reqDirection transferDirection, reqType requestType, ...) bmRequestType + func CPUtoLE16(value int) int + func ErrorName(err ErrorCode) string + func HasCapability(capability int) bool + func StrError(err ErrorCode) string + type Config struct + Device *Device + type ConfigDescriptor struct + Attributes uint8 + ConfigurationIndex uint8 + ConfigurationValue uint8 + DescriptorType descriptorType + Length int + MaxPowerMilliAmperes uint + NumInterfaces int + TotalLength uint16 + type Context struct + LogLevel LogLevel + func NewContext() (*Context, error) + func (ctx *Context) Close() error + func (ctx *Context) GetDeviceList() ([]*Device, error) + func (ctx *Context) OpenDeviceWithVendorProduct(vendorID uint16, productID uint16) (*Device, *DeviceHandle, error) + func (ctx *Context) SetDebug(level LogLevel) + type Device struct + ActiveConfiguration *ConfigDescriptor + func (dev *Device) GetActiveConfigDescriptor() (*ConfigDescriptor, error) + func (dev *Device) GetBusNumber() (int, error) + func (dev *Device) GetConfigDescriptor(configIndex int) (*ConfigDescriptor, error) + func (dev *Device) GetConfigDescriptorByValue(configValue int) (*ConfigDescriptor, error) + func (dev *Device) GetDeviceAddress() (int, error) + func (dev *Device) GetDeviceDescriptor() (*DeviceDescriptor, error) + func (dev *Device) GetDeviceSpeed() (speed, error) + func (dev *Device) GetMaxPacketSize(ep endpointAddress) (int, error) + func (dev *Device) GetPortNumber() (int, error) + func (dev *Device) Open() (*DeviceHandle, error) + type DeviceDescriptor struct + DescriptorType descriptorType + DeviceClass classCode + DeviceProtocol byte + DeviceReleaseNumber bcd + DeviceSubClass byte + Length uint8 + ManufacturerIndex uint8 + MaxPacketSize0 uint8 + NumConfigurations uint8 + ProductID uint16 + ProductIndex uint8 + SerialNumberIndex uint8 + USBSpecification bcd + VendorID uint16 + type DeviceHandle struct + func (dh *DeviceHandle) AttachKernelDriver(interfaceNum int) error + func (dh *DeviceHandle) BulkTransfer(endpoint endpointAddress, data []byte, length int, timeout int) (int, error) + func (dh *DeviceHandle) BulkTransferIn(endpoint endpointAddress, maxReceiveBytes int, timeout int) ([]byte, int, error) + func (dh *DeviceHandle) BulkTransferOut(endpoint endpointAddress, data []byte, timeout int) (int, error) + func (dh *DeviceHandle) ClaimInterface(interfaceNum int) error + func (dh *DeviceHandle) Close() error + func (dh *DeviceHandle) ControlTransfer(requestType bmRequestType, request byte, value uint16, index uint16, ...) (int, error) + func (dh *DeviceHandle) DetachKernelDriver(interfaceNum int) error + func (dh *DeviceHandle) GetConfiguration() (int, error) + func (dh *DeviceHandle) GetStringDescriptor(descIndex uint8, langID uint16) (string, error) + func (dh *DeviceHandle) GetStringDescriptorASCII(descIndex uint8) (string, error) + func (dh *DeviceHandle) InterruptTransfer(endpoint endpointAddress, data []byte, length int, timeout int) (int, error) + func (dh *DeviceHandle) KernelDriverActive(interfaceNum int) (bool, error) + func (dh *DeviceHandle) ReleaseInterface(interfaceNum int) error + func (dh *DeviceHandle) ResetDevice() error + func (dh *DeviceHandle) SetAutoDetachKernelDriver(enable bool) error + func (dh *DeviceHandle) SetConfiguration(configuration int) error + func (dh *DeviceHandle) SetInterfaceAltSetting(interfaceNum int, alternateSetting int) error + type Endpoint struct + type EndpointDescriptor struct + Attributes endpointAttributes + DescriptorType descriptorType + EndpointAddress endpointAddress + Interval uint8 + Length int + MaxPacketSize uint16 + Refresh uint8 + SynchAddress uint8 + func (end *EndpointDescriptor) Direction() endpointDirection + func (end *EndpointDescriptor) Number() byte + func (end *EndpointDescriptor) TransferType() transferType + type EndpointDescriptors []*EndpointDescriptor + type ErrorCode int + func SetLocale(locale string) ErrorCode + func (err ErrorCode) Error() string + type GenericDescriptor struct + type InterfaceDescriptor struct + AlternateSetting int + DescriptorType descriptorType + InterfaceClass uint8 + InterfaceIndex int + InterfaceNumber int + InterfaceProtocol uint8 + InterfaceSubClass uint8 + Length int + NumEndpoints int + type InterfaceDescriptors []*InterfaceDescriptor + type LogLevel int + const LogLevelDebug + const LogLevelError + const LogLevelInfo + const LogLevelNone + const LogLevelWarning + func (level LogLevel) String() string + type SupportedInterface struct + NumAltSettings int + type SupportedInterfaces []*SupportedInterface + type Version struct + Describe string + Major uint16 + Micro uint16 + Minor uint16 + Nano uint16 + ReleaseCandidate string + func GetVersion() Version Other modules containing this package github.com/gotmc/libusb/v2