Package javax.usb

Examples of javax.usb.UsbInterface


    }
   
    public void run() {
      UsbConfiguration usbConfiguration = device.getUsbConfiguration((byte) 1);
      UsbInterface usbInterface = usbConfiguration.getUsbInterface((byte) 0);
     
      UsbEndpoint endpoint = usbInterface.getUsbEndpoint(NiaDevice2.ENDPOINT_IN);
      UsbPipe usbPipe = endpoint.getUsbPipe();
     
      try {
        usbPipe.open();
      } catch (UsbException e) {
View Full Code Here


    {
      throw new CM19AException("No active configuration found");
    }

    /* Get the first interface, there should only be one */
    UsbInterface usbInterface = (UsbInterface) config.getUsbInterfaces().get(0);

    logger.debug("Got device; Manufacturer is " + cm19a.getManufacturerString());
    logger.debug("Got interface; Active is " + usbInterface.isActive() + " Claimed is " + usbInterface.isClaimed());

    try
    {
      usbInterface.claim();
      logger.debug("Interface has been claimed");
    }
    catch (UsbException ue)
    {
      throw new CM19AException("Couldn't claim interface. " + "Message is " + ue.getMessage());
View Full Code Here

TOP

Related Classes of javax.usb.UsbInterface

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.