Examples of DriverException


Examples of org.jnode.driver.DriverException

        // Initialize card
        try {
            io.executeCommand(INIT, 0, 0, 0, 0, null);
        } catch (TimeoutException ex) {
            throw new DriverException("Cannot initialize device in time", ex);
        }

        // Disable interrupts
        io.setReg(INTEN, 0);
        // Acknowledge any spurious events
View Full Code Here

Examples of org.jnode.driver.DriverException

            case CNFAUTHENTICATION_OPENSYSTEM:
                return AuthenticationMode.OPENSYSTEM;
            case CNFAUTHENTICATION_SHAREDKEY:
                return AuthenticationMode.SHAREDKEY;
            default:
                throw new DriverException("Unknown authentication mode 0x"
                    + NumberUtils.hex(mode, 4));
        }
    }
View Full Code Here

Examples of org.jnode.driver.DriverException

                break;
            case SHAREDKEY:
                modeVal = CNFAUTHENTICATION_SHAREDKEY;
                break;
            default:
                throw new DriverException("Unknown authentication mode " + mode);
        }
        setConfig16(CNFAUTHENTICATION, modeVal);
    }
View Full Code Here

Examples of org.jnode.driver.DriverException

        final int iolength = getIOLength(device, flags);
        final ResourceManager rm;
        try {
            rm = InitialNaming.lookup(ResourceManager.NAME);
        } catch (NameNotFoundException ex) {
            throw new DriverException("Cannot find ResourceManager");
        }
        this.irq = rm.claimIRQ(owner, irq, this, true);
        try {
            io = claimPorts(rm, owner, iobase, iolength);
        } catch (ResourceNotFreeException ex) {
View Full Code Here

Examples of org.jnode.driver.DriverException

            }

            //log.debug("Got (on page " + page + "): " + NumberUtils.hex(returnData, 0, returnData.length));

        }
        throw new DriverException("Cannot find NIC memory of " + flags.getName());
    }
View Full Code Here

Examples of org.jnode.driver.DriverException

     * @param flags
     */
    public BCM570xCore(BCM570xDriver driver, ResourceOwner owner, PCIDevice device, Flags flags)
        throws DriverException, ResourceNotFreeException {
        if (!(flags instanceof BCM570xFlags))
            throw new DriverException("Wrong flags to the BCM570x driver");

        this.driver = driver;
        log.info(driver);
        this.flags = (BCM570xFlags) flags;

        final int irq = getIRQ(device, this.flags);
        log.info("BCM570x driver irq " + irq);

        // Get the start of the IO address space
        this.iobase = getIOBase(device, this.flags);

        final int iolength = getIOLength(device, this.flags);
        log.info("BCM570x driver iobase " + iobase + " irq " + irq);
        log.debug("BCM570x driver iobase " + iobase + " irq " + irq);

        final ResourceManager rm;

        try {
            rm = InitialNaming.lookup(ResourceManager.NAME);
        } catch (NameNotFoundException ex) {
            throw new DriverException("Cannot find ResourceManager");
        }

        this.irq = rm.claimIRQ(owner, irq, this, true);

        try {
View Full Code Here

Examples of org.jnode.driver.DriverException

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

    }
View Full Code Here

Examples of org.jnode.driver.DriverException

    protected int getIOBase(Device device, Flags flags) throws DriverException {
        final PCIHeaderType0 config = ((PCIDevice) device).getConfig().asHeaderType0();
        final PCIBaseAddress[] addrs = config.getBaseAddresses();

        if (addrs.length < 1) {
            throw new DriverException("Cannot find iobase: not base addresses");
        }
        if (!addrs[0].isIOSpace()) {
            throw new DriverException("Cannot find iobase: first address is not I/O");
        }
        return addrs[0].getIOBase();
    }
View Full Code Here

Examples of org.jnode.driver.DriverException

    protected int getIOLength(Device device, Flags flags) throws DriverException {
        final PCIHeaderType0 config = ((PCIDevice) device).getConfig().asHeaderType0();
        final PCIBaseAddress[] addrs = config.getBaseAddresses();

        if (addrs.length < 1) {
            throw new DriverException("Cannot find iobase: not base addresses");
        }

        if (!addrs[0].isIOSpace()) {
            throw new DriverException("Cannot find iobase: first address is not I/O");
        }

        return addrs[0].getSize();
    }
View Full Code Here

Examples of org.jnode.driver.DriverException

                }
            });
        } catch (ResourceNotFreeException ex) {
            throw ex;
        } catch (Exception ex) {
            throw new DriverException("Unknown exception", ex);
        }
    }
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.