1
0
mirror of git://projects.qi-hardware.com/ben-wpan.git synced 2024-09-18 01:45:52 +03:00
Commit Graph

3 Commits

Author SHA1 Message Date
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