Commit Graph

  • e840be9d06 Do not assume interface numbers follow the slice indices. (#134) master Sebastian Zagrodzki 2024-09-13 20:43:01 +02:00
  • 606016adee Android support via fileDescriptor (#130) Kuba Raczkowski 2024-09-08 21:40:30 +02:00
  • 8c7a7eb841 Upgrade build/test environment Sebastian Zagrodzki 2024-09-08 18:32:06 +02:00
  • 2f9ed92cb8 suppress 'interrupted [code -10]' log message. resolve #87 (#121) v1.1.3 Jamil Djadala 2024-02-24 23:08:57 +02:00
  • 5514912016 Go 1.22 (#122) Sebastian Zagrodzki 2024-02-24 21:48:06 +01:00
  • 844d4b8a71 Add a retract version for v2.1.0+incompatible. (#109) v1.1.2 Sebastian Zagrodzki 2022-03-29 23:13:07 +02:00
  • 6ad122da6a Add Path to DeviceDesc (#101) Will McEnaney 2021-11-10 15:04:13 +00:00
  • 1f6abc1f14 Run gofmt on all files, complain about the diff. (#106) Sebastian Zagrodzki 2021-11-03 22:39:59 +01:00
  • bdb184b25c Make golint fail on errors. (#105) Sebastian Zagrodzki 2021-11-02 12:52:11 +01:00
  • d3bdbe53c8 Migrate from Travis/Appveyor combo to GitHub actions (#104) Sebastian Zagrodzki 2021-11-02 09:18:09 +01:00
  • 0ce3a07f8e Dereference device with a defer call to prevent memory leaks (#98) danielpaulus 2021-11-01 21:40:49 +01:00
  • 0eba1b1264 Checks for closed/uninitialized context and devices. (#93) Sebastian Zagrodzki 2021-01-15 17:25:29 +01:00
  • c9efe54672 Switch to Bionic image for Travis. Use Go 1.10 and upwards. Sebastian Zagrodzki 2021-01-07 19:57:37 +01:00
  • dd9486a141 Update AppVeyor image version (#90) Sebastian Zagrodzki 2021-01-07 19:42:57 +01:00
  • cb06b9fb0d Add a go.mod for v1.1.0. This will make the Go proxy (#86) v1.1.1 Sebastian Zagrodzki 2020-11-09 10:57:35 +01:00
  • 76f12f69ac Refresh pacman in the appveyor build (#84) Sebastian Zagrodzki 2020-11-09 10:07:43 +01:00
  • 0995919da4 Since go 1.15 new() on CGo structs is no longer supported: (#85) Sebastian Zagrodzki 2020-11-09 09:50:43 +01:00
  • e4c3f66a15 Document the recommendations/restrictions around the buffer size (#81) v2.1.0 v1.1.0 Sebastian Zagrodzki 2020-04-29 21:51:05 +02:00
  • 9ad54830f4 Support malformed interface descriptors (#79) Sebastian Zagrodzki 2020-04-28 11:32:10 +02:00
  • 18f4c1d8a7 Don't skip empty transfers. In isochronous transfers, make sure (#72) Sebastian Zagrodzki 2019-08-12 21:38:32 +02:00
  • 2dc560e6be readme: fix markdown link (#67) Steve Manuel 2019-05-25 03:27:38 -06:00
  • 64d8208677 Fix typo (#64) Mauricio Galindo 2019-04-10 12:18:22 -07:00
  • d0c05ab7f7 Fix linux-usb.org URL's (#62) Joël Stemmer 2019-01-25 15:00:36 +00:00
  • 04360a5457 Update usb.go (#60) Biling Uliar 2018-12-22 22:43:27 +01:00
  • a50ac957b1 Updated dead link (#59) Jo Haugum 2018-11-06 09:00:28 -08:00
  • 0f73bf7aea Replace libusb class ID definitions with a manually curated list based directly off usb.org list. (#58) Sebastian Zagrodzki 2018-11-05 17:35:27 +01:00
  • da849d96b5 Add context-aware read/write (#57) Sebastian Zagrodzki 2018-11-05 15:33:31 +01:00
  • 593cfb67e9 fix mispell (#54) Cyrille Hemidy 2018-10-24 23:55:16 +02:00
  • 15d2fa288b Add more device classes, based on libusb.h enumeration. (#51) Sebastian Zagrodzki 2018-10-05 13:53:10 +02:00
  • 92967a7d10 Use gousb_set_debug instead of libusb_set_debug in one more place. (#44) Sebastian Zagrodzki 2018-06-16 20:22:24 +02:00
  • c6e780971f Support libusb_set_option in additon to libusb_set_debug. (#39) Sebastian Zagrodzki 2018-05-23 16:07:03 +02:00
  • 21b0ed46ae Set alternate setting for the interface only if required. (#38) Sebastian Zagrodzki 2018-05-23 10:08:10 +02:00
  • 815369492f Add AppVeyor badge. (#41) Sebastian Zagrodzki 2018-05-23 10:06:27 +02:00
  • 5115a55a03 Redefine constants around control request types. (#34) Sebastian Zagrodzki 2018-04-05 13:23:20 +02:00
  • d0366361a2 Add missing arguments to Interface() error on failed descriptor retrieval. Sebastian Zagrodzki 2017-11-12 03:32:09 +01:00
  • b893afb018 Add missing endpoint argument to Fatalf. Sebastian Zagrodzki 2017-11-12 03:28:47 +01:00
  • e9aec43516 travis: update go versions (#24) Davor Kapsa 2017-11-12 03:22:54 +01:00
  • 85520e6880 Add missing argument to Fatalf. Sebastian Zagrodzki 2017-11-12 03:21:28 +01:00
  • 5c10dc8f4e Write stream implementation (#19) zagrodzki 2017-09-08 13:41:25 +02:00
  • 01840c1d23 Add the number of the USB port in the DeviceDesc structure (#18) CriJonsi 2017-09-07 17:27:58 +02:00
  • c113a5e0de Parallelize tests (#17) zagrodzki 2017-09-04 16:55:47 +02:00
  • f9aba6fab5 Config and interface description (#16) zagrodzki 2017-09-04 14:17:34 +02:00
  • cf19eb7001 Fix a race condition in reuse of the same malloc result (#15) zagrodzki 2017-09-04 12:52:42 +02:00
  • 757722bf8e Add Device.Manufacturer(), .Product() and .SerialNumber() (#14) Deomid Ryabkov 2017-09-04 01:42:55 +03:00
  • 1aaa100bdb Allocate libusb buffers in C (#11) zagrodzki 2017-08-29 12:11:04 +02:00
  • bc91dd3f2c Extend the autodetach behavior Nico MT 2017-07-21 21:15:49 +02:00
  • 9829f2fcba Fixed libusb: warning [libusb_exit] some libusb_devices were leaked (#7) Veniamin Albaev 2017-07-20 15:09:58 +03:00
  • 9fc0278283 Don't reset the configuration if desired config is already active (#6) Filzmaier Josef 2017-06-29 14:31:12 +02:00
  • aa64bae804 Appveyor support (#2) Tamási Benjamin 2017-06-20 16:03:55 +02:00
  • 00e8f24bda Merge pull request #1 from google/same-endpoint-in-out zagrodzki 2017-06-14 11:15:38 +02:00
  • 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. Sebastian Zagrodzki 2017-06-13 23:04:34 +02:00
  • 883910dd57 Call the API stable. Sebastian Zagrodzki 2017-06-13 10:58:50 +02:00
  • f87a74e39f Update uses of List/OpenDevices Sebastian Zagrodzki 2017-06-13 10:56:35 +02:00
  • 67ddfbabc2 Rename ListDevices to OpenDevices. Add more doc for RemoteWakeup. Sebastian Zagrodzki 2017-06-13 10:55:30 +02:00
  • e1fd376a2e more comment updates, rename "intf" parameter of Interface to "num" Sebastian Zagrodzki 2017-06-13 10:48:28 +02:00
  • e40669b614 Move examples to external, so that gousb is explicitly referenced. Sebastian Zagrodzki 2017-06-13 10:42:18 +02:00
  • b709988501 Fix typos, more precise example for configurations. Sebastian Zagrodzki 2017-06-13 10:40:01 +02:00
  • 688cb291dd Remove unused references to iso_packet_desc field in libusb_transfer. Sebastian Zagrodzki 2017-05-07 17:54:55 +02:00
  • a367f386ff populate MaxControlPacketSize Sebastian Zagrodzki 2017-05-07 13:42:09 +02:00
  • ead4e1f406 That didn't pan out - libusb does not have functions that would allow returning raw config descriptor without opening the device. Sebastian Zagrodzki 2017-05-07 13:38:40 +02:00
  • 5f9276965f Start decoding descriptor in Go, rather than relying on libusb helper functions. Descriptor format is defined explicitly by the USB spec. Sebastian Zagrodzki 2017-05-06 23:42:52 +02:00
  • b0df83bff6 Add PollInterval specifications. Sebastian Zagrodzki 2017-05-06 13:16:48 +02:00
  • bcc0b02135 move sections around Sebastian Zagrodzki 2017-05-06 02:58:50 +02:00
  • 865b14439b WriteStream not used yet. Sebastian Zagrodzki 2017-05-06 02:56:37 +02:00
  • e117225966 lint fixes Sebastian Zagrodzki 2017-05-06 02:54:22 +02:00
  • d68d0c1a41 Rename more "Info" fields to "Desc" Sebastian Zagrodzki 2017-05-06 02:52:19 +02:00
  • 9f04f7bdf0 Replace anonymous DeviceDesc field import with a named "Desc" field. Sebastian Zagrodzki 2017-05-06 02:47:24 +02:00
  • 4991f9c89b use ConfigDesc, InterfaceDesc and EndpointDesc. Sebastian Zagrodzki 2017-05-06 02:43:16 +02:00
  • e5961a7cc4 rename ConfigInfo to ConfigDesc Sebastian Zagrodzki 2017-05-06 02:40:09 +02:00
  • fedc9864dd rename Descriptor to DeviceDesc Sebastian Zagrodzki 2017-05-06 02:36:45 +02:00
  • 86c8e27edf moar comments. Add a done callback to DefaultInterface return values. Sebastian Zagrodzki 2017-05-06 02:30:16 +02:00
  • c6b9a04e9f Document Interface parameters. Sebastian Zagrodzki 2017-05-06 02:19:57 +02:00
  • 89dc91ef06 Moar documentation and examples. Sebastian Zagrodzki 2017-05-06 02:16:53 +02:00
  • eb5500f387 Move Control from Config to Device. Rename Default to DefaultInterface. Sebastian Zagrodzki 2017-05-06 02:16:22 +02:00
  • 1c9a11b1ce Remove "libusb" from the comments. Sebastian Zagrodzki 2017-05-06 00:31:04 +02:00
  • 9623c1ba8d replace ActiveConfig with ActiveConfigNum. Add a Default() helper that simplifies setup for uncomplicated USB devices. Sebastian Zagrodzki 2017-05-06 00:20:43 +02:00
  • 5200a36191 Move files from gousb/usb to gousb Sebastian Zagrodzki 2017-05-06 00:11:11 +02:00
  • acb9ee3242 Add notes about this being ver 2.0 of kylelemons/gousb Sebastian Zagrodzki 2017-05-05 23:44:51 +02:00
  • e33e0fef82 s/kylelemons/google/ in the new repo. Sebastian Zagrodzki 2017-05-05 23:41:11 +02:00
  • 730c32b9fd Add tests for endpoint NewStream. Rename OpenWithVidPid to OpenWithVIDPID. Sebastian Zagrodzki 2017-04-29 12:57:55 +02:00
  • 58c1e6ddb4 add tests for active config and reset Sebastian Zagrodzki 2017-04-29 12:23:45 +02:00
  • 2794d88744 config is %d, not %s Sebastian Zagrodzki 2017-04-29 12:21:17 +02:00
  • 6d81ca37d3 Use a map to store endpoint descriptors. Allows easy access to a particular endpoint number. Sebastian Zagrodzki 2017-04-29 12:19:34 +02:00
  • 77c176cd4c Replace descriptor Configs with a map - config ids are arbitrary numbers (unlike interface or alt setting numbers, which are 0-based array indices). This makes it easier to access a particular config without having to iterate over the descriptors. Sebastian Zagrodzki 2017-04-29 11:56:49 +02:00
  • 60d0aba507 Use int for Bus/Addr, not uint8. Sebastian Zagrodzki 2017-04-29 02:12:04 +02:00
  • 541275d5b9 update error message to be more verbose Sebastian Zagrodzki 2017-04-29 01:37:39 +02:00
  • b39b8d9521 Add "empty" to confirm no transfers are in flight in fakeusb. Update endpoint_test - if buffer length is 0, no transfer is submitted. Sebastian Zagrodzki 2017-04-29 01:35:09 +02:00
  • c2d1a4c03d Format bus/addr with a dot. Sebastian Zagrodzki 2017-04-29 01:00:19 +02:00
  • ef59587a24 move descriptor to the device, like config and interface. Clear separation between descriptor stringers and value stringers for the device and interface. Sebastian Zagrodzki 2017-04-29 00:59:13 +02:00
  • 59b493ec3c Separate descriptor Stringer from value Stringer. Sebastian Zagrodzki 2017-04-29 00:53:42 +02:00
  • a69a315dbd Verify that interface and alternate numbers are 0-based indices, we rely on this assumption in the config. Sebastian Zagrodzki 2017-04-29 00:50:38 +02:00
  • 80f3c60b2b Better error messages. Update rawread to use the new endpoint interface. Sebastian Zagrodzki 2017-04-29 00:41:26 +02:00
  • 1fd4e7f4c4 Check if the device is already closed and if the interface is already claimed. Sebastian Zagrodzki 2017-04-29 00:27:51 +02:00
  • 0cfaee3514 Fail operations if Close was called before. Sebastian Zagrodzki 2017-04-29 00:18:26 +02:00
  • b6268be76b Merge branch 'gousb2.0-dev' of https://github.com/kylelemons/gousb into gousb2.0-dev Sebastian Zagrodzki 2017-04-29 00:04:01 +02:00
  • 5f122b4dcd Introduce two more layers between device and endpoint: device -> active config -> claimed interface -> endpoints. Device can have at most one active config. A config can have multiple claimed interfaces, each with a specific alt setting. An interface with an alt setting defines a list of endpoints. Sebastian Zagrodzki 2017-04-29 00:01:11 +02:00
  • d193e605a4 fix extra Logf arguments Sebastian Zagrodzki 2017-04-28 23:58:56 +02:00
  • 5c63741f14 more readable debug log prefix Sebastian Zagrodzki 2017-04-28 23:58:16 +02:00
  • 26b662893d Use a new behavior of newFakeLibusb. Add a benchmark for subslicing. Sebastian Zagrodzki 2017-04-27 03:26:08 +02:00
  • d85a738414 a new fakelibusb will overwrite libusb and restore it automatically on done() Sebastian Zagrodzki 2017-04-27 03:25:36 +02:00