comparison 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
comparison
equal deleted inserted replaced
66:b7bc27c6734e 67:2d16447eff12
11 } 11 }
12 public interface IUsbInterface : IDisposable { 12 public interface IUsbInterface : IDisposable {
13 Byte Configuration { get; } 13 Byte Configuration { get; }
14 void Close(); 14 void Close();
15 15
16 //int ControlTransfer(byte requestType, byte request, short value, short index, Byte[] buffer, int offset, int length);
17 int GetDescriptor(byte descriptorType, byte index, short langId, Byte[] buffer, int offset, int length); 16 int GetDescriptor(byte descriptorType, byte index, short langId, Byte[] buffer, int offset, int length);
18 17
19 int BulkWrite(Byte endpoint, Byte[] buffer, int offset, int length); 18 int PipeTransfer(Byte endpoint, Byte[] buffer, int offset, int length);
20 int BulkRead(Byte endpoint, Byte[] buffer, int offset, int length); 19 void PipeReset(Byte endpoint);
21 void BulkReset(Byte endpoint); 20 void PipeAbort(Byte endpoint);
22 int InterruptWrite(Byte endpoint, Byte[] buffer, int offset, int length); 21 int ControlTransfer(UsbControlRequestType requestType, byte request, short value, short index, Byte[] buffer, int offset, int length);
23 int InterruptRead(Byte endpoint, Byte[] buffer, int offset, int length);
24 void InterruptReset(Byte endpoint);
25 int ControlWrite(UsbControlRequestType requestType, byte request, short value, short index, Byte[] buffer, int offset, int length);
26 int ControlRead(UsbControlRequestType requestType, byte request, short value, short index, Byte[] buffer, int offset, int length);
27 22
28 UsbPipeStream GetBulkStream(Byte endpoint); 23 UsbPipeStream GetPipeStream(Byte endpoint);
29 UsbPipeStream GetInterruptStream(Byte endpoint);
30 } 24 }
31 } 25 }