Mercurial > hg > ucis.core
annotate USBLib/Communication/IUsbDevice.cs @ 46:053cc617af54
USBLib: added functions to clear USB endpoint halt state
author | Ivo Smits <Ivo@UCIS.nl> |
---|---|
date | Sun, 30 Jun 2013 16:28:36 +0200 |
parents | dcfec2be27c9 |
children | abe0d55a2201 |
rev | line source |
---|---|
21 | 1 ???using System; |
2 | |
3 namespace UCIS.USBLib.Communication { | |
4 public interface IUsbDevice : IUsbInterface, IDisposable { | |
5 new Byte Configuration { get; set; } | |
6 void ClaimInterface(int interfaceID); | |
7 void ReleaseInterface(int interfaceID); | |
8 void ResetDevice(); | |
9 | |
10 IUsbDeviceRegistry Registry { get; } | |
11 | |
12 //void Close(); | |
13 } | |
14 public interface IUsbInterface : IDisposable { | |
15 Byte Configuration { get; } | |
16 void Close(); | |
17 | |
18 //int ControlTransfer(byte requestType, byte request, short value, short index, Byte[] buffer, int offset, int length); | |
19 int GetDescriptor(byte descriptorType, byte index, short langId, Byte[] buffer, int offset, int length); | |
20 String GetString(short langId, byte stringIndex); | |
21 | |
22 int BulkWrite(Byte endpoint, Byte[] buffer, int offset, int length); | |
23 int BulkRead(Byte endpoint, Byte[] buffer, int offset, int length); | |
46
053cc617af54
USBLib: added functions to clear USB endpoint halt state
Ivo Smits <Ivo@UCIS.nl>
parents:
21
diff
changeset
|
24 void BulkReset(Byte endpoint); |
21 | 25 int InterruptWrite(Byte endpoint, Byte[] buffer, int offset, int length); |
26 int InterruptRead(Byte endpoint, Byte[] buffer, int offset, int length); | |
46
053cc617af54
USBLib: added functions to clear USB endpoint halt state
Ivo Smits <Ivo@UCIS.nl>
parents:
21
diff
changeset
|
27 void InterruptReset(Byte endpoint); |
21 | 28 int ControlWrite(UsbControlRequestType requestType, byte request, short value, short index, Byte[] buffer, int offset, int length); |
29 int ControlRead(UsbControlRequestType requestType, byte request, short value, short index, Byte[] buffer, int offset, int length); | |
30 | |
31 UsbPipeStream GetBulkStream(Byte endpoint); | |
32 UsbPipeStream GetInterruptStream(Byte endpoint); | |
33 } | |
34 } |