Commit Graph

12 Commits

Author SHA1 Message Date
Deomid Ryabkov
757722bf8e Add Device.Manufacturer(), .Product() and .SerialNumber() (#14) 2017-09-04 00:42:55 +02:00
zagrodzki
1aaa100bdb Allocate libusb buffers in C (#11)
* add alloc/free_transfer_and_buffer. Manages the buffer memory on the C
side.

* switch libusb.go to use the new alloc/free_transfer_and_buffer. Add
a new buffer() call to get access to the allocated buffer as a Go slice.

* Fake USB transfer uses the new alloc/free/buffer interface.

* Switch to the new libusb.alloc signature, where libusb owns the buffer.

* newUSBTransfer now allocates a separate buffer, do a copy on
endpoint.transfer.

* newUSBTransfer will now allocate it's own buffer.

* Enable autodetach in rawread.
2017-08-29 12:11:04 +02:00
Nico MT
bc91dd3f2c Extend the autodetach behavior
Detach interfaces before trying to change the config, as libusb doesn't handle that automatically.
2017-07-21 21:15:49 +02:00
Sebastian Zagrodzki
2b78100ce3 Allow the same endpoint number to be reused for IN and OUT endpoints
separately, effectively allowing two endpoints with the same number
- numbers are no unique, only endpoint addresses are.
2017-06-13 23:04:34 +02:00
Sebastian Zagrodzki
688cb291dd Remove unused references to iso_packet_desc field in libusb_transfer. 2017-05-07 17:54:55 +02:00
Sebastian Zagrodzki
a367f386ff populate MaxControlPacketSize 2017-05-07 13:42:09 +02:00
Sebastian Zagrodzki
b0df83bff6 Add PollInterval specifications. 2017-05-06 13:16:48 +02:00
Sebastian Zagrodzki
d68d0c1a41 Rename more "Info" fields to "Desc" 2017-05-06 02:52:19 +02:00
Sebastian Zagrodzki
4991f9c89b use ConfigDesc, InterfaceDesc and EndpointDesc. 2017-05-06 02:43:16 +02:00
Sebastian Zagrodzki
e5961a7cc4 rename ConfigInfo to ConfigDesc 2017-05-06 02:40:09 +02:00
Sebastian Zagrodzki
fedc9864dd rename Descriptor to DeviceDesc 2017-05-06 02:36:45 +02:00
Sebastian Zagrodzki
5200a36191 Move files from gousb/usb to gousb 2017-05-06 00:11:11 +02:00