public override void Register(IUSBDevice peripheral, NumberRegistrationPoint <int> registrationPoint) { // when a new device is attached to the controller it is not automatically started, but waits for reset; // if there are multiple devices attached they are reset by the controller one at a time - // it ensures that there is only one device with address 0 (the default one) at the bus; base.Register(peripheral, registrationPoint); TryInitializeConnectedDevice(); }
public override void Register(IAtapiPeripheral peripheral, NumberRegistrationPoint <int> registrationPoint) { if (registrationPoint.Address != 0 & registrationPoint.Address != 1) { throw new RegistrationException("ATAPI does not allow registration point different than 0 (master) or 1 (slave)"); } base.Register(peripheral, registrationPoint); }
public override void Register(ISPIPeripheral peripheral, NumberRegistrationPoint <int> registrationPoint) { if (registrationPoint.Address < 0 || registrationPoint.Address > csWidth - 1) { throw new RecoverableException($"Wrong registration point: {registrationPoint}. Provide address in range from 0 to {csWidth - 1}."); } base.Register(peripheral, registrationPoint); }
public virtual void Register(IBytePeripheral peripheral, NumberRegistrationPoint <int> registrationPoint) { if (children.ContainsKey(registrationPoint.Address)) { throw new RegistrationException("The specified registration point is already in use."); } if (!(peripheral is OpenCoresI2C)) { throw new RegistrationException("The FFE Wishbone interface supports the OpenCoresI2C controller only"); } children.Add(registrationPoint.Address, peripheral); machine.RegisterAsAChildOf(this, peripheral, registrationPoint); }
public override void Register(IUSBDevice peripheral, NumberRegistrationPoint <int> registrationPoint) { base.Register(peripheral, registrationPoint); // indicate the K state - full-speed device attached kStatus.Value = true; jStatus.Value = false; connectDisconnectInterruptRequest.Value = true; this.Log(LogLevel.Debug, "USB device connected to port {0}", registrationPoint.Address); UpdateInterrupts(); HandleBumper(); }
public void Register(ICFU cfu, NumberRegistrationPoint <int> registrationPoint) { var isRegistered = ChildCollection.Where(x => x.Value.Equals(cfu)).Select(x => x.Key).ToList(); if (isRegistered.Count != 0) { throw new RegistrationException("Can't register the same CFU twice."); } else if (ChildCollection.ContainsKey(registrationPoint.Address)) { throw new RegistrationException("The specified registration point is already in use."); } ChildCollection.Add(registrationPoint.Address, cfu); machine.RegisterAsAChildOf(this, cfu, registrationPoint); cfu.ConnectedCpu = this; }
public void Register(IGPIOReceiver peripheral, NumberRegistrationPoint <int> registrationPoint) { machine.RegisterAsAChildOf(this, peripheral, registrationPoint); }
public override void Register(IPCIPeripheral peripheral, NumberRegistrationPoint <int> registrationPoint) { base.Register(peripheral, registrationPoint); info[registrationPoint.Address] = peripheral.GetPCIInfo(); _info[registrationPoint.Address] = true; }