diff options
author | Daniel Drake <dsd@gentoo.org> | 2008-01-04 00:54:57 +0000 |
---|---|---|
committer | Daniel Drake <dsd@gentoo.org> | 2008-01-04 00:54:57 +0000 |
commit | dbb3fd871e3972b4e670f3161e7cd2f58f357600 (patch) | |
tree | f755da05a19bd3026c5b8d0dd45ac42a9636804d /examples | |
parent | e9364d72151ae1de9cce4175f330fe1529f02511 (diff) | |
download | libusb-dbb3fd871e3972b4e670f3161e7cd2f58f357600.tar.gz |
API renaming: remove fpi and usb_ stuff
fpi changed to usbi.
We should not expose structures with prefix "usb_" in the public
namespace as it is quite likely there will be some conflict somewhere.
Instead, using "libusb_" should be safer.
Diffstat (limited to 'examples')
-rw-r--r-- | examples/dpfp.c | 12 | ||||
-rw-r--r-- | examples/lsusb.c | 2 |
2 files changed, 7 insertions, 7 deletions
diff --git a/examples/dpfp.c b/examples/dpfp.c index ff4ae76..78251a7 100644 --- a/examples/dpfp.c +++ b/examples/dpfp.c @@ -28,10 +28,10 @@ #include <libusb/libusb.h> -#define EP_INTR (1 | USB_ENDPOINT_IN) -#define EP_DATA (2 | USB_ENDPOINT_IN) -#define CTRL_IN (USB_TYPE_VENDOR | USB_ENDPOINT_IN) -#define CTRL_OUT (USB_TYPE_VENDOR | USB_ENDPOINT_OUT) +#define EP_INTR (1 | LIBUSB_ENDPOINT_IN) +#define EP_DATA (2 | LIBUSB_ENDPOINT_IN) +#define CTRL_IN (LIBUSB_TYPE_VENDOR | LIBUSB_ENDPOINT_IN) +#define CTRL_OUT (LIBUSB_TYPE_VENDOR | LIBUSB_ENDPOINT_OUT) #define USB_RQ 0x04 #define INTR_LENGTH 64 @@ -85,7 +85,7 @@ static struct libusb_dev *find_dpfp_device(void) libusb_find_devices(); for (dev = libusb_get_devices(); dev; dev = libusb_dev_next(dev)) { - struct usb_dev_descriptor *desc = libusb_dev_get_descriptor(dev); + struct libusb_dev_descriptor *desc = libusb_dev_get_descriptor(dev); if (desc->idVendor == 0x05ba && desc->idProduct == 0x000a) return dev; } @@ -206,7 +206,7 @@ static int set_mode(unsigned char data) static void cb_mode_changed(struct libusb_dev_handle *_devh, struct libusb_urb_handle *urbh, enum fp_urb_cb_status status, - struct usb_ctrl_setup *setup, unsigned char *data, int actual_length, + struct libusb_ctrl_setup *setup, unsigned char *data, int actual_length, void *user_data) { if (status != FP_URB_COMPLETED) { diff --git a/examples/lsusb.c b/examples/lsusb.c index d093709..8145d63 100644 --- a/examples/lsusb.c +++ b/examples/lsusb.c @@ -26,7 +26,7 @@ void print_devs(libusb_dev *devs) libusb_dev *dev; for (dev = devs; dev; dev = libusb_dev_next(dev)) { - struct usb_dev_descriptor *desc = libusb_dev_get_descriptor(dev); + struct libusb_dev_descriptor *desc = libusb_dev_get_descriptor(dev); printf("%04x:%04x\n", desc->idVendor, desc->idProduct); } } |