Examples of USBException


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

        if (req.getStatus() == USBREQ_ST_COMPLETED) {
            storageDeviceData.setMaxLun(packet.getData()[0]);
        } else if (req.getStatus() == USBREQ_ST_STALLED) {
            storageDeviceData.setMaxLun((byte) 0);
        } else {
            throw new USBException("Request status   : 0x" + NumberUtils.hex(req.getStatus(), 4));
        }
    }
View Full Code Here

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

        int offset = 0;
        final int dataPid = (setupPacket.isDirIn() ? USB_PID_IN : USB_PID_OUT);
        boolean dataToggle = false; // Start with DATA1
        final int maxPacketSize = pipe.getMaxPacketSize();
        if (maxPacketSize <= 0) {
            throw new USBException("Invalid maximum packet size " + maxPacketSize);
        }
        while (length > 0) {

            // Create the TD for this part of the data packet
            final TransferDescriptor dataTD;
View Full Code Here

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

     *
     * @param request
     */
    public synchronized void asyncSubmit(USBRequest request) throws USBException {
        if (!open) {
            throw new USBException("Not open");
        }
        if (!(request instanceof UHCIRequest)) {
            throw new IllegalArgumentException("Invalid request type (IUHCIRequest)");
        }
        if (!(request instanceof AbstractUSBRequest)) {
View Full Code Here

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

     */
    public void syncSubmit(USBRequest request, long timeout) throws USBException {
        asyncSubmit(request);
        request.waitUntilComplete(timeout);
        if (!request.isCompleted()) {
            throw new USBException("Timeout on request");
        }
        final int status = request.getStatus();
        if ((status & USBREQ_ST_ERROR_MASK) != 0) {
            throw new USBException("USB error 0x" + NumberUtils.hex(status));
        }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.