Example #1
0
File: usb.go Project: hanwen/usb
func (d *Device) Ref() *Device {
	return (*Device)(C.libusb_ref_device((*C.libusb_device)(d.me())))
}
Example #2
0
File: usb.go Project: thequux/gousb
func (ctx *Context) wrapDevice(dev *C.struct_libusb_device) *Device {
	C.libusb_ref_device(dev)
	return &Device{ctx, dev}
}