|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectch.ntb.usb.USB
public class USB
This class manages all USB devices and defines some USB specific constants.
Field Summary | |
---|---|
static int |
FULLSPEED_MAX_BULK_PACKET_SIZE
The maximum packet size of a bulk transfer when operating in fullspeed (12 MB/s) mode. |
static int |
HIGHSPEED_MAX_BULK_PACKET_SIZE
The maximum packet size of a bulk transfer when operating in highspeed (480 MB/s) mode. |
static int |
REQ_CLEAR_FEATURE
This request is used to clear or disable a specific feature (USB spec 9.4.1). |
static int |
REQ_GET_CONFIGURATION
This request returns the current device configuration value (USB spec 9.4.2). |
static int |
REQ_GET_DESCRIPTOR
This request returns the specified descriptor if the descriptor exists (USB spec 9.4.3). |
static int |
REQ_GET_INTERFACE
This request returns the selected alternate setting for the specified interface (USB spec 9.4.4). |
static int |
REQ_GET_STATUS
This request returns status for the specified recipient (USB spec 9.4.5). |
static int |
REQ_SET_ADDRESS
This request sets the device address for all future device accesses (USB spec 9.4.6). |
static int |
REQ_SET_CONFIGURATION
This request sets the device configuration (USB spec 9.4.7). |
static int |
REQ_SET_DESCRIPTOR
This request is optional and may be used to update existing descriptors or new descriptors may be added (USB spec 9.4.8). |
static int |
REQ_SET_FEATURE
This request is used to set or enable a specific feature (USB spec 9.4.9). |
static int |
REQ_SET_INTERFACE
This request allows the host to select an alternate setting for the specified interface (USB spec 9.4.10). |
static int |
REQ_SYNCH_FRAME
This request is used to set and then report an endpoint?s synchronization frame (USB spec 9.4.11). |
static int |
REQ_TYPE_DIR_DEVICE_TO_HOST
Identifies the direction of data transfer in the second phase of the control transfer. The state of the Direction bit is ignored if the wLength field is zero, signifying there is no Data stage. Specifies bit 7 of bmRequestType. |
static int |
REQ_TYPE_DIR_HOST_TO_DEVICE
Identifies the direction of data transfer in the second phase of the control transfer. The state of the Direction bit is ignored if the wLength field is zero, signifying there is no Data stage. Specifies bit 7 of bmRequestType. |
static int |
REQ_TYPE_RECIP_DEVICE
Specifies the intended recipient of the request. Requests may be directed to the device, an interface on the device, or a specific endpoint on a device. |
static int |
REQ_TYPE_RECIP_ENDPOINT
Specifies the intended recipient of the request. Requests may be directed to the device, an interface on the device, or a specific endpoint on a device. |
static int |
REQ_TYPE_RECIP_INTERFACE
Specifies the intended recipient of the request. Requests may be directed to the device, an interface on the device, or a specific endpoint on a device. |
static int |
REQ_TYPE_RECIP_OTHER
Specifies the intended recipient of the request. Requests may be directed to the device, an interface on the device, or a specific endpoint on a device. |
static int |
REQ_TYPE_TYPE_CLASS
Specifies the type of the request. Specifies bits 6..5 of bmRequestType. |
static int |
REQ_TYPE_TYPE_RESERVED
Specifies the type of the request. Specifies bits 6..5 of bmRequestType. |
static int |
REQ_TYPE_TYPE_STANDARD
Specifies the type of the request. Specifies bits 6..5 of bmRequestType. |
static int |
REQ_TYPE_TYPE_VENDOR
Specifies the type of the request. Specifies bits 6..5 of bmRequestType. |
Constructor Summary | |
---|---|
USB()
|
Method Summary | |
---|---|
static Usb_Bus |
getBus()
Returns the root Usb_Bus element. |
static Device |
getDevice(short idVendor,
short idProduct)
See getDevice(short, short, String) . |
static Device |
getDevice(short idVendor,
short idProduct,
java.lang.String filename)
Create a new device an register it in a device queue. |
static void |
init()
Explicitly calls LibusbJava.usb_init() . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int REQ_GET_STATUS
Device.controlMsg(int, int, int, int, byte[], int, int,
boolean)
,
Constant Field Valuespublic static final int REQ_CLEAR_FEATURE
Device.controlMsg(int, int, int, int, byte[], int, int,
boolean)
,
Constant Field Valuespublic static final int REQ_SET_FEATURE
Device.controlMsg(int, int, int, int, byte[], int, int,
boolean)
,
Constant Field Valuespublic static final int REQ_SET_ADDRESS
Device.controlMsg(int, int, int, int, byte[], int, int,
boolean)
,
Constant Field Valuespublic static final int REQ_GET_DESCRIPTOR
Device.controlMsg(int, int, int, int, byte[], int, int,
boolean)
,
Constant Field Valuespublic static final int REQ_SET_DESCRIPTOR
Device.controlMsg(int, int, int, int, byte[], int, int,
boolean)
,
Constant Field Valuespublic static final int REQ_GET_CONFIGURATION
Device.controlMsg(int, int, int, int, byte[], int, int,
boolean)
,
Constant Field Valuespublic static final int REQ_SET_CONFIGURATION
Device.controlMsg(int, int, int, int, byte[], int, int,
boolean)
,
Constant Field Valuespublic static final int REQ_GET_INTERFACE
Device.controlMsg(int, int, int, int, byte[], int, int,
boolean)
,
Constant Field Valuespublic static final int REQ_SET_INTERFACE
Device.controlMsg(int, int, int, int, byte[], int, int,
boolean)
,
Constant Field Valuespublic static final int REQ_SYNCH_FRAME
Device.controlMsg(int, int, int, int, byte[], int, int,
boolean)
,
Constant Field Valuespublic static final int REQ_TYPE_DIR_HOST_TO_DEVICE
Device.controlMsg(int, int, int, int, byte[], int, int,
boolean)
,
Constant Field Valuespublic static final int REQ_TYPE_DIR_DEVICE_TO_HOST
Device.controlMsg(int, int, int, int, byte[], int, int,
boolean)
,
Constant Field Valuespublic static final int REQ_TYPE_TYPE_STANDARD
Device.controlMsg(int, int, int, int, byte[], int, int,
boolean)
,
Constant Field Valuespublic static final int REQ_TYPE_TYPE_CLASS
Device.controlMsg(int, int, int, int, byte[], int, int,
boolean)
,
Constant Field Valuespublic static final int REQ_TYPE_TYPE_VENDOR
Device.controlMsg(int, int, int, int, byte[], int, int,
boolean)
,
Constant Field Valuespublic static final int REQ_TYPE_TYPE_RESERVED
Device.controlMsg(int, int, int, int, byte[], int, int,
boolean)
,
Constant Field Valuespublic static final int REQ_TYPE_RECIP_DEVICE
Device.controlMsg(int, int, int, int, byte[], int, int,
boolean)
,
Constant Field Valuespublic static final int REQ_TYPE_RECIP_INTERFACE
Device.controlMsg(int, int, int, int, byte[], int, int,
boolean)
,
Constant Field Valuespublic static final int REQ_TYPE_RECIP_ENDPOINT
Device.controlMsg(int, int, int, int, byte[], int, int,
boolean)
,
Constant Field Valuespublic static final int REQ_TYPE_RECIP_OTHER
Device.controlMsg(int, int, int, int, byte[], int, int,
boolean)
,
Constant Field Valuespublic static int HIGHSPEED_MAX_BULK_PACKET_SIZE
public static int FULLSPEED_MAX_BULK_PACKET_SIZE
Constructor Detail |
---|
public USB()
Method Detail |
---|
public static Device getDevice(short idVendor, short idProduct, java.lang.String filename)
idVendor
- the vendor id of the USB deviceidProduct
- the product id of the USB devicefilename
- an optional filename which can be used to distinguish multiple
devices with the same vendor and product id.
public static Device getDevice(short idVendor, short idProduct)
getDevice(short, short, String)
. The parameter
filename
is set to null.
idVendor
- idProduct
-
public static Usb_Bus getBus() throws USBException
Usb_Bus
element.
Usb_Bus
element
USBException
public static void init()
LibusbJava.usb_init()
. Note that you don't need
to call this procedure as it is called implicitly when creating a new
device with getDevice(short, short, String)
.
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |