1 // 2 // Copyright (c) 2010-2019 Antmicro 3 // 4 // This file is licensed under the MIT License. 5 // Full license text is available in 'licenses/MIT.txt'. 6 // 7 8 using Antmicro.Renode.Utilities.Packets; 9 10 namespace Antmicro.Renode.Extensions.Utilities.USB 11 { 12 [LeastSignificantByteFirst] 13 public struct ConfigurationDescriptor 14 { 15 [PacketField] 16 public byte Length; 17 [PacketField] 18 public byte Type; 19 [PacketField] 20 public ushort TotalLength; 21 [PacketField] 22 public byte NumberOfInterfaces; 23 [PacketField] 24 public byte ConfigurationValue; 25 [PacketField] 26 public byte Configuration; 27 [PacketField] 28 public byte Attributes; 29 [PacketField] 30 public byte MaximumPower; 31 ToStringAntmicro.Renode.Extensions.Utilities.USB.ConfigurationDescriptor32 public override string ToString() 33 { 34 return $"Length = {Length}, Type = {Type}, TotalLength = {TotalLength}, NumberOfInterfaces = {NumberOfInterfaces}, ConfigurationValue = {ConfigurationValue}, Configuration = {Configuration}, Attributes = {Attributes}, MaximumPower = {MaximumPower}"; 35 } 36 } 37 } 38