- 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:
@@ -4,7 +4,7 @@
|
||||
*
|
||||
* This library is covered by the LGPL, read LGPL.txt for details.
|
||||
*/
|
||||
package ch.ntb.usb.test;
|
||||
package ch.ntb.usb.testApp;
|
||||
|
||||
public abstract class AbstractDeviceInfo {
|
||||
|
||||
@@ -14,9 +14,8 @@ import ch.ntb.usb.Device;
|
||||
import ch.ntb.usb.USB;
|
||||
import ch.ntb.usb.USBException;
|
||||
import ch.ntb.usb.logger.LogUtil;
|
||||
import ch.ntb.usb.test.AT90USB1287;
|
||||
|
||||
public class TestDevice extends AT90USB1287 {
|
||||
public class TestDevice extends AbstractDeviceInfo {
|
||||
|
||||
private static final Logger logger = LogUtil.getLogger("ch.ntb.usb.test");
|
||||
|
||||
@@ -41,6 +40,23 @@ public class TestDevice extends AT90USB1287 {
|
||||
outMode = TransferMode.Bulk;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initValues() {
|
||||
setIdVendor((short) 0x8235);
|
||||
setIdProduct((short) 0x0222);
|
||||
setTimeout(2000);
|
||||
setConfiguration(1);
|
||||
setInterface(0);
|
||||
setAltinterface(-1);
|
||||
setOutEPBulk(0x01);
|
||||
setInEPBulk(0x82);
|
||||
setOutEPInt(0x03);
|
||||
setInEPInt(0x84);
|
||||
setSleepTimeout(2000);
|
||||
setMaxDataSize(USB.FULLSPEED_MAX_BULK_PACKET_SIZE);
|
||||
setMode(TransferMode.Bulk);
|
||||
}
|
||||
|
||||
public void openUsbDevice() {
|
||||
dev = USB.getDevice(getIdVendor(), getIdProduct());
|
||||
try {
|
||||
|
||||
@@ -34,9 +34,9 @@ import ch.ntb.usb.Usb_Device;
|
||||
import ch.ntb.usb.Usb_Device_Descriptor;
|
||||
import ch.ntb.usb.Usb_Endpoint_Descriptor;
|
||||
import ch.ntb.usb.Usb_Interface_Descriptor;
|
||||
import ch.ntb.usb.test.AbstractDeviceInfo.TransferMode;
|
||||
import ch.ntb.usb.testApp.TestApp;
|
||||
import ch.ntb.usb.testApp.TestDevice;
|
||||
import ch.ntb.usb.testApp.AbstractDeviceInfo.TransferMode;
|
||||
|
||||
public class UsbView extends JFrame {
|
||||
|
||||
|
||||
@@ -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 {
|
||||
|
||||
|
||||
@@ -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