diff USBLib/Communication/IUsbDevice.cs @ 67:2d16447eff12

Simplified USB communication code, added functions to abort pipe transfers
author Ivo Smits <Ivo@UCIS.nl>
date Wed, 16 Oct 2013 01:11:49 +0200
parents abe0d55a2201
children
line wrap: on
line diff
--- a/USBLib/Communication/IUsbDevice.cs	Tue Oct 15 16:22:54 2013 +0200
+++ b/USBLib/Communication/IUsbDevice.cs	Wed Oct 16 01:11:49 2013 +0200
@@ -13,19 +13,13 @@
 		Byte Configuration { get; }
 		void Close();
 
-		//int ControlTransfer(byte requestType, byte request, short value, short index, Byte[] buffer, int offset, int length);
 		int GetDescriptor(byte descriptorType, byte index, short langId, Byte[] buffer, int offset, int length);
 
-		int BulkWrite(Byte endpoint, Byte[] buffer, int offset, int length);
-		int BulkRead(Byte endpoint, Byte[] buffer, int offset, int length);
-		void BulkReset(Byte endpoint);
-		int InterruptWrite(Byte endpoint, Byte[] buffer, int offset, int length);
-		int InterruptRead(Byte endpoint, Byte[] buffer, int offset, int length);
-		void InterruptReset(Byte endpoint);
-		int ControlWrite(UsbControlRequestType requestType, byte request, short value, short index, Byte[] buffer, int offset, int length);
-		int ControlRead(UsbControlRequestType requestType, byte request, short value, short index, Byte[] buffer, int offset, int length);
+		int PipeTransfer(Byte endpoint, Byte[] buffer, int offset, int length);
+		void PipeReset(Byte endpoint);
+		void PipeAbort(Byte endpoint);
+		int ControlTransfer(UsbControlRequestType requestType, byte request, short value, short index, Byte[] buffer, int offset, int length);
 
-		UsbPipeStream GetBulkStream(Byte endpoint);
-		UsbPipeStream GetInterruptStream(Byte endpoint);
+		UsbPipeStream GetPipeStream(Byte endpoint);
 	}
 }