Mercurial > hg > ucis.core
comparison USBLib/Communication/IUsbDevice.cs @ 21:dcfec2be27c9
Added USBLib
author | Ivo Smits <Ivo@UCIS.nl> |
---|---|
date | Mon, 15 Apr 2013 01:04:59 +0200 |
parents | |
children | 053cc617af54 |
comparison
equal
deleted
inserted
replaced
20:c873e3dd73fe | 21:dcfec2be27c9 |
---|---|
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); | |
24 int InterruptWrite(Byte endpoint, Byte[] buffer, int offset, int length); | |
25 int InterruptRead(Byte endpoint, Byte[] buffer, int offset, int length); | |
26 int ControlWrite(UsbControlRequestType requestType, byte request, short value, short index, Byte[] buffer, int offset, int length); | |
27 int ControlRead(UsbControlRequestType requestType, byte request, short value, short index, Byte[] buffer, int offset, int length); | |
28 | |
29 UsbPipeStream GetBulkStream(Byte endpoint); | |
30 UsbPipeStream GetInterruptStream(Byte endpoint); | |
31 } | |
32 } |