1
0
mirror of git://projects.qi-hardware.com/ben-wpan.git synced 2024-11-23 00:55:55 +02:00
Commit Graph

5 Commits

Author SHA1 Message Date
Werner Almesberger
55d220b400 tools/lib/usbopen.c: make vendor and/or product optional
- usbopen.c (open_usb): determine vendor and product objective outside
  the loop
- usbopen.c (open_usb): check vendor and product only if non-zero
- usbopen.c (bad_id, parse_usb_id): vendor and product can now be
  omitted
2011-05-11 03:40:03 -03:00
Werner Almesberger
3deac4165e libatrf: new function usb_rescan to force next open_usb to scan tree again
- tools/include/usbopen.h (usb_rescan), tools/lib/usbopen.c (initialized,
  initialize, usb_rescan): usb_rescan forces a re-initialization of
  libusb and a new scan of the USB device tree
2011-05-11 03:22:53 -03:00
Werner Almesberger
4190aded8c tools/lib/: added mechanism to remove USB restrictions (enabling multiple sessions)
- usbopen.h (usb_unrestrict), usbusb.c (usb_unrestrict): drop ID and
  path restrictions
- atusb.c (atusb_open): call usb_unrestrict to remove restrictions
2011-04-10 10:55:49 -03:00
Werner Almesberger
fc1ad9fffd tools/lib: atusb can now be selected by bus/device or by bus-port path
Examples:

  usb:1/6	select logical device 6 on bus 1
  usb:1-3.1.4	starting at bus 1, choose ports 3, 1, and 4

- usbopen.c (initialize, open_usb): moved libusb initialization to
  separate function, to allow for sharing
- usbopen.h (restrict_usb_path), usbopen.c (restricted_path, open_usb,
  restrict_usb_dev, restrict_usb_by_dev, read_num, restrict_usb_by_port,
  restrict_usb_path): added mechanism to restrict USB path
- atusb.c (atusb_open): if an argument is given, call restrict_usb_path
  with it
2011-04-10 09:51:30 -03:00
Werner Almesberger
a75edf0cc0 tools/lib/: copied USB device opening code over from f32xbase
We shared it across projects so far, but since the code will be further
customized, it's better to keep it local (at least for a while).

- usbopen.h, usbopen.c: moved over f32xbase/include/usb.h and
  f32xbase/lib/usb.c (for further customization)
- Makefile (CFLAGS, OBJS_host): use usbopen.o instead of usb.o from
  f32xbase
- atusb.c: use usbopen.h instead of usb.h from f32xbase (also removes
  include path ambiguity)
2011-04-10 07:43:42 -03:00