Exemplo n.º 1
0
  /** @see org.jnode.driver.Driver#stopDevice() */
  protected void stopDevice() throws DriverException {
    super.stopDevice();

    abstractDeviceCore.disable();
    abstractDeviceCore.release();
    abstractDeviceCore = null;
  }
Exemplo n.º 2
0
  /** @see org.jnode.driver.Driver#startDevice() */
  protected void startDevice() throws DriverException {
    try {
      log.info("Starting " + flags.getName());
      abstractDeviceCore = newCore(getDevice(), flags);
      try {
        abstractDeviceCore.initialize();
      } catch (DriverException ex) {
        abstractDeviceCore.release();
        throw ex;
      }

      super.startDevice();
    } catch (ResourceNotFreeException ex) {
      throw new DriverException("Cannot claim " + flags.getName() + " resources", ex);
    }
  }