C# Class MonoLibUsb.Transfer.MonoUsbControlSetup

ファイルを表示 Open project: arvydas/BlinkStickDotNet Class Usage Examples

Public Properties

Property Type Description
SETUP_PACKET_SIZE int

Public Methods

Method Description
GetData ( int transferLength ) : Byte[]

Gets control data as bytes.

MonoUsbControlSetup ( IntPtr pControlSetup ) : System

Creates a MonoUsbControlSetup structure for a control setup packet pointer.

The pControlSetup pointer must be a pointer in memory to a valid Libusb-1.0 libusb__control__setup that was allocated with MonoUsbControlSetupHandle.

SetData ( IntPtr data, int offset, int length ) : void

Copies data into PtrData.

Method Details

GetData() public method

Gets control data as bytes.
public GetData ( int transferLength ) : Byte[]
transferLength int The number of bytes to copy out of . This will usually come from MonoUsbTransfer.ActualLength.
return Byte[]

MonoUsbControlSetup() public method

Creates a MonoUsbControlSetup structure for a control setup packet pointer.
The pControlSetup pointer must be a pointer in memory to a valid Libusb-1.0 libusb__control__setup that was allocated with MonoUsbControlSetupHandle.
public MonoUsbControlSetup ( IntPtr pControlSetup ) : System
pControlSetup System.IntPtr Pointer to the setup packet. This will usually be MonoUsbTransfer.PtrBuffer
return System

SetData() public method

Copies data into PtrData.
public SetData ( IntPtr data, int offset, int length ) : void
data System.IntPtr /// Data buffer to copy into for an output control transfer. /// This value can be: /// /// An of bytes or other blittable types. /// An already allocated, pinned . In this case is used for the buffer address. /// An . /// ///
offset int The offset in to begin copying.
length int Number of to copy.
return void

Property Details

SETUP_PACKET_SIZE public_oe static_oe property

Size of a Libusb-1.0 setup packet.
public static int SETUP_PACKET_SIZE
return int