- AbstractDeviceInfo moved to ch.ntb.usb.testApp (no more references to test directory)
- initialization parameters for TestDevice added git-svn-id: https://svn.code.sf.net/p/libusbjava/code/trunk@229 94ad28fe-ef68-46b1-9651-e7ae4fcf1c4c
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
package ch.ntb.usb.test;
|
||||
|
||||
import ch.ntb.usb.USB;
|
||||
import ch.ntb.usb.testApp.AbstractDeviceInfo;
|
||||
|
||||
public class AT90USB1287 extends AbstractDeviceInfo {
|
||||
|
||||
|
||||
@@ -1,151 +0,0 @@
|
||||
/*
|
||||
* Java libusb wrapper
|
||||
* Copyright (c) 2005-2006 Andreas Schl<68>pfer <libusb@drip.ch>
|
||||
*
|
||||
* This library is covered by the LGPL, read LGPL.txt for details.
|
||||
*/
|
||||
package ch.ntb.usb.test;
|
||||
|
||||
public abstract class AbstractDeviceInfo {
|
||||
|
||||
private short idVendor;
|
||||
|
||||
private short idProduct;
|
||||
|
||||
private int timeout;
|
||||
|
||||
private int configuration;
|
||||
|
||||
private int interface_;
|
||||
|
||||
private int altinterface;
|
||||
|
||||
private int outEPBulk;
|
||||
|
||||
private int inEPBulk;
|
||||
|
||||
private int outEPInt;
|
||||
|
||||
private int inEPInt;
|
||||
|
||||
private int sleepTimeout;
|
||||
|
||||
private int maxDataSize;
|
||||
|
||||
private TransferMode mode;
|
||||
|
||||
public static enum TransferMode {
|
||||
Bulk, Interrupt
|
||||
}
|
||||
|
||||
public AbstractDeviceInfo() {
|
||||
initValues();
|
||||
}
|
||||
|
||||
abstract public void initValues();
|
||||
|
||||
public int getAltinterface() {
|
||||
return altinterface;
|
||||
}
|
||||
|
||||
public int getConfiguration() {
|
||||
return configuration;
|
||||
}
|
||||
|
||||
public short getIdProduct() {
|
||||
return idProduct;
|
||||
}
|
||||
|
||||
public short getIdVendor() {
|
||||
return idVendor;
|
||||
}
|
||||
|
||||
public int getInEPBulk() {
|
||||
return inEPBulk;
|
||||
}
|
||||
|
||||
public int getInEPInt() {
|
||||
return inEPInt;
|
||||
}
|
||||
|
||||
public int getInterface() {
|
||||
return interface_;
|
||||
}
|
||||
|
||||
public int getMaxDataSize() {
|
||||
return maxDataSize;
|
||||
}
|
||||
|
||||
public int getOutEPBulk() {
|
||||
return outEPBulk;
|
||||
}
|
||||
|
||||
public int getOutEPInt() {
|
||||
return outEPInt;
|
||||
}
|
||||
|
||||
public int getSleepTimeout() {
|
||||
return sleepTimeout;
|
||||
}
|
||||
|
||||
public int getTimeout() {
|
||||
return timeout;
|
||||
}
|
||||
|
||||
public void setAltinterface(int altinterface) {
|
||||
this.altinterface = altinterface;
|
||||
}
|
||||
|
||||
public void setConfiguration(int configuration) {
|
||||
this.configuration = configuration;
|
||||
}
|
||||
|
||||
public void setIdProduct(short idProduct) {
|
||||
this.idProduct = idProduct;
|
||||
}
|
||||
|
||||
public void setIdVendor(short idVendor) {
|
||||
this.idVendor = idVendor;
|
||||
}
|
||||
|
||||
public void setInEPBulk(int in_ep_bulk) {
|
||||
this.inEPBulk = in_ep_bulk;
|
||||
}
|
||||
|
||||
public void setInEPInt(int in_ep_int) {
|
||||
this.inEPInt = in_ep_int;
|
||||
}
|
||||
|
||||
public void setInterface(int interface_) {
|
||||
this.interface_ = interface_;
|
||||
}
|
||||
|
||||
public void setMaxDataSize(int maxDataSize) {
|
||||
this.maxDataSize = maxDataSize;
|
||||
}
|
||||
|
||||
public void setOutEPBulk(int out_ep_bulk) {
|
||||
this.outEPBulk = out_ep_bulk;
|
||||
}
|
||||
|
||||
public void setOutEPInt(int out_ep_int) {
|
||||
this.outEPInt = out_ep_int;
|
||||
}
|
||||
|
||||
public void setSleepTimeout(int sleepTimeout) {
|
||||
this.sleepTimeout = sleepTimeout;
|
||||
}
|
||||
|
||||
public void setTimeout(int timeout) {
|
||||
this.timeout = timeout;
|
||||
}
|
||||
|
||||
public TransferMode getMode() {
|
||||
return mode;
|
||||
}
|
||||
|
||||
public void setMode(TransferMode mode) {
|
||||
this.mode = mode;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -7,6 +7,7 @@
|
||||
package ch.ntb.usb.test;
|
||||
|
||||
import ch.ntb.usb.USB;
|
||||
import ch.ntb.usb.testApp.AbstractDeviceInfo;
|
||||
|
||||
public class CY7C68013A extends AbstractDeviceInfo {
|
||||
|
||||
|
||||
@@ -26,7 +26,8 @@ import ch.ntb.usb.USB;
|
||||
import ch.ntb.usb.USBException;
|
||||
import ch.ntb.usb.Usb_Config_Descriptor;
|
||||
import ch.ntb.usb.Usb_Device_Descriptor;
|
||||
import ch.ntb.usb.test.AbstractDeviceInfo.TransferMode;
|
||||
import ch.ntb.usb.testApp.AbstractDeviceInfo;
|
||||
import ch.ntb.usb.testApp.AbstractDeviceInfo.TransferMode;
|
||||
|
||||
public class DeviceTest {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user