zplusb

package module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2025 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrorDeviceNotFound        = errors.New("Can not detect any USB printer")
	ErrorEndpointNotAccessable = errors.New("Can not access endpoint")
)

Functions

This section is empty.

Types

type UsbConfig

type UsbConfig struct {
	Vendor   gousb.ID
	Product  gousb.ID
	Config   int
	Iface    int
	Setup    int
	Endpoint int
}

type UsbZplPrinter

type UsbZplPrinter struct {
	*gousb.Device
	Config UsbConfig
}

func GetPrinters

func GetPrinters(ctx *gousb.Context, config UsbConfig) ([]*UsbZplPrinter, error)

func (*UsbZplPrinter) Write

func (printer *UsbZplPrinter) Write(buf []byte) (int, error)

Jump to

Keyboard shortcuts

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