?? usbhubapi.java
字號:
/*
* $Id: USBHubAPI.java,v 1.1 2003/11/25 11:41:20 epr Exp $
*/
package org.jnode.driver.usb;
import org.jnode.driver.DeviceAPI;
/**
* Generic interface for controlling an USB HUB.
*
* @author Ewout Prangsma (epr@users.sourceforge.net)
*/
public interface USBHubAPI extends DeviceAPI {
/**
* Gets the bus to which this HUB is connected.
*/
public USBBus getUSBBus();
/**
* Gets the device for the given port.
* @param port
*/
public USBDevice getDevice(int port);
/**
* Set the device for the given port.
* @param dev
* @param port
*/
public void setDevice(USBDevice dev, int port);
/**
* Unset the device for the given port.
* @param port
*/
public void unsetDevice(int port);
/**
* Gets the number of downstream ports connected to this HUB.
*/
public int getNumPorts();
/**
* Is the given port enabled.
*/
public boolean isPortEnabled(int port)
throws USBException;
/**
* Enable/disable a given port
* @param enabled
*/
public void setPortEnabled(int port, boolean enabled)
throws USBException;
/**
* Reset a given port
*/
public void resetPort(int port)
throws USBException;
/**
* Gets the port connection status.
* @return True if a device is connected, false otherwise
*/
public boolean isPortConnected(int port)
throws USBException;
/**
* Has the port connection status changed.
*/
public boolean isPortConnectionStatusChanged(int port)
throws USBException;
/**
* Clear the port connection status changed flag.
*/
public void clearPortConnectionStatusChanged(int port)
throws USBException;
/**
* Is a lowspeed device connected to the given port.
* This method is only relevant if the port connection status is true.
* @return True if a lowspeed device is connected, false otherwise (full or high speed)
*/
public boolean isPortConnectedToLowSpeed(int port)
throws USBException;
/**
* Is a highspeed device connected to the given port.
* This method is only relevant if the port connection status is true.
* @return True if a highspeed device is connected, false otherwise (low or full)
*/
public boolean isPortConnectedToHighSpeed(int port)
throws USBException;
/**
* Gets the status of the port.
* This method is here for debugging only.
* @param port
* @return Implementation dependent.
* @throws USBException
*/
public int getPortStatus(int port)
throws USBException;
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -