C# 클래스 LibUsbDotNet.LibUsb.LibUsbDevice

Contains members that are specific to the LibUsb-Win32 driver.
Use the T:LibUsbDotNet.UsbDevice class instead to allow your code to work with either LibUsb or WinUsb.
상속: UsbDevice, IUsbDevice
파일 보기 프로젝트 열기: arvydas/BlinkStickDotNet 1 사용 예제들

공개 메소드들

메소드 설명
ClaimInterface ( int interfaceID ) : bool

Claims the specified interface of the device.

Close ( ) : bool

Closes the UsbDevice and disposes any UsbDevice.ActiveEndpoints.

Open ( ) : bool

Opens the USB device handle.

Open ( string deviceFilename, LibUsbDevice &usbDevice ) : bool

Opens the USB device for communucation.

ReleaseAllInterfaces ( ) : int

Releases all interface claimed by ClaimInterface.

ReleaseInterface ( ) : bool

Releases the last interface claimed by ClaimInterface.

ReleaseInterface ( int interfaceID ) : bool

Releases an interface that was previously claimed with ClaimInterface.

ResetDevice ( ) : bool

Sends a usb device reset command.

After calling ResetDevice, the LibUsbDevice instance is disposed and no longer usable. A new LibUsbDevice instance must be obtained from the device list.

SetAltInterface ( int alternateID ) : bool

Sets an alternate interface for the most recent claimed interface.

SetAltInterface ( int interfaceID, int alternateID ) : bool

Sets an alternate interface for the specified interface.

SetConfiguration ( byte config ) : bool

Sets the USB devices active configuration value.

A USB device can have several different configurations, but only one active configuration.

비공개 메소드들

메소드 설명
ControlTransferEx ( UsbSetupPacket setupPacket, IntPtr buffer, int bufferLength, int &lengthTransferred, int timeout ) : bool
LibUsbDevice ( UsbApiBase api, SafeHandle usbHandle, string deviceFilename ) : System
UsbIoSync ( int controlCode, Object inBuffer, int inSize, IntPtr outBuffer, int outSize, int &ret ) : bool

메소드 상세

ClaimInterface() 공개 메소드

Claims the specified interface of the device.
public ClaimInterface ( int interfaceID ) : bool
interfaceID int The interface to claim.
리턴 bool

Close() 공개 메소드

Closes the UsbDevice and disposes any UsbDevice.ActiveEndpoints.
public Close ( ) : bool
리턴 bool

Open() 공개 메소드

Opens the USB device handle.
public Open ( ) : bool
리턴 bool

Open() 공개 정적인 메소드

Opens the USB device for communucation.
public static Open ( string deviceFilename, LibUsbDevice &usbDevice ) : bool
deviceFilename string The LibUsb device filename to open.
usbDevice LibUsbDevice The newly created UsbDevice.
리턴 bool

ReleaseAllInterfaces() 공개 메소드

Releases all interface claimed by ClaimInterface.
public ReleaseAllInterfaces ( ) : int
리턴 int

ReleaseInterface() 공개 메소드

Releases the last interface claimed by ClaimInterface.
public ReleaseInterface ( ) : bool
리턴 bool

ReleaseInterface() 공개 메소드

Releases an interface that was previously claimed with ClaimInterface.
public ReleaseInterface ( int interfaceID ) : bool
interfaceID int The interface to release.
리턴 bool

ResetDevice() 공개 메소드

Sends a usb device reset command.
After calling ResetDevice, the LibUsbDevice instance is disposed and no longer usable. A new LibUsbDevice instance must be obtained from the device list.
public ResetDevice ( ) : bool
리턴 bool

SetAltInterface() 공개 메소드

Sets an alternate interface for the most recent claimed interface.
public SetAltInterface ( int alternateID ) : bool
alternateID int The alternate interface to select for the most recent claimed interface See .
리턴 bool

SetAltInterface() 공개 메소드

Sets an alternate interface for the specified interface.
public SetAltInterface ( int interfaceID, int alternateID ) : bool
interfaceID int The interface index to specify an alternate setting for.
alternateID int The alternate interface setting.
리턴 bool

SetConfiguration() 공개 메소드

Sets the USB devices active configuration value.
A USB device can have several different configurations, but only one active configuration.
public SetConfiguration ( byte config ) : bool
config byte The active configuration value. A zero value means the device is not configured and a non-zero value indicates the device is configured.
리턴 bool