| /Renode-Infrastructure-v1.15.3-29f510e/src/Emulator/Peripherals/Peripherals/Mocks/ |
| D | SpiHost.cs | 25 …public static void AddMockSpiHost(this Emulation emulation, ISPIPeripheral device, string name = "… in AddMockSpiHost() argument 27 emulation.HostMachine.AddHostMachineElement(new SpiHost(device), name); in AddMockSpiHost() 33 public SpiHost(ISPIPeripheral device) in SpiHost() argument 35 this.device = device; in SpiHost() 44 device.Transmit(b); in WriteBytes() 46 device.FinishTransmission(); in WriteBytes() 55 returnedData[index] = device.Transmit(0); in ReadBytes() 60 private readonly ISPIPeripheral device; field in Antmicro.Renode.Extensions.Mocks.SpiHost
|
| D | I2CHost.cs | 24 …public static void AddMockI2CHost(this Emulation emulation, II2CPeripheral device, string name = "… in AddMockI2CHost() argument 26 emulation.HostMachine.AddHostMachineElement(new I2CHost(device), name); in AddMockI2CHost() 32 public I2CHost(II2CPeripheral device) in I2CHost() argument 34 currentSlave = device; in I2CHost()
|
| /Renode-Infrastructure-v1.15.3-29f510e/src/Emulator/Peripherals/Peripherals/USB/ |
| D | USBHost.cs | 52 protected virtual void DeviceEnumerated(IUSBDevice device) in DeviceEnumerated() argument 57 protected bool TryGetDevice(byte address, out IUSBDevice device) in TryGetDevice() argument 59 devices.TryGetValue(address, out device); in TryGetDevice() 60 return device != null; in TryGetDevice() 63 protected void EnumerateDevice(IUSBDevice device) in EnumerateDevice() argument 65 SetAddress(device); in EnumerateDevice() 66 GetDescriptor(device); in EnumerateDevice() 67 SetConfiguration(device); in EnumerateDevice() 70 ExecuteWithDelay(() => { DeviceEnumerated(device); }); in EnumerateDevice() 73 private void GetDescriptor(IUSBDevice device) in GetDescriptor() argument [all …]
|
| D | CDCToUARTConverter.cs | 82 protected override void DeviceEnumerated(IUSBDevice device) in DeviceEnumerated() argument 84 SetDataReadCallback(device); in DeviceEnumerated() 87 private void SetDataReadCallback(IUSBDevice device) in SetDataReadCallback() argument 89 … var ep = device.USBCore.GetEndpoint(UARTDataInEndpoint, Core.USB.Direction.DeviceToHost); in SetDataReadCallback() 90 ep.SetDataReadCallbackOneShot((dataEp, data) => ReadData(data, device)); in SetDataReadCallback() 93 private void ReadData(IEnumerable<byte> bytes, IUSBDevice device) in ReadData() argument 99 … var ep = device.USBCore.GetEndpoint(UARTDataInEndpoint, Core.USB.Direction.DeviceToHost); in ReadData() 100 ep.SetDataReadCallbackOneShot((dataEp, data) => ReadData(data, device)); in ReadData()
|
| /Renode-Infrastructure-v1.15.3-29f510e/src/Emulator/Extensions/Config/Devices/ |
| D | DevicesConfig.cs | 129 …private DeviceInfo InitializeSingleDevice(KeyValuePair<string, dynamic> device, string groupName =… in InitializeSingleDevice() argument 132 info.Name = device.Key; in InitializeSingleDevice() 133 var devContent = device.Value; in InitializeSingleDevice() 161 deferred.Add(device, groupName); in InitializeSingleDevice() 212 private void InitializeGPIOsFrom(DeviceInfo device) in InitializeGPIOsFrom() argument 214 foreach(var nodeName in device.IrqsFrom.Keys) in InitializeGPIOsFrom() 216 var gpioReceiver = device.Peripheral as IGPIOReceiver; in InitializeGPIOsFrom() 219 FailDevice(device.Name, nodeName); in InitializeGPIOsFrom() 222 var irqs = device.IrqsFrom[nodeName]; in InitializeGPIOsFrom() 225 FailDevice(device.Name, nodeName); in InitializeGPIOsFrom() [all …]
|
| /Renode-Infrastructure-v1.15.3-29f510e/src/Emulator/Main/Peripherals/USB/ |
| D | USBEndpoint.cs | 17 public USBEndpoint(IUSBDevice device, in USBEndpoint() argument 24 this.device = device; in USBEndpoint() 64 device.Log(LogLevel.Warning, "Trying to write to a Read-Only endpoint"); in WriteData() 68 device.Log(LogLevel.Noisy, "Writing {0} bytes of data", packet.Length); in WriteData() 70 device.Log(LogLevel.Noisy, Misc.PrettyPrintCollectionHex(packet)); in WriteData() 76 …device.Log(LogLevel.Warning, "There is no data handler currently registered. Ignoring the written … in WriteData() 97 device.Log(LogLevel.Noisy, "Data read callback set"); in SetDataReadCallbackOneShot() 100 device.Log(LogLevel.Noisy, "Data read callback fired"); in SetDataReadCallbackOneShot() 102 …device.Log(LogLevel.Noisy, "Sending back {0} bytes: {1}", buffer.Peek().Count(), Misc.PrettyPrintC… in SetDataReadCallbackOneShot() 110 … device.Log(LogLevel.Noisy, "No data to read in non-blocking mode - returning an empty buffer"); in SetDataReadCallbackOneShot() [all …]
|
| D | USBDeviceCore.cs | 20 public USBDeviceCore(IUSBDevice device, in USBDeviceCore() argument 43 this.device = device; in USBDeviceCore() 104 device.Log(LogLevel.Noisy, "Handling setup packet: {0}", packet); in HandleSetupPacket() 123 … device.Log(LogLevel.Warning, "Trying to access interface before selecting a configuration"); in HandleSetupPacket() 130 … device.Log(LogLevel.Warning, "Trying to access a non-existing interface #{0}", packet.Index); in HandleSetupPacket() 135 … device.Log(LogLevel.Warning, "Unsupported recipient type: 0x{0:X}", packet.Recipient); in HandleSetupPacket() 145 … device.Log(LogLevel.Noisy, "Sending setup packet response of length {0}", result.Length); in SendSetupResult() 147 device.Log(LogLevel.Noisy, Misc.PrettyPrintCollectionHex(result)); in SendSetupResult() 156 device.Log(LogLevel.Warning, "Non standard requests are not supported"); in HandleRequest() 168 … device.Log(LogLevel.Warning, "Wrong direction of Get Descriptor Standard Request"); in HandleRequest() [all …]
|
| D | USBConfiguration.cs | 17 public USBConfiguration(IUSBDevice device, in USBConfiguration() argument 29 this.device = device; in USBConfiguration() 47 …var newInterface = (T)Activator.CreateInstance(typeof(T), device, (byte)interfaces.Count, subClass… 81 …var newInterface = new USBInterface(device, (byte)interfaces.Count, classCode, subClassCode, proto… in WithInterface() 106 private readonly IUSBDevice device; field in Antmicro.Renode.Core.USB.USBConfiguration
|
| D | USBInterface.cs | 17 public USBInterface(IUSBDevice device, in USBInterface() argument 24 this.device = device; in USBInterface() 54 …createdEndpoint = new USBEndpoint(device, localId, direction, transferType, maximumPacketSize, int… in WithEndpoint() 78 protected readonly IUSBDevice device; field in Antmicro.Renode.Core.USB.USBInterface
|
| /Renode-Infrastructure-v1.15.3-29f510e/src/Emulator/Main/Tests/UnitTests/ |
| D | SVDParserTests.cs | 34 … device = new SVDParser(Path.Combine("invalid", "path.svd"), currentMachine.SystemBus); in ShouldThrowOnNonexistingFile() 310 … Assert.IsTrue(device.TryReadAccess(0x1000, out var result, SysbusAccessWidth.DoubleWord)); in ShouldReadValueFromRegister() 339 … Assert.IsTrue(device.TryReadAccess(0x1000, out var result, SysbusAccessWidth.DoubleWord)); in ShouldReadValueFromRegisterInBigEndian() 362 … var returnValue = device.TryReadAccess(0x1000, out var result, SysbusAccessWidth.DoubleWord); in ShouldHandleDifferentAccessPermissions() 401 … Assert.IsTrue(device.TryReadAccess(0x1000, out var result, SysbusAccessWidth.DoubleWord)); in ShouldReadFromRegistersOfDifferentSizes() 462 … Assert.IsTrue(device.TryReadAccess(readingAddress, out var result, SysbusAccessWidth.DoubleWord)); in ShouldReadFromUnalignedOffsetInOnePeripheral() 541 … Assert.IsTrue(device.TryReadAccess(readingAddress, out var result, SysbusAccessWidth.DoubleWord)); in ShouldReadFromUnalignedOffsetInManyPeripherals() 623 … Assert.IsTrue(device.TryReadAccess(readingAddress, out var result, SysbusAccessWidth.DoubleWord)); in ShouldReadFromUnalignedOffsetInOnePeripheralInBigEndian() 712 … Assert.IsTrue(device.TryReadAccess(readingAddress, out var result, SysbusAccessWidth.DoubleWord)); in ShouldReadFromUnalignedOffsetInOnePeripheralWithWriteOnlyRegister() 753 …Assert.IsTrue(device.TryReadAccess(finalAddressOffset, out var result, SysbusAccessWidth.DoubleWor… in ShouldConcatenateAddressOffsets() [all …]
|
| /Renode-Infrastructure-v1.15.3-29f510e/src/Emulator/Main/Peripherals/USB/HID/ |
| D | Interface.cs | 17 public Interface(IUSBDevice device, in Interface() argument 22 …ReportDescriptor reportDescriptor = null) : base(device, identifier, USBClassCode.HumanInterfaceDe… in Interface() 42 device.Log(LogLevel.Warning, "Unsupported type: 0x{0:X}", packet.Type); in HandleRequest() 55 device.Log(LogLevel.Warning, "Unsupported class request: 0x{0:X}", request); in HandleClassRequest() 67 device.Log(LogLevel.Warning, "Unexpected standard request direction"); in HandleStandardRequest() 72 device.Log(LogLevel.Warning, "Unsupported standard request: 0x{0:X}", request); in HandleStandardRequest() 88 … device.Log(LogLevel.Warning, "Unsupported descriptor type: 0x{0:X}", descriptorType); in HandleGetDescriptor()
|
| /Renode-Infrastructure-v1.15.3-29f510e/src/Emulator/Main/Peripherals/USB/MSC/ |
| D | Interface.cs | 15 public Interface(IUSBDevice device, in Interface() argument 19 …string description = null) : base(device, identifier, USBClassCode.MassStorage, subClassCode, prot… in Interface() 30 device.Log(LogLevel.Warning, "Unsupported packet type: 0x{0:X}", packet.Type); in HandleRequest() 43 … device.Log(LogLevel.Warning, "Unsupported class request: 0x{0:X}", packet.Request); in HandleClassRequest()
|
| /Renode-Infrastructure-v1.15.3-29f510e/src/Emulator/Main/Peripherals/USB/CDC/ |
| D | Interface.cs | 16 public Interface(IUSBDevice device, in Interface() argument 21 …string description = null) : base(device, identifier, USBClassCode.CommunicationsCDCControl, subCl… in Interface() 40 device.Log(LogLevel.Warning, "Unsupported type: 0x{0:x}", packet.Type); in HandleRequest() 47 … device.Log(LogLevel.Warning, "Handling an unimplemented CDC class request: {0}", request); in HandleClassRequest()
|
| /Renode-Infrastructure-v1.15.3-29f510e/src/Emulator/Peripherals/Peripherals/USBDeprecated/ |
| D | PortStatusAndControlRegister.cs | 96 device = portDevice; in Attach() 112 if(attached && device != null) in getValue() 113 if(device.GetSpeed() == USBDeviceSpeed.High) in getValue() 159 if(device != null) in resetFall() 160 device.Reset(); in resetFall() 177 protected IUSBPeripheral device; field in Antmicro.Renode.Peripherals.USBDeprecated.PortStatusAndControlRegister
|
| D | UsbHub.cs | 195 public void AttachDevice(IUSBPeripheral device, byte port) in AttachDevice() argument 197 if (device.GetSpeed()==USBDeviceSpeed.High) in AttachDevice() 200 if (device.GetSpeed()==USBDeviceSpeed.Low) in AttachDevice() 205 registeredDevices.Add(port, device); in AttachDevice() 337 IUSBPeripheral device = GetDevice((byte)(index)); in ProcessClassSet() 340 if(device != null) in ProcessClassSet() 342 device.SetAddress(0); in ProcessClassSet() 343 device.Reset(); in ProcessClassSet()
|
| /Renode-Infrastructure-v1.15.3-29f510e/src/Emulator/Peripherals/Peripherals/SD/ |
| D | PULP_uDMA_SDIO.cs | 114 var device = RegisteredPeripheral; in DefineRegisters() 115 if(device == null) in DefineRegisters() 121 SendCommand(device); in DefineRegisters() 133 ReadFromDevice(device); in DefineRegisters() 143 WriteDataToDevice(device); in DefineRegisters() 195 private void SendCommand(SDCard device) in SendCommand() argument 202 …var commandResult = device.HandleCommand((uint)commandOperation.Value, (uint)commandArgument.Value… in SendCommand() 253 private void ReadFromDevice(SDCard device) in ReadFromDevice() argument 261 var data = device.ReadData((uint)bytesToReadFromDevice); in ReadFromDevice() 271 private void WriteDataToDevice(SDCard device) in WriteDataToDevice() argument [all …]
|
| /Renode-Infrastructure-v1.15.3-29f510e/src/Emulator/Peripherals/Peripherals/I2C/ |
| D | VybridI2C.cs | 56 II2CPeripheral device; in ReadByte() 57 if(!TryGetByAddress(address, out device)) in ReadByte() 61 receiveFifo = new Queue<byte>(device.Read()); in ReadByte() 64 ….Log(LogLevel.Warning, "Reading from slave device {0} did not return any data.", device.GetType()); in ReadByte() 122 II2CPeripheral device; in WriteByte() 123 if(TryGetByAddress(address, out device)) in WriteByte() 125 device.Write(transmitFifo.ToArray()); in WriteByte()
|
| D | PULP_uDMA_I2C.cs | 310 if(!TryGetByAddress(address, out var device)) in TrySendToDevice() 319 device.Write(data); in TrySendToDevice() 323 device.FinishTransmission(); in TrySendToDevice() 346 if(!TryGetByAddress(address, out var device)) in TryReadFromDevice() 352 var data = device.Read(bytesToRead); in TryReadFromDevice()
|
| /Renode-Infrastructure-v1.15.3-29f510e/src/Emulator/Extensions/UserInterface/ |
| D | MonitorCommands.cs | 280 IPeripheral device; in GetDevice() 282 if(TryFindPeripheralByName(name, out device, out longestMatch)) in GetDevice() 284 return device; in GetDevice() 424 var device = IdentifyDevice(name); in ProcessDeviceAction() 425 result = ExecuteDeviceAction(name, device, p); in ProcessDeviceAction() 467 Type device; in ProcessDeviceActionByName() 470 if(TryFindPeripheralTypeByName(name, out device, out longestMatch, out actualName)) in ProcessDeviceActionByName() 472 ProcessDeviceAction(device, actualName, p, writer); in ProcessDeviceActionByName() 768 public MonitorInfo GetMonitorInfo(Type device) in GetMonitorInfo() argument 773 var methods = cache.Get(device, GetAvailableMethods); in GetMonitorInfo() [all …]
|
| /Renode-Infrastructure-v1.15.3-29f510e/src/Emulator/Extensions/Utilities/USBIP/ |
| D | USBIPServer.cs | 38 public static void Register(this USBIPServer @this, IUSBDevice device, int? port = null) in Register() argument 47 @this.Register(device, new NumberRegistrationPoint<int>(port.Value)); in Register() 232 else if(!TryGetByAddress((int)urbHeader.DeviceId, out var device)) in HandleIncomingData() 244 …device.USBCore.HandleSetupPacket(setupPacket, additionalData: additionalData, resultCallback: resp… in HandleIncomingData() 251 …var ep = device.USBCore.GetEndpoint((int)urbHeader.EndpointNumber, urbHeader.Direction == URBDirec… in HandleIncomingData() 332 private byte[] HandleSetupPacketSync(IUSBDevice device, SetupPacket setupPacket) in HandleSetupPacketSync() argument 337 device.USBCore.HandleSetupPacket(setupPacket, received => in HandleSetupPacketSync() 347 private USB.DeviceDescriptor ReadDeviceDescriptor(IUSBDevice device) in ReadDeviceDescriptor() argument 359 return Packet.Decode<USB.DeviceDescriptor>(HandleSetupPacketSync(device, setupPacket)); in ReadDeviceDescriptor() 362 …private USB.ConfigurationDescriptor ReadConfigurationDescriptor(IUSBDevice device, byte configurat… in ReadConfigurationDescriptor() argument [all …]
|
| /Renode-Infrastructure-v1.15.3-29f510e/src/Emulator/Extensions/HostInterfaces/Camera/ |
| D | HostCamera.cs | 23 …public static void AddExternalCamera(this Emulation emulation, string device, string name = "camer… in AddExternalCamera() argument 25 var camera = new HostCamera(device); in AddExternalCamera() 33 public HostCamera(string device) in HostCamera() argument 38 this.device = device; in HostCamera() 131 if(!VideoCapturer.Start(device, this)) in InitCamera() 257 private readonly string device; field in Antmicro.Renode.HostInterfaces.Camera.HostCamera
|
| /Renode-Infrastructure-v1.15.3-29f510e/src/Emulator/Peripherals/Peripherals/SPI/ |
| D | SPIMultiplexer.cs | 66 if(!TryGetByAddress(deviceAddress, out var device)) in Transmit() 72 return device.Transmit(data); in Transmit() 100 if(!TryGetByAddress(deviceAddress, out var device)) in FinishTransmissionByAddress() 107 device.FinishTransmission(); in FinishTransmissionByAddress()
|
| D | IMXRT_FlexSPI.cs | 297 if(!TryGetDevice(out var device)) in TryPushData() 314 device.Transmit(b); in TryPushData() 339 private bool TryGetDevice(out ISPIPeripheral device) in TryGetDevice() argument 341 device = RegisteredPeripheral; in TryGetDevice() 342 if(device == null) in TryGetDevice() 456 if(!parent.TryGetDevice(out var device)) in Execute() 464 if(!HandleCommand(descriptors[currentCommand++], device)) in Execute() 511 private byte[] ReadFromDevice(ISPIPeripheral device, int count) in ReadFromDevice() argument 517 result[i] = device.Transmit(0); in ReadFromDevice() 523 private bool HandleCommand(IPCommandDescriptor cmd, ISPIPeripheral device) in HandleCommand() argument [all …]
|
| D | IMXRT_LPSPI.cs | 319 private bool CanTransfer(out ISPIPeripheral device) in CanTransfer() argument 321 device = null; in CanTransfer() 334 return TryGetDevice(out device); in CanTransfer() 339 if(!CanTransfer(out var device)) in DoDummyTransfer() 345 while(!TrySendDataInner(0, device)) { } in DoDummyTransfer() 350 if(!CanTransfer(out var device)) in TrySendData() 355 return TrySendDataInner(value, device); in TrySendData() 358 private bool TrySendDataInner(uint value, ISPIPeripheral device) in TrySendDataInner() argument 377 var resp = device.Transmit((byte)value); in TrySendDataInner() 402 device.FinishTransmission(); in TrySendDataInner() [all …]
|
| /Renode-Infrastructure-v1.15.3-29f510e/src/Emulator/Main/Utilities/ |
| D | VideoCapturer.cs | 19 public static bool Start(string device, IEmulationElement loggingParent) in Start() argument 30 loggingParent.Log(LogLevel.Debug, "Opening device: {0}...", device); in Start() 31 fd = LibCWrapper.Open(device, O_RDWR); in Start() 35 loggingParent.Log(LogLevel.Error, "Couldn't open device: {0}", device); in Start() 41 … loggingParent.Log(LogLevel.Error, "Device does not support JPEG output: {0}", device); in Start()
|