Package org.jnode.driver.bus.usb

Examples of org.jnode.driver.bus.usb.USBConfiguration


    @Override
    protected void startDevice() throws DriverException {
        try {
            USBDevice usbDevice = (USBDevice) getDevice();
            USBConfiguration conf = usbDevice.getConfiguration(0);
            usbDevice.setConfiguration(conf);
            // Set usb mass storage informations.
            this.storageDeviceData = new USBStorageDeviceData(usbDevice);
            USBDataPipe pipe;
            pipe = (USBDataPipe) this.storageDeviceData.getBulkOutEndPoint().getPipe();
View Full Code Here


        }
        final USBDevice dev = (USBDevice) device;
        if (dev.getDescriptor().getDeviceClass() != USB_CLASS_PER_INTERFACE) {
            return null;
        }
        final USBConfiguration conf = dev.getConfiguration(0);
        final USBInterface intf = conf.getInterface(0);
        final InterfaceDescriptor descr = intf.getDescriptor();
        if (descr.getInterfaceClass() != USB_CLASS_MASS_STORAGE) {
            return null;
        }
        log.debug("Found mass storage: " + descr);
View Full Code Here

        UsbBluetoothDevice UsbBtDevice = new UsbBluetoothDevice();

        final USBDevice dev = (USBDevice) getDevice();
        UsbBtDevice.setUsbDevice(dev);
        final USBConfiguration conf = dev.getConfiguration(0);
        final USBInterface intf = conf.getInterface(0);
        final InterfaceDescriptor iDesc = intf.getDescriptor();

        USBEndPoint bulkInEndpoint[] = new USBEndPoint[8];
        USBEndPoint bulkOutEndpoint[] = new USBEndPoint[8];
        USBEndPoint intrInEndpoint[] = new USBEndPoint[8];
View Full Code Here

        if (!(device instanceof USBDevice)) {
            return null;
        }
        final USBDevice dev = (USBDevice) device;
        final USBConfiguration conf = dev.getConfiguration(0);
        final USBInterface intf = conf.getInterface(0);
        final InterfaceDescriptor descr = intf.getDescriptor();
        if (descr.getInterfaceClass() != USB_CLASS_WIRELESS) {
            return null;
        }
        log.debug("Found USB wireless device.");
View Full Code Here

    public Driver findDriver(Device device) {
        if (device instanceof USBDevice) {
            final USBDevice dev = (USBDevice) device;
            if (dev.getDescriptor().getDeviceClass() == USB_CLASS_PER_INTERFACE) {

                final USBConfiguration conf = dev.getConfiguration(0);
                final USBInterface intf = conf.getInterface(0);
                final InterfaceDescriptor descr = intf.getDescriptor();

                if (descr.getInterfaceClass() == USB_CLASS_HID) {
                    if (descr.getInterfaceSubClass() == HID_SUBCLASS_BOOT_INTERFACE) {
                        switch (descr.getInterfaceProtocol()) {
View Full Code Here

     * @see org.jnode.driver.Driver#startDevice()
     */
    protected void startDevice() throws DriverException {
        try {
            final USBDevice dev = (USBDevice) getDevice();
            final USBConfiguration conf = dev.getConfiguration(0);
            // dev.setConfiguration(conf);
            final USBInterface intf = conf.getInterface(0);
            this.ep = null;
            for (int i = 0; i < intf.getDescriptor().getNumEndPoints(); i++) {
                ep = intf.getEndPoint(i);
                if (((ep.getDescriptor().getAttributes() & USB_ENDPOINT_XFERTYPE_MASK) == USB_ENDPOINT_XFER_INT) &&
                        ((ep.getDescriptor().getEndPointAddress() & USB_DIR_IN) == 0))
View Full Code Here

    protected void startDevice() throws DriverException {
        try {
            final USBDevice dev = (USBDevice) getDevice();

            // Get active configuration
            final USBConfiguration conf = dev.getConfiguration();
            final USBInterface intf = conf.getInterface(0);
            this.ep = null;
            for (int i = 0; i < intf.getDescriptor().getNumEndPoints(); i++) {
                ep = intf.getEndPoint(i);
                if (((ep.getDescriptor().getAttributes() & USB_ENDPOINT_XFERTYPE_MASK) == USB_ENDPOINT_XFER_INT) &&
                        ((ep.getDescriptor().getEndPointAddress() & USB_DIR_IN) == 0))
View Full Code Here

TOP

Related Classes of org.jnode.driver.bus.usb.USBConfiguration

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.