public RequestType(RequestDirection direction, RequestInternalType type, RequestRecipient recipient) { Raw = 0; Direction = direction; Type = type; Recipient = recipient; }
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 }); }