IEEE 802.15.4 subsystem
Sign in or create your account | Project List | Help
IEEE 802.15.4 subsystem Commit Details
Date: | 2011-04-10 15:55:49 (12 years 11 months ago) |
---|---|
Author: | Werner Almesberger |
Commit: | 4190aded8ce59215ba791dacbfd77a5b7e9c82e3 |
Message: | 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 |
Files: |
tools/lib/atusb.c (1 diff) tools/lib/usbopen.c (1 diff) tools/lib/usbopen.h (1 diff) |
Change Details
tools/lib/atusb.c | ||
---|---|---|
54 | 54 | { |
55 | 55 | usb_dev_handle *dev; |
56 | 56 | |
57 | usb_unrestrict(); | |
57 | 58 | if (arg) |
58 | 59 | restrict_usb_path(arg); |
59 | 60 | dev = open_usb(USB_VENDOR, USB_PRODUCT); |
tools/lib/usbopen.c | ||
---|---|---|
228 | 228 | else |
229 | 229 | restrict_usb_by_port(path); |
230 | 230 | } |
231 | ||
232 | ||
233 | void usb_unrestrict(void) | |
234 | { | |
235 | vendor = 0; | |
236 | product = 0; | |
237 | restricted_path = NULL; | |
238 | } |
tools/lib/usbopen.h | ||
---|---|---|
21 | 21 | usb_dev_handle *open_usb(uint16_t default_vendor, uint16_t default_product); |
22 | 22 | void parse_usb_id(const char *id); |
23 | 23 | void restrict_usb_path(const char *path); |
24 | void usb_unrestrict(void); | |
24 | 25 | |
25 | 26 | #endif /* !USB_OPEN_H */ |