Package org.jnode.driver

Examples of org.jnode.driver.DriverException


                if (((ep.getDescriptor().getAttributes() & USB_ENDPOINT_XFERTYPE_MASK) == USB_ENDPOINT_XFER_INT) &&
                        ((ep.getDescriptor().getEndPointAddress() & USB_DIR_IN) == 0))
                    break;
            }
            if (this.ep == null)
                throw new DriverException(
                        "Found no interrupt endpoint, HID specs required at least one.");

            // Create the interrupt request
            intPipe = (USBDataPipe) ep.getPipe();
            intPipe.addListener(this);
            intPipe.open();
            intData = new USBPacket(ep.getDescriptor().getMaxPacketSize());
            final USBRequest req = intPipe.createRequest(intData);
            intPipe.asyncSubmit(req);

            // Register the PointerAPI
            dev.registerAPI(PointerAPI.class, apiAdapter);
        } catch (USBException ex) {
            throw new DriverException(ex);
        }
    }
View Full Code Here


        irq = bus.claimResources(getDevice(), KB_IRQ);
        try {
            // Set the mode
            setEnabled(true);
        } catch (DeviceException ex) {
            throw new DriverException("Cannot enable keyboard", ex);
        }
        // Start the rest
        super.startDevice();
        // Make sure all queues are empty
        bus.flush();
View Full Code Here

    }

    protected int getPointerId() throws DriverException {
        try {
            if (!bus.writeMouseCommands(CMD_GET_ID, null, 1)) {
                throw new DriverException("Cannot request Pointer ID");
            }
            return channel.read(50);
        } catch (DeviceException ex) {
            throw new DriverException("Error in requesting Pointer ID", ex);
        } catch (IOException ex) {
            throw new DriverException("Error in requesting Pointer ID", ex);
        } catch (TimeoutException ex) {
            throw new DriverException("Timeout in requesting Pointer ID", ex);
        } catch (InterruptedException ex) {
            throw new DriverException("Interrupted in requesting Pointer ID", ex);
        }
    }
View Full Code Here

        irq = bus.claimResources(getDevice(), MOUSE_IRQ);
        try {
            // Set the mode
            setEnabled(true);
        } catch (DeviceException ex) {
            throw new DriverException("Cannot enable keyboard", ex);
        }
        super.startDevice();
        // Make sure all queues are empty
        bus.flush();
        final PointerInterpreter interpreter = getPointerInterpreter();
View Full Code Here

        try {
            final ResourceManager rm;
            try {
                rm = InitialNaming.lookup(ResourceManager.NAME);
            } catch (NameNotFoundException ex) {
                throw new DriverException("Cannot find ResourceManager: ", ex);
            }
            if (ioResData == null) {
                ioResData = claimPorts(rm, owner, PS2_DATA_PORT, 1);
                ioResCtrl = claimPorts(rm, owner, PS2_CTRL_PORT, 1);
            }
            final IRQResource irqRes = rm.claimIRQ(owner, irq, this, true);
            if (activeCount == 0) {
                flush();
            }
            activeCount++;
            return irqRes;
        } catch (ResourceNotFreeException ex) {
            throw new DriverException("Cannot claim necessairy resources: ", ex);
        }
    }
View Full Code Here

                }
            });
        } catch (ResourceNotFreeException ex) {
            throw ex;
        } catch (Exception ex) {
            throw new DriverException("Unknown exception", ex);
        }

    }
View Full Code Here

            final DeviceManager dm = InitialNaming.lookup(DeviceManager.NAME);
            dm.rename(device, getDevicePrefix() + "-" + device.getId(), false);
        } catch (DeviceAlreadyRegisteredException ex) {
            log.error("Cannot rename device", ex);
        } catch (NameNotFoundException ex) {
            throw new DriverException("Cannot find DeviceManager", ex);
        }
        device.registerAPI(FrameBufferAPI.class, this);
    }
View Full Code Here

     */
    protected void startDevice() throws DriverException {
        try {
            kernel = new RadeonCore(this, architecture, model, (PCIDevice) getDevice());
        } catch (ResourceNotFreeException ex) {
            throw new DriverException(ex);
        }
        super.startDevice();
        final Device dev = getDevice();
        // dev.registerAPI(DisplayDataChannelAPI.class, kernel);
        dev.registerAPI(HardwareCursorAPI.class, kernel.getHardwareCursor());
View Full Code Here

    }

    private static final int parseArchitecture(ConfigurationElement config) throws DriverException {
        final String arch = config.getAttribute("architecture");
        if (arch == null) {
            throw new DriverException("Architecture must be set");
        } else if (arch.equals("R100")) {
            return Architecture.R100;
        } else if (arch.equals("RV100")) {
            return Architecture.RV100;
        } else if (arch.equals("R200")) {
            return Architecture.R200;
        } else if (arch.equals("RV200")) {
            return Architecture.RV200;
        } else if (arch.equals("RV250")) {
            return Architecture.RV250;
        } else if (arch.equals("R300")) {
            return Architecture.R300;
        } else if (arch.equals("M6")) {
            return Architecture.M6;
        } else if (arch.equals("M7")) {
            return Architecture.M7;
        } else if (arch.equals("M9")) {
            return Architecture.M9;
        } else {
            throw new DriverException("Unknown architecture " + arch);
        }
    }
View Full Code Here

                }
            });
        } catch (ResourceNotFreeException ex) {
            throw ex;
        } catch (Exception ex) {
            throw new DriverException("Unknown exception", ex);
        }

    }
View Full Code Here

TOP

Related Classes of org.jnode.driver.DriverException

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.