func (self *SignUSB) Write(p []byte) (n int, err error) { fmt.Println(asign.PacketString(p)) dev := usb.Device(*self) dev.BulkWrite(WRITE_ENDPOINT, p) n = len(p) return }
func (self *SignUSB) Close() { dev := usb.Device(*self) v, p := dev.Vendor(), dev.Product() dev.Close() log.Println("Closed Device: ", v, p) }