Ejemplo n.º 1
0
 public RequestType(RequestDirection direction, RequestInternalType type, RequestRecipient recipient)
 {
     Raw       = 0;
     Direction = direction;
     Type      = type;
     Recipient = recipient;
 }
Ejemplo n.º 2
0
 public static SetupPacket MakeGetDescriptor(RequestInternalType type, RequestRecipient recipient, DescriptorType descriptorType, ushort index, ushort size, ushort otherIndex = 0)
 {
     return(new SetupPacket()
     {
         bmRequestType = new RequestType(RequestDirection.DeviceToHost, type, recipient),
         bRequest = (byte)StandardRequestCode.GetDescriptor,
         wValue = descriptorType.WithIndex(index),
         wIndex = otherIndex,
         wLength = size
     });
 }