示例#1
0
文件: usb.go 项目: hanwen/usb
func (d *Device) Ref() *Device {
	return (*Device)(C.libusb_ref_device((*C.libusb_device)(d.me())))
}
示例#2
0
文件: usb.go 项目: thequux/gousb
func (ctx *Context) wrapDevice(dev *C.struct_libusb_device) *Device {
	C.libusb_ref_device(dev)
	return &Device{ctx, dev}
}