Prevents confusion with functions that work on fpusb_dev structures.
}
printf("found device\n");
- devh = fpusb_dev_open(dev);
+ devh = fpusb_devh_open(dev);
if (!devh) {
fprintf(stderr, "Could not open device\n");
goto out;
}
printf("opened device\n");
- r = fpusb_dev_claim_intf(devh, 0);
+ r = fpusb_devh_claim_intf(devh, 0);
if (r < 0) {
fprintf(stderr, "usb_claim_interface error %d %s\n", r, strerror(-r));
goto out;
set_mode(0);
set_hwstat(0x80);
out_release:
- fpusb_dev_release_intf(devh, 0);
+ fpusb_devh_release_intf(devh, 0);
out:
- fpusb_dev_close(devh);
+ fpusb_devh_close(devh);
fpusb_exit();
return r >= 0 ? r : -r;
}
return &dev->desc;
}
-API_EXPORTED struct fpusb_dev_handle *fpusb_dev_open(struct fpusb_dev *dev)
+API_EXPORTED struct fpusb_dev_handle *fpusb_devh_open(struct fpusb_dev *dev)
{
struct fpusb_dev_handle *devh;
int fd;
close(devh->fd);
}
-API_EXPORTED void fpusb_dev_close(struct fpusb_dev_handle *devh)
+API_EXPORTED void fpusb_devh_close(struct fpusb_dev_handle *devh)
{
if (!devh)
return;
free(devh);
}
-API_EXPORTED int fpusb_dev_claim_intf(struct fpusb_dev_handle *dev,
+API_EXPORTED int fpusb_devh_claim_intf(struct fpusb_dev_handle *dev,
int iface)
{
int r;
return r;
}
-API_EXPORTED int fpusb_dev_release_intf(struct fpusb_dev_handle *dev,
+API_EXPORTED int fpusb_devh_release_intf(struct fpusb_dev_handle *dev,
int iface)
{
int r;
struct usb_dev_descriptor *fpusb_dev_get_descriptor(fpusb_dev *dev);
fpusb_dev *fpusb_dev_next(fpusb_dev *dev);
-fpusb_dev_handle *fpusb_dev_open(fpusb_dev *dev);
-void fpusb_dev_close(fpusb_dev_handle *devh);
-int fpusb_dev_claim_intf(fpusb_dev_handle *dev, int iface);
-int fpusb_dev_release_intf(fpusb_dev_handle *dev, int iface);
+fpusb_dev_handle *fpusb_devh_open(fpusb_dev *dev);
+void fpusb_devh_close(fpusb_dev_handle *devh);
+int fpusb_devh_claim_intf(fpusb_dev_handle *dev, int iface);
+int fpusb_devh_release_intf(fpusb_dev_handle *dev, int iface);
/* async I/O */